oracle suggests that the context be set for each user executing a query. my initial thought was that each time getConnection() was called, the current principal of the caller would be used for these oracle packages. but, now that you mention it, wouldn't it have to be done for each transaction?
it's whole intent is that instead of using individual connections to the database, it uses a generic connection pool, but it extracts the JAAS principal and sets it in the oracle context for use with triggers. it makes scence in a way since you get the benifits of acurate audit information without the overhead of individual connections to the database. my question now is should this be done on the individual statement level, or the transaction level? i vaguely understand the process of when getConnection() is called for BMP classes, but i don't know when it's caled for CMP classes. i need to ensure that each statement run by a particular user has the context information set. Ryan -----Original Message----- From: David Jencks [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 5:00 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-dev] Oracle specific jca adapter When does Oracle want you to execute this stuff? Per statement? per "getConnection"? per tx???? Anyway, look in connector/src/main/org/jboss/resource/adapter/jdbc/ This contains the base classes and the local and xa specific subclasses are in the local and xa folders. There's an Oracle specific ManagedConnectionFactory for xa to work around some other oracle "features. If you really need to do something whenever a connection handle is given to a user app, look in one of the ManagedConnection classes at getConnection. If you need to do something whenever a new physical connection is established to Oracle do it in the ManagedConnection constructor. You can intercept "new statement" and use-of-statement operations in the connection and statement wrappers. If you need to do them at the start of a transaction maybe you could wrap the XAResource?? thanks david jencks On Friday, January 17, 2003, at 04:43 PM, Sonnek, Ryan wrote: > i'm working on a project currently that is requiring that for each > connection to the database, a set of database packages are called > before any > insert/update/select/delete commands are run. i'd like to do this by > writing an extension to the existing JCA modules to execute these > packages > before returning the java.sql.Connection object to the caller. > > i've gone through the pay docs and examples but i must admit that i'm > a bit > lost on where to start. any suggestions on what classes i need to > extend > and what xml files are needed would be greatly appreciated. > > oracle is really pushing this "context setting" as their recommended > method > of enterprise connections, and i'd be more than happy to submit > anything i > get working to the jboss base code as a patch. i just to be pointed > in the > right direction. thank you for all of your input! > > Ryan J. Sonnek > Brown Printing Company > J2EE Application Developer > 507.835.0803 > <mailto:[EMAIL PROTECTED]> > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts > will > allow you to extend the highest allowed 128 bit encryption to all your > clients even if they use browsers that are limited to 40 bit > encryption. > Get a guide > here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development