I have an application running on Spring/Hibernate and JWS.
I now have to provide EJBs support apart from the JWS.
I have written EJB classes (didnt use Spring's EJB though) and added to the application ear and deployed successfully.
I used application context to get the Spring beans in my EJB.
When the session bean's transaction attribute is NotSupported it works fine.
When i use the Required transaction attribute, I get the exception
I understand the transaction Manager that i use (which is Spring/Hibernate) cannot be used with EJBs. How do i change this, so that the existing application does not bomb.Code:java.sql.SQLException: Cannot call commit when using distributed transactions at weblogic.jdbc.wrapper.JTAConnection.commit(JTAConnection.java:323) at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:561) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:611) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:581) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy111.retrieve(Unknown Source) at com.bofa.crme.gps.codesprocessor.slsb.RetrieveCodesBean.retrieve(RetrieveCodesBean.java:83) at com.bofa.crme.gps.codesprocessor.slsb.RetrieveCodes_lnrnrk_EOImpl.retrieve(RetrieveCodes_lnrnrk_EOImpl.java:60) at com.bofa.crme.gps.codesprocessor.slsb.RetrieveCodes_lnrnrk_EOImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517) at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403) at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Thanks
TT


Reply With Quote