|
From: <tho...@tr...> - 2004-05-13 14:32:16
|
Guido, Thanks for taking the time to put this together. From a brief look it looks like an excellent solution. I'm hoping to be able to try it out fairly soon and I would also like to see it tested in an app server environment and with Hibernate. If you or anybody else get a chance to test it further, please keep us posted. Thanks, Thomas Risberg Quoting Guido Schmutz <Gui...@tr...>: > Hello > > Attached a first version of a special Oracle DataSource implementation for > using the Oracle proxy connection feature as well as the Client Identifier > (to map global application contexts). It uses an OracleOCIConnectionPool to > create connections, as this is the only class supporting proxy connections. > You cannot achieve this via a "normal" Oracle JDBC driver implementation. > > It's an answer to a question on the forum. I've just hacked together a first > version, I will need it later in a project as well. As I'm quite new to > Spring, any feedback is appreciated. > > I'm using a ThreadLocal (OracleOCIConnectionStrategy) to pass the proxy user > to the DataSource. To conform to Spring, the ThreadLocal object is not > implemented as a Singleton, but has to be configured in the application > context as a normal POJO. > > It then needs to be passed to the OracleOCIConnectionPoolDataSource by > dependency injection. > > You can check the test cases to see it work. The necessary database schema > can be created via the Ant build file. > > So far it has only been used via the JDBC DAO support of Spring, but I think > it should also work with Hibernate. I haven't tried yet in an Application > Server environment via JNDI. > > Guido > > > > |