Hi,
> I have the following in the same method inside a session bean
>
> 1 - Get a datasource using the EJB Datasource lookup
This is the correct way to do it. Are your ejb's using the EJB
Datasource lookup? Check in you orion-ejb.xml
> What is happening is that the JDBC call is not using the same transaction as
> the Entity bean and this is causing a deadlock. The Entity bean call is
> waiting on the JDBC statements to be commited. But these statements will not
> be commited until the entity bean finishes the delete.
I do something similar. I have an session bean that 'Requires' a
transaction, and my EJB's are set to 'Supports'.
Within that transaction, I do an insert using jdbc, I stuff around with
some entity beans, and then I stuff around with the jdbc connection some
more.
What's even cooler is in another method I process some credit cards, and
if this fails we throw the appropriate exception. Effectively the whole
transaction gets rolled back.
> I thought that since both session bean and entity bean are declared as
> REQUIRE for transaction in the ejb-jar.xml that they would automatically be
> inside the same transaction.
That's correct, so it should work. Just double check that your EJB's and
the JDBC are using the same datasource.
> Is this a bug or is there something that I am missing?
Good luck :)
> Eduardo
>
>
--
Adam Cassar
Technical Development Manager
___________________________________________
NetRegistry http://www.netregistry.au.com
Tel: +61 2 9641 8609 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia