This one time, at band camp, Grongstad, Harry said:

GH>We are evaluating using Castor in our persistence layer in a J2EE
GH>application server architecture (IBM Websphere, Oracle 9x.)  On of our
GH>requirements is that *every* connection to the database is authenticated.
GH>This means that even though the app-server is connected as, say
GH>usr=appserver/pwd=appserver, we have to make a prepared statement call to a
GH>stored procedure in Oracle to which we pass a specific username, and then
GH>have castor do its work.  When Castor is done and before releasing the
GH>connection back to the pool, we have to call another stored procedure to
GH>free the username. All of this means that we need access to connection
GH>object before and after Castor operations.  Is this doable? And if so, how?
GH>Any help on this will be appreciated. -Harry

Harry,

This is would be pretty simple, actually. For the creation of the
Connection, just modify the DatabaseRegistry#createConnection()
method to handle what you need.  I would recommend creating another
class (maybe down in, say, the util package) that contains the
methods to create and execute the Statement or CallableStatement.
Then just call the appropriate methods from within createConnection().

For the closing of the Connection, just modify the
TransactionContextImpl#closeConnections() method. Similar to the
above recommendation, just modify this method to call the the
appropriate methods.

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to