import-bot (20211) [Avatar] Offline
#1
Re: Database connection !
[Originally posted by rajender]

Mike,

We are also in the same dilema of no.of connections between app server and db
server. We are planning to support or allocate 135 users per application
server. Application server busy from 8 a.m to 7 p.m and peak time is 3 p.m to
5 p.m.

can I specify these many no. of connections using settranspool function. If I
follow this approach I should specify settranspool(140,160,200) where as 140
is no.of connections kept open once it's connected, 160 is max. no of
connections supported by app server, and 200 seconds is time out period. I
think this approach is useful only for short transactions. If time is out, it
returns an error to client. This shouldn't happen.

But, this is not the case in our application. We are expecting a database
growth size upto 100 MB (min.) per day and it is trn. intensive. At the same
time, creating 2000 users and passwords at the DB server also a painful
process.

Can you suggest me a best approach among these two.

Thanks - Rajender.
import-bot (20211) [Avatar] Offline
#2
Re: Database connection !
[Originally posted by mbarlotta]

Rajender,

> We are also in the same dilema of no.of connections between app server and db
> server. We are planning to support or allocate 135 users per application
> server. Application server busy from 8 a.m to 7 p.m and peak time is 3 p.m to
> 5 p.m.

I suggest verifying that the server can handle this load... See post under Max
No. Connections/Users


>
> can I specify these many no. of connections using settranspool function. If I
> follow this approach I should specify settranspool(140,160,200) where as 140
> is no.of connections kept open once it's connected, 160 is max. no of
> connections supported by app server, and 200 seconds is time out period.

You can... You will have to test how many connections you need to provide
adequate performance. However if you only have 135 users on a box your numbers
are way to high. The goal of connection pooling is to reduce the one-to-one
client to DB connection.

More like (70, 100, 20)

> think this approach is useful only for short transactions. If time is out, it
> returns an error to client. This shouldn't happen.

Actually it should.The client needs to know that the transaction failed - the
reason is it could not get a database connection.


>
> But, this is not the case in our application. We are expecting a database
> growth size upto 100 MB (min.) per day and it is trn. intensive. At the same
> time, creating 2000 users and passwords at the DB server also a painful
> process.
>


I would have a single DBMS user id / pwd for the DPB server. I would implement
security in the DPB server. Setting it up in DPB is no more painful than
setting it up for the DBMS.

Mike
import-bot (20211) [Avatar] Offline
#3
[Originally posted by rajender77]

Mike,

I brought your book and it's fabulous and truly a master piece. I am really
enjoying it. Superb work and worth. I am still a beginner in DPB and
experimenting it. I haven't fully explored your book yet, could you please
clarify my doubt.

Assume that 10 to 20 clients are connected to an application server(DPB Server).
Let's say the DB server is Oracle. Now, will there be a single DB connection
from app server to db server ? Or do I need to create 20 users on the DB and
then check the validity in the connectionbegin event.

Could you please clarify my doubt ASAP.

Thanks - Gopal.
import-bot (20211) [Avatar] Offline
#4
Re: Database connection !
[Originally posted by mbarlotta]

Glad you like the book - if you feel that strongly about it I would appreciate
you writing a review on the Amazon home page for the book.

http://www.amazon.com/exec/obidos/ASIN/1884777686/o/qid=924625962/sr=2-3/002-4403339-3136666


Thanks

Now for the question:
It depends. When you use connection pooling there will be n number of
connections (probably more than one but less than the total number of
clients). To use connection pooling (SetTransPool) you will need to have a
single user id and password for all connections to the DBMS. This is true with
Jaguar as well. If you choose not to use connection pooling you will have a
one-to-one ratio of clients and DB connections. Going with this approach you
can have a user id and password for each user.

I recommend a single DBMS user id and password controlled at the app server.
The app server can verify the logon using a separate table of valid users or
in the case of Jaguar using the NT users.

HTH

Mike
565395 (2) [Avatar] Offline
#5
There has been a recent discussion on integration of AspectJ with XDoclet.
royal1688