The workaround is not to use resource ref for connection factory. However,
whether the transaction commits or rolls back, the message is always sent
and received:(
I am expecting the data not to commit and the message to be never sent when
EnableTwoPhaseCommit is true, resource ref is used or not, and transaction
is rolled back.
I will be more than happy to provide configurations or working code sample
to demonstrate this problem...
Workarounds and suggestions are most welcome.
javax.jms.JMSException: [J2EE:160055]Unable to use a wrapped JMS session in
the transaction because two-phase commit is not available
at
weblogic.deployment.jms.JMSExceptions.getJMSException(JMSExceptions.java:22)
at
weblogic.deployment.jms.WrappedTransactionalSession.enlistInExistingTransact
ion(WrappedTransactionalSession.java:146)
at
weblogic.deployment.jms.WrappedTransactionalSession.enlistInTransaction(Wrap
pedTransactionalSession.java:190)
at
weblogic.deployment.jms.WrappedMessageProducer.send(WrappedMessageProducer.j
ava:124)
at
com.malani.sem.agent.AgentFacadeBean.enqueuePerson(AgentFacadeBean.java:115)
at
com.malani.sem.agent.AgentFacade_6js8s0_EOImpl.enqueuePerson(AgentFacade_6js
8s0_EOImpl.java:46)
at com.malani.sem.agent.AgentFacade_6js8s0_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:353)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
; nested exception is:
javax.jms.JMSException: [J2EE:160055]Unable to use a wrapped JMS session in
the transaction because two-phase commit is not available
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108
)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:284)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:244)
at
com.malani.sem.agent.AgentFacade_6js8s0_EOImpl_811_WLStub.enqueuePerson(Unkn
own Source)
at
com.malani.sem.agent.test.AgentFacadeTest.testProcessPerson(AgentFacadeTest.
java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at
com.intellij.rt.execution.junit.TextTestRunner.main(TextTestRunner.java:12)
Caused by: javax.jms.JMSException: [J2EE:160055]Unable to use a wrapped JMS
session in the transaction because two-phase commit is not available
at
weblogic.deployment.jms.JMSExceptions.getJMSException(JMSExceptions.java:22)
at
weblogic.deployment.jms.WrappedTransactionalSession.enlistInExistingTransact
ion(WrappedTransactionalSession.java:146)
at
weblogic.deployment.jms.WrappedTransactionalSession.enlistInTransaction(Wrap
pedTransactionalSession.java:190)
at
weblogic.deployment.jms.WrappedMessageProducer.send(WrappedMessageProducer.j
ava:124)
at
com.malani.sem.agent.AgentFacadeBean.enqueuePerson(AgentFacadeBean.java:115)
at
com.malani.sem.agent.AgentFacade_6js8s0_EOImpl.enqueuePerson(AgentFacade_6js
8s0_EOImpl.java:46)
at com.malani.sem.agent.AgentFacade_6js8s0_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:353)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
"Carl" <ca...@yahoo.com> wrote in message news:3fec...@newsgroups.bea.com...