Announcement Announcement Module
Collapse
No announcement yet.
EJB MDB Transaction Propagation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EJB MDB Transaction Propagation

    Hi Guys ,I am very new to EJB 3.0

    I have deployed a EAR in a web logic 10.3 g which have two ejb modules called
    1.ServicesDump
    2.MessageDump

    In ServicesDump i have a session bean which doing the database updates,After i have deployed,
    When i called these remote session-bean from out side of container to test the functionalites it working perfectly(Which mean
    updating the tables perfectly).That session bean have a transaction type is REQUIRED.

    In the MessageDump i have a mdb which listening the MQ ,and inside the onMessage() of MDB i am calling the method of remote session bean (the same
    method which i have tested ).
    The mdb 's transaction type i specified in ejb-jar.xml as follows

    Configurations of MDB as follows


    transaction-type = Container and
    trans-attribute=Required



    so when MDB started (When it consumes message from MQ) it calling the session bean method,
    but after it returns from the sessions bean method it throwing the following exception.


    dminServer+172.22.221.124:7001+base_domain+t3+): weblogic.transaction.RollbackException: Unknown reason
    at weblogic.transaction.internal.TransactionImpl.thro wRollbackException(TransactionImpl.java:1834)
    at weblogic.transaction.internal.ServerTransactionImp l.internalCommit(ServerTransactionImpl.ava:339)
    at weblogic.transaction.internal.ServerTransactionImp l.commit(ServerTransactionImpl.java:233)
    at weblogic.ejb.container.internal.BaseLocalObject.po stInvoke1(BaseLocalObject.java:591)
    at weblogic.ejb.container.internal.BaseLocalObject.po stInvokeTxRetry(BaseLocalObject.java:424)
    at.foundry.txn.DatabaseBean_7z3dqu_DatabaseImpl.pe rsist(DatabaseBean_7z3dqu_Dat
    abaseImpl.java:1607)
    at .common.service.serviceimpl.LogServiceBean.process MqLog(LogServiceBean.java:89)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.suppor t.AopUtils.invokeJoinpointUsingReflecti
    on(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.invokeJo
    inpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.doP
    roceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.inv
    oke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.Me thodInvocationVisitorImpl.visit(MethodI
    nvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterc eptorCallbackImpl.callback(EnvironmentI
    nterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.En vironmentInterceptor.invoke(Environment
    Interceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interc eptor.ExposeInvocationInterceptor.invok
    e(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.doP
    roceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.inv
    oke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framew ork.JdkDynamicAopProxy.invoke(JdkDynami
    cAopProxy.java:204)
    at $Proxy108.processMqLog(Unknown Source)
    at .common.service.serviceimpl.LogServiceBean_rq903m_ LogServiceImpl.processMqLog
    (LogServiceBean_rq903m_LogServiceImpl.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.ejb.container.internal.RemoteBusinessIntf Proxy.invoke(RemoteBusinessIntfProxy.ja
    va:73)
    at $Proxy103.processMqLog(Unknown Source)
    at .baserate.mdb.OLTRateFeedMessageListener.onMessage (OLTRateFeedMessageListener
    .java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.suppor t.AopUtils.invokeJoinpointUsingReflecti
    on(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.invokeJo
    inpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.doP
    roceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.inv
    oke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interc eptor.ExposeInvocationInterceptor.invok
    e(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.doP
    roceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.suppor t.DelegatingIntroductionInterceptor.inv
    oke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framew ork.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framew ork.JdkDynamicAopProxy.invoke(JdkDynami
    cAopProxy.java:204)
    at $Proxy107.onMessage(Unknown Source)
    at weblogic.ejb.container.internal.MDListener.execute (MDListener.java:466)
    at weblogic.ejb.container.internal.MDListener.transac tionalOnMessage(MDListener.java:371)
    at weblogic.ejb.container.internal.NewJMSMessagePolle r.processOneMessage(NewJMSMessagePoller
    .java:245)
    at weblogic.ejb.container.internal.NewJMSMessagePolle r.run(NewJMSMessagePoller.java:121)
    at weblogic.ejb.container.internal.NewJMSMessagePolle r.timerExpired(NewJMSMessagePoller.jav
    :204)
    at weblogic.timers.internal.TimerImpl.run(TimerImpl.j ava:273)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapte rImpl.run(SelfTuningWorkManagerImpl.jav
    a:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)
    Caused by: weblogic.transaction.internal.AppSetRollbackOnlyEx ception
    at weblogic.transaction.internal.TransactionImpl.setR ollbackOnly(TransactionImpl.java:551)
    at weblogic.transaction.internal.TransactionManagerIm pl.setRollbackOnly(TransactionManagerIm
    pl.java:319)
    at weblogic.transaction.internal.TransactionManagerIm pl.setRollbackOnly(TransactionManagerIm
    pl.java:312)
    at org.hibernate.ejb.AbstractEntityManagerImpl.markAs Rollback(AbstractEntityManagerImpl.java
    :433)
    at org.hibernate.ejb.AbstractEntityManagerImpl.throwP ersistenceException(AbstractEntityManag
    erImpl.java:588)
    at org.hibernate.ejb.AbstractEntityManagerImpl.throwP ersistenceException(AbstractEntityManag
    erImpl.java:630)
    at org.hibernate.ejb.AbstractEntityManagerImpl$1.befo reCompletion(AbstractEntityManagerImpl.
    java:525)
    at weblogic.transaction.internal.ServerSCInfo.doBefor eCompletion(ServerSCInfo.java:1229)
    at weblogic.transaction.internal.ServerSCInfo.callBef oreCompletions(ServerSCInfo.java:1204)
    at weblogic.transaction.internal.ServerSCInfo.startPr ePrepareAndChain(ServerSCInfo.java:118
    at weblogic.transaction.internal.ServerTransactionImp l.localPrePrepareAndChain(ServerTransac
    tionImpl.java:1310)
    at weblogic.transaction.internal.ServerTransactionImp l.globalPrePrepare(ServerTransactionImp
    l.java:2122)
    at weblogic.transaction.internal.ServerTransactionImp l.internalCommit(ServerTransactionImpl.
    java:266)

    please help me out to resolve it,

    Cheers
    Dominic
    Last edited by SpringBuddy; Jan 22nd, 2010, 09:38 AM.
Working...
X