Bugs item #551452, was opened at 2002-05-02 10:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=551452&group_id=22866

Category: JBossCMP
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Harris (charris)
Assigned to: Nobody/Anonymous (nobody)
Summary: entity remove fails to clean cache

Initial Comment:
JBoss 2.4.5RC3-Jetty4.0.0
Windows 2K
Sun JDK 1.3.1_03

This is similar to bug 463210 
(http://sourceforge.net/tracker/index.php?
func=detail&aid=463210&group_id=22866&atid=376685) 
except that I get failures when I try to remove 
entities and reinsert when using commit-option A or B. 
Using commit-option C it seems to work.

Test case is attached as a deployable jar with source
(test class is EntityRemoveCache245Test.class). 
Strange behaviour occurs from client code. If I do...

1. create entity with PK 1
2. do stuff on the entity (setXXX)
3. lookup entity (FBPK) and assign remote ref object 
to the results of that lookup
4. remove the entity through the looked-up ref
5. create entity with same PK

(this is the 'testCreateAndRemoveFails') method in the 
test class)

...I get TRYING TO INSERT ALREADY EXISTING BEAN thrown 
at stage 5

--------------------------------------
[ScratchEntity] TRANSACTION ROLLBACK EXCEPTION:
javax.transaction.TransactionRolledbackException: 
INSERTING AN ALREADY EXISTING BEAN, ID = [.1.]; ne
sted exception is:
        java.lang.IllegalStateException: INSERTING AN 
ALREADY EXISTING BEAN, ID = [.1.]
java.lang.IllegalStateException: INSERTING AN ALREADY 
EXISTING BEAN, ID = [.1.]
        at 
org.jboss.ejb.plugins.AbstractInstanceCache.insert
(AbstractInstanceCache.java:218)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeH
ome(EntityInstanceInterceptor.java
:161)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome
(EntityLockInterceptor.java:97)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext
(TxInterceptorCMT.java:142)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:347)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome
(TxInterceptorCMT.java:86)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome
(SecurityInterceptor.java:102)
        at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome
(LogInterceptor.java:103)
        at org.jboss.ejb.EntityContainer.invokeHome
(EntityContainer.java:429)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.
invokeHome(JRMPContainerInvoker.ja
va:389)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:236)
        at sun.rmi.transport.Transport$1.run
(Transport.java:147)
        at java.security.AccessController.doPrivileged
(Native Method)
        at sun.rmi.transport.Transport.serviceCall
(Transport.java:143)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:479)
--------------------------------

Yet if I replace stage 3 and 4 with

3. Create a new remote ref obj and assign the result 
of the FBPK to it
4. Delete the original entity through the original 
remote ref

(this is 'testCreateAndRemoveSucceeds' method in the 
test class)

It all works fine, regardless of commit-option.

I've got a number of other problems all based around 
this, and all related to usage of findByPrimaryKey and 
remove(). Looks to me like it's being removed from the 
database (I've checked this v. thoroughly) but not 
from the cache.

I've tried this with Hypersonic and with MSSQL with 
identical results.

Note: this all works just fine in JBoss 2.4.4

----------------------------------------------------------------------

>Comment By: Bill Burke (patriot1burke)
Date: 2002-05-02 10:34

Message:
Logged In: YES 
user_id=176497

can you verify with 2.4.5RC2?  Thanks.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=551452&group_id=22866

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to