Hi,

I'm having a problem while accessing a stateful session bean.

Let's say the client calls a business method on the session bean, which
updates an entity object.
While updating the entity bean an EJBException is thrown by the bean
provider, wrapping an application exception indicating more details on
failure.(per spec).

So far.. so good !!!!, the EjbException is propagated to the client which
gets the application exception by calling getCausedByException(),the
transaction has been marked "rollback only".

The client finishes with the session bean method, the transaction should
have been rolled back at this point (or is it?).

Now when attempting calling another business method on the session, the
following  exception is thrown:


[StatefulBean] TRANSACTION ROLLBACK EXCEPTION:Application Error: no concurre
nt calls on stateful beans; nested exception is:
        java.rmi.RemoteException: Application Error: no concurrent calls on
stat
eful beans
[StatefulBean] java.rmi.RemoteException: Application Error: no concurrent ca
lls on stateful beans
[StatefulBean]      at org.jboss.ejb.plugins.StatefulSessionInstanceIntercep
tor.invoke(StatefulSessionInstanceInterceptor.java:186)


Should the container rollback the transaction after the client handles the
EJBException? or am I missing something??

Thanks,

Miguel.

-----Original Message-----
From: Ingo Bruell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 9:48 AM
To: jboss-user
Subject: [jBoss-User] TransactionRolledbackException


Hi,

the following Exception is thrown on the server:

<exception>
[Mandant] TRANSACTION ROLLBACK EXCEPTION:Can't remove bean with id =
de.oblgmbh.
meta.interfaces.MandantPK@1: it isn't in the cache.; nested exception is:
        java.lang.IllegalStateException: Can't remove bean with id =
de.oblgmbh.
meta.interfaces.MandantPK@1: it isn't in the cache.
[Mandant] java.lang.IllegalStateException: Can't remove bean with id =
de.oblgmb
h.meta.interfaces.MandantPK@1: it isn't in the cache.
[Mandant]       at
org.jboss.ejb.plugins.EnterpriseInstanceCache.remove(Enterpri
seInstanceCache.java:142)
[Mandant]       at
org.jboss.ejb.plugins.EntityInstanceCache.remove(EntityInstan
ceCache.java:64)
[Mandant]       at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(Entity
InstanceInterceptor.java:211)
[Mandant]       at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
orCMT.java:133)
[Mandant]       at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
InterceptorCMT.java:263)
[Mandant]       at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
T.java:99)
[Mandant]       at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
rceptor.java:144)
[Mandant]       at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
va:192)
[Mandant]       at
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:322
)
[Mandant]       at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
(JRMPContainerInvoker.java:163)
[Mandant]       at java.lang.reflect.Method.invoke(Native Method)
[Mandant]       at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
a:241)
[Mandant]       at sun.rmi.transport.Transport$1.run(Transport.java:142)
[Mandant]       at java.security.AccessController.doPrivileged(Native
Method)
[Mandant]       at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[Mandant]       at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
t.java:443)
[Mandant]       at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
ransport.java:643)
[Mandant]       at java.lang.Thread.run(Thread.java:484)
</exception>

What I have done:
1. call findAll() on an EntityBean
2. call a getter method on each of the retrieved beans.
The Exception happens on the first bean in the Vector and the getter from
the bean is called directly after i have got the Collection from findAll().

I haved looked ten times to my code but i can not find any mistake...

CU

---
Ingo Bruell
OBL GmbH ([EMAIL PROTECTED])
Hude (Oldenburg)
Germany


CU

---
Ingo Bruell
OBL GmbH ([EMAIL PROTECTED])
Hude (Oldenburg)
Germany



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to