EJB 1PC errors with EJB's

M

Mark

Hi.

I am trying using a session ejb to write to a DB2 database and also
call another session bean which updates another db2 database.
The second session bean is called within the transaction of the first
session bean.

The method being called is marked as TX_NOT_SUPPORTED. Upon commit i
am getting "Illegal use of 1PC resource in transaction".
Reading various manuals my understanding is that the first transaction
will be suspended when the call is made to the second session bean
(since not supported is set on its methods). Once this second ejb
returns the transaction resumes.

According to the redbook SG246144 EJB Development for VAJAVA (page
223) TX_NOT_SUPPORTED will allow methods to run outside an existing
transaction context. Once they are completed the transaction is
resumed.
This is exactly what we are trying in WAS4.

The second ejb is logging messages to a separate database and its
success etc should not rollback the first transaction. I would prefer
not to use 2pc resources for performance reasons. I would have thought
i didnt need to based on what i have read so far anyhow.

Any one have any ideas ? ie why this is happening or advice on a
better way to log these messages without causing transaction issues?

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top