wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes JMS (Transaction ?) problemen on Weblogic 10.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS (Transaction ?) problemen on Weblogic 10.3" Watch "JMS (Transaction ?) problemen on Weblogic 10.3" New topic
Author

JMS (Transaction ?) problemen on Weblogic 10.3

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 100
Hallo, I have an application which implements asynch communication between the web and business layer using JMS.
On a page a user can upload files, which are processed by the backend. For large files this can be a long running process, thats why we use JMS to send the file asynchronously and use JMS to update progress information on the page.
The application works fine on JBoss 6 with HornetMQ.
After porting to Weblogic I see consistently a strange phenomenon. The update messages from the processing backend logic are send as expected. But the receiver does not receive one message after another but receives all the messsages almost at once after only the producer has sent the last message.
For me this is totally unexpected behavior and of course our progress bar on the page does not work properly, but merely jumps from 0 to 100% after the data has been processed.
It looks like the consumer waits until the producer has finished its transaction. But how can this be possibly? I have learned that transaction never span producer - messagesystem - consumer.

Example Code:
Producer:



Consumer:


The jms configuration from weblogic:


Any help would be greatly appreciated.

Hans
Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 100
OK I have found the solution. If you create a nontransacted JMS session in a context which already has a transaction running Weblogic assumes that you want the JMS session to particiate in an XA transaction. :-0
Since I do have an TX (default TransactionAtttribute(REQUIRED)) in my EJB, Weblogic creates a transacted session anyway.
Solution:
Add
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
to the sendFeedback method.
 
 
subject: JMS (Transaction ?) problemen on Weblogic 10.3
 
Similar Threads
MDB deployment on JBoss
How to use Hornet Q in JBoss 6.0 Final
JMS Message Destination Reference Exception
Why this compiles in Sun App Server but not JBOSS
ActiveMQ dynamic queues