File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

JMS (Transaction ?) problemen on Weblogic 10.3

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 116
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:


The jms configuration from weblogic:

Any help would be greatly appreciated.

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 116
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.
to the sendFeedback method.
I agree. Here's the link:
subject: JMS (Transaction ?) problemen on Weblogic 10.3
It's not a secret anymore!