Joe Weder wrote:
>
> I am evaluating JOnAS 2.3 on RedHat Linux 6.1 using Sun's JDK 1.3. We are
> currently using DB2 7.1 and IBM's JDBC drivers. Things are looking good. I
> am impressed with JOnAS so far.
>
> But, I have a small problem: I have a simple test, that I used successfully
> with BEA Weblogic 5.1, to ensure that I had container managed transactions
> working properly. I revived the test and I am not seeing 'complete'
> rollback.
>
> The test is simple. I have a stateful session bean increment a number in
> TABLE1 and create a new row in TABLE2 in a test method. It does all the DBMS
> work through the appropriate entity beans for each table:
>
> public void testMethod() throws CreateException
> {
> // uncomment the line below to test rollbacks
> String landMine = null;
>
> try
> {
> "ACTION1: contained non-EJB object gets entity bean for desired row
> in TABLE1 to increment a column value"
> "ACTION2: create entity bean for desired row in TABLE2"
> // uncomment the line below to test rollbacks
> landMine.equals("booooom");
> }
> catch(Exception e)
> {
> context.setRollbackOnly();
> throw new CreateException(e.getMessage());
> }
> }
>
> The stateful session bean (shown above) and each of the entity beans are
> deployed with container managed transactions and with transaction attribute
> for all methods set to Required.
>
> The catch is that a contained non-EJB object is called to perform ACTION1 on
> the TABLE1 entity bean.
>
> When the rollback happens the container only rolls back ACTION2 and NOT
> ACTION1.
>
> Please confirm:
> * Any number of interactions with possibly multiple types of entity beans
> can be performed within a container managed transaction and JOnAS will
> completely roll all of it back when an exception is thrown.
>
> * An EJB should be able to call out to a non-EJB object that will call back
> into another EJB object without losing transactional integrity. Under
> Weblogic this works.
>
> Any suggestions?
>
> Thanks in advance.
>
> Joe Weder
> Software Engineer
> Intelligent Computer Systems
> [EMAIL PROTECTED]
> 717.295.7977 x614
>
Hi Joe
I confirm that
Any number of interactions with possibly multiple types of entity beans
can be performed within a container managed transaction and can be
rolled back.
note that the container doesnt not always rollback container transaction
when a exception is thrown, I have already explained the container
behavior when exception occurs in the list.
What do you mean with a contained non-EJB object? can you be more
precise
about ACTION1 in your testMethod?
Regards,
--
Philippe
Philippe Coq Evidian Phone: (33) 04 76 29 78 49
Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".