Okayl, what I think you're saying in this message is that you're
using Oracle's XADataSourceImpl instead of the Minerva wrappers around the
Oracle JDBC 1/2 Connection - correct?
If so, we rely on Oracle to handle transactions. The way it
SHOULD work, IMHO, is that if you use two Oracle XA connections within the
same transaction, it's just like you have two telephones and I have two
telephones and you call me simultaneously on both. You may speak into one
or the other, but I hear what you're saying no matter what because I'm
listening to both. That is, if you have two Oracle XAConnections, and you
use both withing the same transaction, that should be OK - on the "back
end", Oracle should see that requests on each connection are within the
scope of the same transaction, and it should allow them to cooperate
instead of locking each other out. So my understanding is that the
behavior you describe is a bug in Oracle's XADataSource implementation.
How do other people feel?
Aaron
On Tue, 21 Nov 2000, Darius Davidavicius wrote:
> >
> >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
>
>
>
>
>