>
> so you see:
> 1. setModified()
> 2. ejbLoad
>
> So there is no ejbStore() in between setModified() and ejbLoad()?

Correct.  I also very rarly a javax.ejb.DuplicateKeyException, which happend
to just pop up as I was running these tests.

> I assume you're using commit option 'A'?

Nope, option 'B'.

> > This might be caused by two different threads accessing the bean,
> > so the tx
> > might be confused... but it is my understanding that this should work.
>
> 2 different threads with the same TX?

There is one user thread (one that I new Thread()'d) and then there are the
MDB threads.  The user thread calls a bean method with RequiresNew and all
of the MDB's are Required, so I would assume that each thread has its own tx
context.

They do happend to update one single entity, along with a slew of entities
related to this one.

> Can you be more specific on the transaction boundaries and Threads?  What
> threads of execution do transactions begin and end?  Are the entities
> created in separate transactions or in the same transaction?  Can you draw
> some kind of flow here?

Yikes... I can try.

 1) client -> SLSB

 Creates two entities (a, b), sends one message to a remote JMS queue,
 returns.

 2) MDB -> JMX

 Creates a user-thread and a new SFSB to process the request and starts it.

 3) user-thread -> SFSB (RequiresNew)

 Creates two entities (x, y), updates entity b, sends one message to a
 remote JMS queue.  If this is the last request, then update entities a & b,
 else loop (back to 3)

 4) MDB -> JMX

 Performs some work (outside of a TX), then sends a response message to a
 JMS queue.

 5) MDB

 Updates entities x & y for the corresponding request id.  Updates entity b.
 If this is the last response, then update a & b.

Does that help any?  I am not really sure what the best diagrm would be to
explain what is going on, short of a full blown uml sequence diagram.

Like I said before, each MDB is set to Required.  The (4) MDB tx is only
really used to make sure that the JMX call completed successfully, then it
stops, since this could take longer than the TX time out to complete.

> Can you output the exact order of messages and where the problem is? >

Do you mean log messages or JMS messages?

> > Essentially one user thread invokes a SFSB in a loop.  This bean creates
> > jms messages.  A MDB on another machine does something with the
> > message and
> > sends a response message back.  Then another MDB in the same VM
> > as the SFSB
> > takes the message and updates 3 entities that were created by the SFSB to
> > track the message.
>
> I'm really confused here.  You're going to have to be more specific.  Sorry.

Sorry, I do not mean to confuse you.  Hopefully the above will have cleared
that up for you.

--jason


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to