-
1. Re: publish messages and ignore current transaction?
genman Nov 3, 2003 12:45 PM (in response to drcharris)
How do you obtain your QueueSession?
This will create a queue session that is not transacted. (It shouldn't matter if you use java:/JmsXA for this.)
QueueConnection.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
(replace Queue with Topic for publishing.) -
2. Re: publish messages and ignore current transaction?
drcharris Nov 3, 2003 12:53 PM (in response to drcharris)Yes that's how we do it (but for Topics).
In fact inside our ejb method we make multiple calls to a convenience method that gets the connection, creates a session, publisher etc, then publishes the message and closes eveything down.
The session is definitely non-transacted in the JMS sense - but that's not the problem. It's the pre-existing JTA transaction that is holding up the messages in the JMS server so they don't get sent until the JTA transaction commits.
I'm at home now so don't have the code - will post tomorrow morning. -
3. Re: publish messages and ignore current transaction?
adrian.brock Nov 3, 2003 1:41 PM (in response to drcharris)If you use java:/JmsXA it will be part of the transaction.
If you use java:/ConnectionFactory it ill not.
Regards,
Adrian -
4. Re: publish messages and ignore current transaction?
drcharris Nov 17, 2003 9:00 AM (in response to drcharris)Yes that's what I thought.
Turns out that we had a threading issue on the client, which is a Delphi-JIntegra program and couldn't handle the callbacks properly so bunched them all up.
Thanks for the help.