1 Reply Latest reply on Feb 12, 2002 4:58 AM by Steve Webster

    Using entity bean from MDB

    Steve Webster Newbie

      Hi

      I'm using:
      JBoss Release 2.4.4 - MySQL Release - 3.23.27

      I'm calling a container managed entity bean from a MDB.

      When I send a single message everything works ok.
      When I send two messages at the same time I get the following exception from the findByPrimaryKey

      Each message is directed at a different PK although its the same table. One works one fails.... anybody seen this ?

      [13:34:42,859,Default] getPK Paddington Station
      [13:34:42,859,Default] javax.ejb.ObjectNotFoundException: Object with primary key Paddington Station not found in storage
      [13:34:42,919,Default] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.findByPrimaryKey(JDBCFindEntityCommand.java:89)
      [13:34:42,919,Default]
      [13:34:42,929,Default] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:59)
      [13:34:42,939,Default]
      [13:34:42,939,Default] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntity(JAWSPersistenceManager.java:136)
      [13:34:42,949,Default]
      [13:34:42,949,Default] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:294)
      [13:34:42,959,Default]
      [13:34:42,959,Default] at org.jboss.ejb.EntityContainer.find(EntityContainer.java:610)
      [13:34:42,969,Default]
      [13:34:42,969,Default] at java.lang.reflect.Method.invoke(Native Method)
      [13:34:42,979,Default]
      [13:34:42,979,Default] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:859)
      [13:34:42,989,Default]
      [13:34:42,989,Default] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:234)
      [13:34:42,999,Default]
      [13:34:42,999,Default] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:147)
      [13:34:43,009,Default]
      [13:34:43,009,Default] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:97)
      [13:34:43,019,Default]
      [13:34:43,019,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:142)
      [13:34:43,029,Default]
      [13:34:43,029,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      [13:34:43,039,Default]
      [13:34:43,039,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      [13:34:43,049,Default]
      [13:34:43,049,Default] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
      [13:34:43,059,Default]
      [13:34:43,059,Default] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:103)
      [13:34:43,069,Default]
      [13:34:43,069,Default] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:421)
      [13:34:43,079,Default]
      [13:34:43,089,Default] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:456)
      [13:34:43,099,Default]
      [13:34:43,099,Default] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:237)
      [13:34:43,109,Default]
      [13:34:43,109,Default] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
      [13:34:43,119,Default]
      [13:34:43,119,Default] at $Proxy46.findByPrimaryKey(Unknown Source)
      [13:34:43,129,Default]
      [13:34:43,129,Default] at com.hometest.facade.AruFacade.getPK(Unknown Source)
      [13:34:43,129,Default]
      [13:34:43,139,Default] at com.hometest.facade.AruFacade.get(Unknown Source)
      [13:34:43,139,Default]
      [13:34:43,139,Default] at com.hometest.facade.TaskFacade.createScheduled(Unknown Source)
      [13:34:43,149,Default]
      [13:34:43,149,Default] at com.hometest.facade.TaskFacade.createScheduled(Unknown Source)
      [13:34:43,159,Default]
      [13:34:43,159,Default] at com.hometest.mdb.ScheduledTask.onMessage(Unknown Source)
      [13:34:43,169,Default]
      [13:34:43,169,Default] at java.lang.reflect.Method.invoke(Native Method)
      [13:34:43,179,Default]
      [13:34:43,179,Default] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:406)
      [13:34:43,189,Default]
      [13:34:43,189,Default] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:81)
      [13:34:43,199,Default]
      [13:34:43,199,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      [13:34:43,209,Default]
      [13:34:43,209,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      [13:34:43,219,Default]
      [13:34:43,219,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      [13:34:43,229,Default]
      [13:34:43,229,Default] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      [13:34:43,249,Default]
      [13:34:43,249,Default] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      [13:34:43,259,Default]
      [13:34:43,259,Default] at org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:281)
      [13:34:43,269,Default]
      [13:34:43,269,Default] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:584)
      [13:34:43,279,Default]
      [13:34:43,279,Default] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:930)
      [13:34:43,289,Default]
      [13:34:43,289,Default] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:233)
      [13:34:43,299,Default]
      [13:34:43,299,Default] at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:565)
      [13:34:43,309,Default]
      [13:34:43,309,Default] at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
      [13:34:43,320,Default]
      [13:34:43,320,Default] at org.jboss.mq.SpySession.run(SpySession.java:248)
      [13:34:43,330,Default]
      [13:34:43,330,Default] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
      [13:34:43,340,Default]
      [13:34:43,340,Default] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:725)
      [13:34:43,350,Default]
      [13:34:43,350,Default] at java.lang.Thread.run(Unknown Source)
      [13:34:43,360,Default]


      Regards

      Steve