Re: Transaction problems

2001-07-16 Thread Christian Bagnoli

Dear Philip,

thanks for the help.
The missing trans-attribute is due to a 'cutpaste' error writing
the letter. I'm very interessed to see your working code.

thanks a lot.

Christian
 
- Original Message - 
From: [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 6:14 PM
Subject: Re: Transaction problems


 
 Hi Christian,
 Frankly we have the same problem, trying to access the entity bean
 through a session bean and not being able to rollback. However
 rollback is working perfectly fine in stateful/stateless session bean.
 
 One thing which I noticed in your xml file is that you have not given
 the tranas-attribute 'Required'. You have to do that in order to get
 at least the stateless or stateful beans to work on transactions. E.g.
 do two sql 'inserts' in one session bean in one method and if one
 fails throw EJBException and the rollback happens.
 
 But in the case of an entity bean being accessed by a session bean, if
 the entity throws an EJBException in the ejbStore() that is not being
 caught by the session bean and so the rollback does not occur.
 
 If you want the code for the session beans working with rollback, I
 can send it to you. I have to thank Mr Rob Lapenese for that bit of
 help.
 
 Kind Regards
 Aby Philip
 
 





Transaction problems

2001-07-13 Thread Christian Bagnoli

Hi,

we're implementing an entity bean with transactional (container managed)
methods. This bean is accessed by
a session statefull bean. We have transactional problem when a method fails
(that is throws an EJBException) because orion doesn't rollback the
transaction.
Does anybody figure out how to make orion rollback the transaction?
We have also tried with a session stateless/stateful having the same problem
.
Also implementing the SessionSycronization interface doesn't trap the
transaction
boundaries.

Our data-source.xml is:

data-source
  class=com.evermind.sql.DriverManagerDataSource
  name=SetmoveDS
  location=jdbc/SetmoveDS
  xa-location=jdbc/xa/MySetmoveDS
  ejb-location=jdbc/myEJBDS
  connection-driver=oracle.jdbc.OracleDriver
  username=test
  password=test
  url=jdbc:oracle:thin:test/test@testsun:1521:test
  inactivity-timeout=30
 /

we use orion 1.5.2.

the ejb-jar.xml is:
.
 session
   display-nameLogEntJAR/display-name
   descriptionLogEntJAR/description
   ejb-nameMyLogEnt/ejb-name
   homesetmove.beans.logica.LogEntHome/home
   remotesetmove.beans.logica.LogEnt/remote
   ejb-classsetmove.beans.logica.LogEntEJB/ejb-class
   session-typeStateful/session-type
   transaction-typeContainer/transaction-type
   ejb-ref
ejb-ref-nameMyEntUtente/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homesetmove.beans.logica.EntUtenteHome/home
remotesetmove.beans.logica.EntUtente/remote
   /ejb-ref
  /session
.
  entity
   display-nameEntUtenteJAR/display-name
   descriptionEntUtenteJAR/description
   ejb-nameMyEntUtente/ejb-name
   homesetmove.beans.logica.EntUtenteHome/home
   remotesetmove.beans.logica.EntUtente/remote
   ejb-classsetmove.beans.logica.EntUtenteEJB/ejb-class
   persistence-typeBean/persistence-type
   prim-key-classjava.lang.String/prim-key-class
   reentrantfalse/reentrant
   resource-ref
descriptiondescription/description
res-ref-namejdbc/SetmoveDS/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
   /resource-ref
  /entity
.
container-transaction
method
ejb-nameLogEntEJB/ejb-name
method-name*/method-name
   /method
   method
ejb-nameEntUtenteEJB/ejb-name
method-name*/method-name
   /method
  /container-transaction

thanks a lot.

Christian