Hi, I'm using SessionContext.getObject() for internal transaction
creation in my stateless session bean.
Thirst method with <trans-attribute>Never</trans-attribute> invokes second
method of the same bean through SessionContext.getObject()
that trans-attribute is "Required". The operation throws exception:
14:18:44,466 ERROR [STDERR] java.rmi.ServerException: xaRes not enlisted;
nested
exception is:
java.lang.IllegalArgumentException: xaRes not enlisted
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:119)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:242)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.inv
oke(SecurityInterceptor.java:129)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke(L
ogInterceptor.java:166)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer.invok
e(StatelessSessionContainer.java:313)
14:18:44,466 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java
:705)
14:18:44,466 ERROR [STDERR] at
org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:491)
14:18:44,466 ERROR [STDERR] at
org.jboss.invocation.local.LocalInvoker.invok
e(LocalInvoker.java:98)
14:18:44,466 ERROR [STDERR] at
org.jboss.invocation.InvokerInterceptor.invok
e(InvokerInterceptor.java:102)
14:18:44,466 ERROR [STDERR] at
org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:73)
14:18:44,466 ERROR [STDERR] at
org.jboss.proxy.SecurityInterceptor.invoke(Se
curityInterceptor.java:76)
14:18:44,466 ERROR [STDERR] at
org.jboss.proxy.ejb.StatelessSessionIntercept
or.invoke(StatelessSessionInterceptor.java:111)
14:18:44,466 ERROR [STDERR] at
org.jboss.proxy.ClientContainer.invoke(Client
Container.java:76)
14:18:44,466 ERROR [STDERR] at $Proxy153.setElement_x(Unknown Source)
//Second method--------------
14:18:44,476 ERROR [STDERR] at
com.ezan.Session.PeoBean.setElement(PeoBean.j // First method--------------
ava:680)
14:18:44,476 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
14:18:44,476 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccessorImpl.java:39)
14:18:44,476 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
14:18:44,476 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:3
24)
14:18:44,476 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer$Conta
inerInterceptor.invoke(StatelessSessionContainer.java:664)
14:18:44,486 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedCo
nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.StatelessSessionInstanc
eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:96)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:242)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.inv
oke(SecurityInterceptor.java:129)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke(L
ogInterceptor.java:166)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer.invok
e(StatelessSessionContainer.java:313)
14:18:44,486 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java
:705)
14:18:44,486 ERROR [STDERR] at
org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:491)
14:18:44,486 ERROR [STDERR] at
org.jboss.invocation.jrmp.server.JRMPInvoker.
invoke(JRMPInvoker.java:362)
14:18:44,486 ERROR [STDERR] at
sun.reflect.GeneratedMethodAccessor23.invoke(
Unknown Source)
14:18:44,486 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
14:18:44,486 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:3
24)
14:18:44,486 ERROR [STDERR] at
sun.rmi.server.UnicastServerRef.dispatch(Unic
astServerRef.java:261)
14:18:44,486 ERROR [STDERR] at
sun.rmi.transport.Transport$1.run(Transport.j
ava:148)
14:18:44,486 ERROR [STDERR] at
java.security.AccessController.doPrivileged(N
ative Method)
14:18:44,486 ERROR [STDERR] at
sun.rmi.transport.Transport.serviceCall(Trans
port.java:144)
14:18:44,486 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport.handleMess
ages(TCPTransport.java:460)
14:18:44,486 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport$Connection
Handler.run(TCPTransport.java:701)
14:18:44,486 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
14:18:44,496 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException:
xaRes
not enlisted
14:18:44,496 ERROR [STDERR] at
org.jboss.tm.TxCapsule.delistResource(TxCapsu
le.java:546)
14:18:44,496 ERROR [STDERR] at
org.jboss.tm.TransactionImpl.delistResource(T
ransactionImpl.java:93)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.LocalTxC
onnectionManager$LocalConnectionEventListener.delist(LocalTxConnectionManage
r.ja
va:347)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.LocalTxC
onnectionManager.managedConnectionDisconnected(LocalTxConnectionManager.java
:272
)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConn
ectionManager2.disconnect(BaseConnectionManager2.java:627)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedCo
nnectionManager.disconnect(CachedConnectionManager.java:358)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedCo
nnectionManager.pushMetaAwareObject(CachedConnectionManager.java:126)
14:18:44,496 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedCo
nnectionInterceptor.invoke(CachedConnectionInterceptor.java:183)
14:18:44,496 ERROR [STDERR] at
org.jboss.ejb.plugins.StatelessSessionInstanc
eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
14:18:44,496 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:96)
14:18:44,496 ERROR [STDERR] ... 41 more
1)Why JBoss think it has some transaction though TransactionManager in first
method correctly reports NO_TRANSACTION...
2)Why it tries to free/suspend(how I can understand) some resource though my
first method dosen't enlist any resources at all-
the method dosen't contains any DataSource.getConnection()- what resource it
tries to "delist".
3)Why JBoss talk about "xaRes" though I'm not using any "XA"
resources/connections- my oracle configured through Local resource manager.
//----------------------------------------------------
Excerpt from org.jboss.tm.TxCapsule.
boolean delistResource(XAResource xaRes, int flag)
throws IllegalStateException, SystemException
{
//....
try
{
lock();
if (trace)
{
log.trace("delistResource(): Entered, tx=" +
toString() + " status=" + getStringStatus(status));
}
int idx = findResource(xaRes);
if (idx == -1)
throw new IllegalArgumentException("xaRes not enlisted");//
Exception----------------------
//...
This problem arise only if I call second method from the bean itself but
direct remote invocation works well.
Thanks in advice.
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user