|
From: Les A. H. <le...@ha...> - 2004-06-28 19:18:46
|
Hiya folks,
I was wondering if anyone had any thoughts on when the JMS components would be
integrated into a Spring release? I'm not looking for any specific
dates...just a ballpark figure (and yes, I know that this is an Open Source
product, so I take ballpark figures with a grain of salt...I'm just looking for
something, anything).
Also, I was wondering if anyone could help me out with some insight....
Here's my issue:
An EJB method is called from a remote client. In response to that method call,
some data is processed, saved back to the db, and then a JMS message is
published to all clients who care about that data. The data is not committed
until the end of the transaction.
The JMS message is received by a client which then immediately requests the data
that was just updated.
Occasionally, when the client requests this data, it doesn't get what it
expects. The reason for this is that we think the client is making a request
for the data before the first transaction has had a chance to commit/flush.
So, basically, we'd like to sync the JMS sending to only send upon transaction
commit, to ensure that the data will be in the db by the time the clients
request it.
I tried setting the JMS transacted attribute to true when creating a topic
session,
i.e.
topicSession =
topicConnection.createTopicSession(true, Session.AUTO_ACKNOWLEDGE );
After reading the JMS spec, this is all that should be necessary when
participating in transactions in a J2EE container.
However, we're seeing that the client's don't receive _any_ messages from the
server when set to true. When set to false, the messages are being sent, but
that synchronization issue pops its head up.
Does anyone have any insights on why this is happening?
Also, does the Spring JMS support in the sandbox already work with integrating
into transactions, like the Spring Hibernate support does?
Any ideas would be graciously received.
Regards,
Les
|