Bugs item #530627, was opened at 2002-03-16 00:15
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=530627&group_id=22866

Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Mac (macearl)
Assigned to: Nobody/Anonymous (nobody)
Summary: ejbStore invoked after ejbRemove on BMP

Initial Comment:
Win2000
JDK 1.3.1_01

I'm doing a BMP test - I'd sumbit the source, but it's 
not mine to give :( - I invoked the remove on the 
EJBObject.remove() method on a bean, and after the 
bean is successfully removed the ejbStore operation is 
performed, which causes an exception since the object 
is no longer available in the database. It kind of 
goes without saying that this is a spec compliance 
issue as well (since ejbStore should not be invoked 
after an ejbRemove operation).

The whole think appears to happen in the same 
transaction context, because the when I review the 
hypersonic database script my removed entity is still 
there. I'm presuming that the entity is removed and 
then the failed store operation throws an 
EJBException, which causes the transaction to be 
rolled back. I'm using the default database 
configuration.

I was able to put this all together by logging the 
invocation of logging methods to System.out. Note the 
error message "Invalid update rowcount on customer." 
That's my custom message saying that the store 
operation did not effect exactly 1 row in the 
database. Here's the relevant portion of the trace.

2002-03-15 23:55:34,334 INFO  [STDOUT] EJBStore 
executing
2002-03-15 23:55:34,334 INFO  [STDOUT] ejbStore 
completed successfully.
2002-03-15 23:55:34,354 INFO  [STDOUT] getting first 
name
2002-03-15 23:55:34,354 INFO  [STDOUT] EJBStore 
executing
2002-03-15 23:55:34,354 INFO  [STDOUT] ejbStore 
completed successfully.
2002-03-15 23:55:34,384 INFO  [STDOUT] EJBStore 
executing
2002-03-15 23:55:34,384 INFO  [STDOUT] ejbStore 
completed successfully.
2002-03-15 23:55:34,394 INFO  [STDOUT] EJBStore 
executing
2002-03-15 23:55:34,404 INFO  [STDOUT] ejbStore 
completed successfully.
2002-03-15 23:55:34,414 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountH
olderEJB.findByIdentity] Executing SQL: SELECT 
t0_owner.clientId, t0_owner.createDate FROM 
AccountHolderEJB t0_owner WHERE t0_owner.username = ? 
AND t0_owner.password = ?
2002-03-15 23:55:34,434 INFO  [STDOUT] EJBRemove 
executing.
2002-03-15 23:55:34,434 INFO  [STDOUT] EJBRemove 
completed successfully.
2002-03-15 23:55:34,444 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQue
ry.AccountEJB.findByPrimaryKey] Executing SQL: SELECT 
accountId, createDate FROM AccountEJB WHERE 
accountId=? AND createDate=?
2002-03-15 23:55:34,444 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.A
ccountHolderEJB] Executing SQL: SELECT firstName, 
lastName, emailAddress, username, password, address 
FROM AccountHolderEJB WHERE (clientId=? AND 
createDate=?)
2002-03-15 23:55:34,454 INFO  [STDOUT] EJBStore 
executing
2002-03-15 23:55:34,514 ERROR 
[org.jboss.ejb.GlobalTxEntityMap] Store failed on 
entity: 
com.sextanttech.entities.interfaces.AccountHolderKey@4c
1dbbf7
javax.ejb.EJBException: Invalid update row count on 
customer.
        at 
com.sextanttech.entities.implementations.AccountHolderB
MPBean.ejbStore(AccountHolderBMPBean.java:150)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at 
org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity
(BMPPersistenceManager.java:455)
        at org.jboss.ejb.EntityContainer.storeEntity
(EntityContainer.java:676)
        at org.jboss.ejb.GlobalTxEntityMap.syncEntities
(GlobalTxEntityMap.java:177)
        at 
org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanu
p.beforeCompletion(GlobalTxEntityMap.java:315)
        at org.jboss.tm.TxCapsule.doBeforeCompletion
(TxCapsule.java:1317)
        at org.jboss.tm.TxCapsule.rollback
(TxCapsule.java:430)
        at org.jboss.tm.TransactionImpl.rollback
(TransactionImpl.java:88)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:180)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
        at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
        at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:474)
        at org.jboss.ejb.Container.invoke
(Container.java:681)
        at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:1003)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1555)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:364)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:241)
        at sun.rmi.transport.Transport$1.run
(Transport.java:152)
        at java.security.AccessController.doPrivileged
(Native Method)
        at sun.rmi.transport.Transport.serviceCall
(Transport.java:148)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:465)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:706)
        at java.lang.Thread.run(Thread.java:484)


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

>Comment By: Mac (macearl)
Date: 2002-03-18 21:38

Message:
Logged In: YES 
user_id=479685

One of these things is not like the other...can you guess 
which one it is? ;)

There are some stray debug statements from an asynchronous 
process in the middle of my system log. The comments from 
the CMP module, quoted below, do not belong. Just wanted to 
mention this as these stray debug comments are missleading, 
and sorry I didn't edit them out before. Here they are:

2002-03-15 23:55:34,444 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQue 
ry.AccountEJB.findByPrimaryKey] Executing SQL: SELECT 
accountId, createDate FROM AccountEJB WHERE 
accountId=? AND createDate=? 
2002-03-15 23:55:34,444 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.A 
ccountHolderEJB] Executing SQL: SELECT firstName, 
lastName, emailAddress, username, password, address 
FROM AccountHolderEJB WHERE (clientId=? AND 
createDate=?) 

I am currently investigating this issue and will post a 
patch if I can isolate the problem. - Mac

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

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

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

Reply via email to