geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gianny DAMOUR (JIRA)" <...@geronimo.apache.org>
Subject [jira] Reopened: (GERONIMO-580) CMP create, remove, and recreate throws org.tranql.cache.DuplicateIdentityException
Date Wed, 02 Mar 2005 14:16:48 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-580?page=history ]
     
Gianny DAMOUR reopened GERONIMO-580:
------------------------------------


The fix does not work in the following scenario:
* the first create generates an INSERT statement;
* the remove generates a DELETE statement; and
* the second create generates an UPDATE statement.

This last operation is wrong in this specific scenarion: an INSERT should be generated instead.

However, in a remove-recreate scenario an UPDATE should be generated.

> CMP create, remove, and recreate throws org.tranql.cache.DuplicateIdentityException
> -----------------------------------------------------------------------------------
>
>          Key: GERONIMO-580
>          URL: http://issues.apache.org/jira/browse/GERONIMO-580
>      Project: Geronimo
>         Type: Bug
>   Components: OpenEJB
>     Versions: 1.0-M3
>     Reporter: Dain Sundstrom
>     Assignee: Gianny DAMOUR
>      Fix For: 1.0-M4

>
> Creating a CMP bean removing it and recreating a bean with the same identity in a single
transaction causes tranql to throw a org.tranql.cache.DuplicateIdentityException.  This should
not throw an exception in this case because the previously existing bean has already been
removed.  
> Further, if the code happens throws this exception for a valid reason, it should not
be propagated back to the client as a system exception; instead the client should get javax.ejb.DuplicateKeyException..
> java.rmi.RemoteException: org.tranql.cache.AlreadyAssociatedException; nested exception
is: 
> 	org.tranql.cache.DuplicateIdentityException: org.tranql.cache.AlreadyAssociatedException
> 	at org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:132)
> 	at org.openejb.proxy.EntityEJBHome$$EnhancerByCGLIB$$21abc7d9.create(<generated>)
>         <snip/>
> Caused by: org.tranql.cache.DuplicateIdentityException: org.tranql.cache.AlreadyAssociatedException
> 	at org.tranql.cache.CacheTable.addRow(CacheTable.java:90)
> 	at org.openejb.entity.cmp.CMPCreateMethod.execute(CMPCreateMethod.java:187)
> 	at org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
> 	at org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java:56)
> 	at org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java:81)
> 	at org.openejb.entity.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:125)
> 	at org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheInterceptor.java:82)
> 	at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:123)
> 	at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
> 	at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
> 	at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:221)
> 	at org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:123)
> 	... 31 more
> Caused by: org.tranql.cache.AlreadyAssociatedException
> 	at org.tranql.cache.InTxCache.associate(InTxCache.java:43)
> 	at org.tranql.cache.CacheTable.addRow(CacheTable.java:88)
> 	... 42 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message