Hi Chris,

as in the FAQ you have to possibilities:

- setup a jdbc-connection-descriptor for each
user (each with different jcd-alias name). you have
full control of used connection-pool and sequence-manager

- setup one jdbc-connection-descriptor
>       <jdbc-connection-descriptor
>         jcd-alias="oracle"
>         default-connection="false"
>         protocol="jdbc"
>         subprotocol="oracle"
>         platform="Oracle"
>         driver="oracle.jdbc.driver.OracleDriver"
>         jdbc-level="2.0"
>         dbalias="thin:@host:1521:DB"
>         username=""
>         password=""
>      />
Say you have user 'guest' and user 'admin'.
PBKey guestKey = new PBKey("oracle", "guest", "passwd1");
PBKey adminKey = new PBKey("oracle", "admin", "passwd2");

PersistenceBroker broker = PBF.createPersistenceBroker(guestKey);

use adminKey to lookup a PB instance for 'admin'.

This should work.
Preconditioned it work for you, could you send me
a short explanation of this in your own words to
integrate in FAQ (maybe this will make it easier
for the next user ;-)).

regards,
Armin

----- Original Message -----
From: "Chris Halverson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 4:57 PM
Subject: Multiple users, Connection Pool (related to FAQ)


> OK, I see this question in the FAQ, so I've done some research, so
> don't jump on me too badly :)
>
> Basically, I need to implement what is in the FAQ, multiple users
> connecting to the same database with different
> usernames/passwords. The FAQ says:
>
>  For it define one  jdbc-connection-descriptor , now you can use the
>  same jcdAlias  name with different User/Password . OJB copy  the
>  defined jdbc-connection-descriptor  and replace the username  and
>  password  with the given User/Password . Keep in mind, when the
>  connection-pool  element enables connection pooling, every user get
>  its separate pool. See How does OJB handle connection pooling .
>
> The connection pooling part doesn't give much information, or at least
> not enough that I'm figuring it out. For example, if I have a base
> connection-descriptor as:
>
>       <jdbc-connection-descriptor
>         jcd-alias="oracle"
>         default-connection="false"
>         protocol="jdbc"
>         subprotocol="oracle"
>         platform="Oracle"
>         driver="oracle.jdbc.driver.OracleDriver"
>         jdbc-level="2.0"
>         dbalias="thin:@host:1521:DB"
>         username="username"
>         password="password"
>      />
>
> How do I go about making this happen w/ different users? Do I have to
> create a new JdbcConnectionDescriptor setting the username and
> password? Then how do I get a PB out of this? Some real code would be
> helpful.
>
> Sorry if this is obvious, the docs make it sound like it is but I'm
> just not getting it. Thanks for any help!
>
> cdh
>
> --
> Chris D. Halverson                         http://www.halverson.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to