Hi Chris,

Chris Halverson wrote:
I'm starting a new project w/ OJB and the business requirements state
that everybody has to log into the Oracle instance with their own
username and password that has been setup in Oracle (Oracle security,
not a table that has un/pw, but actual Oracle "users"). In a previous
project that had to do the same thing, I stored a Connection object in
the session (and had to write a thread to try to login for only 10 sec
as the instance's default is 5 min and evidently the Thin driver
doesn't support a timeout parameter). I'm thinking I'll now have to
store a PersistenceBroker (obviously I'm using the PB Interface)
object.

Is there an "elegant" way of doing this? I'm thinking I'm going to
have to basically do what the FAQ says in "Connect to a Database at
Runtime" says and create the properties on the fly. Is there a better,
more "accepted" way?

Not that I know of. :-(


This whole thing is a huge PITA, but the DBAs say
we're not licensed for a "web" user type of situation. Ug.

This is really the lamest excuse I ever heared for not using a single application user account!
Why don't the DBA talk to Oracle to change the licence model?


Also, I need to call 1 prepared statement that sets up the user's
security, I can do it if I get the low level Connection, but is there
a better way w/ the PB? I read "how to use prepared statements" in
CVS, but that's a lot more involved than what I need, I just need to
call one statement which is executed exactly once at login.

this is also mentioned in the FAQ: PersistenceBroker broker = PersistenceBrokerFactory. createPersistenceBroker(myKey); broker.beginTransaction(); // do something

Connection con = broker.serviceConnectionManager().getConnection();
// perform your connction action and do more

broker.commitTransaction();
broker.close();

cheers,
Thomas


Thanks!


cdh



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



Reply via email to