This is most likely caused by Orion not recognizing transaction affinity.
CMP connections are taken from ejb-location, and the other connections
you're using are from either the non transactional pool (location) or XA
(xa-location). These pools are unaware of each other. Also, TX affinity is
handled on a per thread basis, so issuing JDBC commands directly from the
Web Server won't enrole these within the same transaction as the ones fired
from the app-server. Eduardo, if you can ellaborate further, we can provide
more assistance (and gain some know how in the process ;-)

JP

> -----Original Message-----
> From: Andre Vanha [mailto:[EMAIL PROTECTED]]
> Sent: Viernes, 25 de Mayo de 2001 14:15
> To: Orion-Interest
> Subject: RE: Serious problem with Orion transaction 
> processing: multiple
> c onnecti
> 
> 
> Interesting problem.  It could be that there is a bug in 
> orion, but since
> this problem is so likely to happen anytime you use multiple 
> connections I
> would suspect the problem was taken care of.
> 
> A couple of hints:
> 
> From which context are you executing your JDBC calls?  
> Servlet or EJB?  How
> are you retrieving the connection?  Dirver Manager or JNDI?  
> You should be
> using JNDI, and if you are,  you should be using the 
> EJBPooled location, to
> ensure transactional integrity with CMP transactions.  Also if you are
> executing JDBC calls from EJB, you should be defining and 
> using a resource
> reference in your assembly descriptor.
> 
> Andre
> 
> 
> 
> -----Original Message-----
> From: Eduardo Estefano [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 25, 2001 9:49 AM
> To: Orion-Interest
> Cc: Orion-Interest (E-mail)
> Subject: SV: Serious problem with Orion transaction 
> processing: multiple
> c onnecti
> 
> 
> Using 1.4.5 with Oracle 8i and jdk1.3.1
> 
> The problem we are finding is that when orion starts a 
> transaction, it does
> not necessarily executes all DB commands within the same database
> transaction.
> 
> The end result is a deadlock in the database.
> 
> I'm having a problem executing a delete command that does a 
> delete on child
> tables using JDBC and finally, a delete in the parent table using
> entityBean.remove().
> 
> I tested the code two ways. 
> 
> The first, with no constraints on the database and the delete 
> works fine.
> 
> The second, with foreign key constraings, causes a deadlock, where the
> parent delete is waiting on the child deletes to commit. But 
> this commit
> will not happen until the parent is deleted.
> 
> I was able to duplicate the problem manually, opening two 
> connections to the
> database and issuing SQL statements. Off course, if I was doing this
> manually, I would put both statements in the same transaction.
> 
> Here are my questions now:
> -     Is it not allowed in EJB to mix JDBC and CMP Entity calls in the
> same transaction?
> 
> 

Reply via email to