>
>Try this:
> DataSource ds = (DataSource)new
>InitialContext().lookup("java:comp/env/jdbc/OraclePool");
> Connection aCon1 = ds.getConnection();
> aCon1.close();
> Connection aCon2 = ds.getConnection();
> aCon2.close();
>
It does not helps me in my my case:
I take aCon1 and do insert into table1
I take aCon2 and trying insert into table2, where table1 has FOREIGN KEY into table1
and here goes lock of oracle because I GOT DIFFERENT
connections.
Some investigations:
File: OraclePoll.java
function: Object getObject()
here it is called
Object result = factory.isUniqueRequest();
File: XAConnectionFactory.java
Function public Object isUniqueRequest() ALWAYS returns false if i using Oracle8i
pool because into wrapperTx Oracle conection is never inserted.
File: XAConnectionFactory.java
Function public Object prepareObject(Object pooledObject)
inserts db connection into wrapperTx just of the type XAConnectionImpl
How i can make sure i gen get the same data base connections in the same EJB
transaction?
I was looking into source code i could not found the sollution how i can store all
types of connections (not just XAConnectionImpl)
Maybe some class XAOracleConnectionImpl should be implemented with
setTransactionListener ans all ther functios? Otherwise I cant add oracle
connection into the wrapperTx - connection, transaction association.
Hmm i'm a bit confused...
Regards,
D&D