on 05-06-2009 10:55 AM
Hi,
I have problem in EJB3.0 JTA Transaction,
Issue: Stateless session bean3.0 executes its method succesfully for the first time,when again the method is called i hit error attached below (it says the transaction should be active, but it is STATUS_COMMITTED = 3.)
It looks we need to have a new transaction whenever the webmethod/ejb method is called.
I tried with user transaction without any luck.
http://help.sap.com/saphelp_nw04/helpdata/de/f6/7a8df922db4ab79342b46c48dac7d0/content.htm
My scenario is,
I have damean thread listening(EventDispatcher) for MDM record change and it calls the method from ejbsession bean by lookup to transfer the record to PI7.1 system via webservices(web method).
Exception com.sap.engine.services.ts.exceptions.BaseIllegalStateException: Status of ( SAP J2EE Engine JTA Transaction : 06223ffffffa20048fffffffe ) should be active, but it is STATUS_COMMITTED = 3.
at com.sap.engine.services.ts.jta.impl.TransactionImpl.registerSynchronizationWithoutStatusChecks(TransactionImpl.java:672)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.registerSynchronization(TransactionImpl.java:641)
at com.sap.engine.services.ts.transaction.TxLevelSynchronizations.addSynchronization(TxLevelSynchronizations.java:118)
at com.sap.engine.services.ts.transaction.TxManagerImpl.registerSynchronization(TxManagerImpl.java:829)
at com.sap.transaction.TxManager.registerSynchronization(TxManager.java:303)
at com.sap.engine.messaging.runtime.j2ee.sapengine.SAPTransactionManager.registerSynchronization(SAPTransactionManager.java:126)
at com.sap.engine.messaging.impl.util.tx.TxController.<init>(TxController.java:83)
How do i make the JTA transaction status to active again?
Thanks
Sabarinathan
Hello everybody,
The issue resolved,we need to have the bean management transaction type and not the container.
and the transactionattribute value as Requires New
rgds
Sabarinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May be i have not mention the issue clearly.Let me know mention the issue with details.
I have a MDMListener (using MDMPI) which looks for a recordchange in MDM repository which needs to be send to PI7.1 via soap request.
1) I had imported the WSDL from ESR(PI) and generated outside-in proxy.
2) Created ejb3.0 stateless session bean using NWDS
3) Created web service client application by generating the WSDL again (by Generate client)
4)Added a method callPI()with Service and i set the context with endpointaddress property as the soap location of the sender agreement configured in PI7.1.
@WebServiceRef (name="DistributeMasterDataService") DistributeMasterDataService service;
@RelMessagingNW05DTOperation(enableWSRM=true)
public void callPi(DistributeMasterDataRequestType req) {
.........................
.........................
port.distributeMasterDataOutA(req);// the distributeMasterDataOutA is a method available in SEI
.........................
.........................}
For the first time the message(req object)transmits to the PI successfully,but for the second call i hit this JTA Transaction :status should be active, but it is STATUS_COMMITTED = 3.
I tried chanding the transactionmanagement from container to bean.
@TransactionManagement(value=TransactionManagementType.BEAN)
@TransactionAttribute(value=TransactionAttributeType.REQUIRES_NEW)
I wanted to know how can i have the JTA transaction status in SEI(service enpoint interface)java method distributeMasterDataOutA.Since it is an interface i dont know what annotation can be used.
If its possible i can try this UserTransaction, ut.begin() & ut.commit(),so that everytime this method is called it will treat as a new transaction..
Let me know if you need more details??,Any idea provided would be great.
Thanks
Sabarinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.