Hello everybody,

I have two threads executing a findby.... method (from an entity bean) almost at the 
same time in a STATELESS session bean but one of them is deleting a record in the 
database. Thus, the other one complains with the following error:

javax.ejb.NoSuchObjectLocalException: Entity not found: 
primaryKey=11e1813-fbd1ae2521-b88d8e8d57a53bc420279153d2e46f6f
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:158)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
...

I have declared all my finder methods from the entity bean and the method that calls 
these finders in the STATELESS session bean to be transaction type "Required" and NOT 
read only.

I thought that if a method is not read-only then only one thread can execute at one 
time (Transaction locking).

How can I accomplish that?

Thanks in advance,

jchang
By the way, I am using JBoss 3.2.1 and EJB 2.0



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830220#3830220

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830220


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to