According to section 17.3.5 or the EJB spec, "a JMS message is not
delivered to its final destination until the transaction commits."  I'm
seeing evidence to the contrary using JBoss 3.0.3.  Here's my scenario:

1) JMS client posts a message to queue, Q1.  The message has its
JMSReplyTo property set to an instance of a TemporaryQueue, Q2.  The
client then blocks waiting for two messages on Q2.

2) An MDB receives the message from Q1.  It's onMessage does three
things:
  2a) Posts a status message back to Q2
  2b) Creates a CMP entity bean.
  2c) Posts another message to Q2 that contains the entity bean's
primary key.

3) Upon receipt of those two messages the client attempts to find the
newly created entity bean.

I haven't declared any special trans-attributes on any beans involved --
I assume the default is "Required"?

My problem is that the client in step 3 occasionally cannot find the
newly created bean.  The client always receives the two messages within
a second or so, and I'd say 80% of the time can find the new bean.

While investigating the problem, I came across the quote from 17.3.5,
and noticed that my client receives the first message before the entity
bean gets created.  According to the spec, those messages shouldn't be
delivered until onMessage completes, right?

Sorry for the long-winded message, but I need to know why I can't find
my bean all the time.  It should be there if my client gets the second
message, right?

Thanks,
Jim




-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to