Announcement Announcement Module
Collapse
No announcement yet.
sending jms message via JmsTemplate from EJB Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • sending jms message via JmsTemplate from EJB

    hi all,
    my case is as below:
    1. im calling stateless Session Bean (using container transaction as required)to send jms message via JmsTemplate (im not using spring transaction management).
    2. wait for output (in file system) of MDB (from step 1).
    3. send response.

    when i deploy this model on weblogic (10.3) it works fine; but once im doing it on websphere (7.0) the JmsTemplate is not sending the message.

    i did debuging and investigations, seems that session is not sending message till the transaction is commited.
    but how its working fine in weblogic? and how i can resolve this issue to work fine in websphere as well ?

    thanks in advance;
    Last edited by realangel69; Jun 3rd, 2012, 04:29 AM.

  • #2
    this exception occured in server log (in debug mode):

    Code:
    2012-06-03 16:49:55,017 DEBUG [org.springframework.batch.core.repository.dao.JdbcStepExecutionDao] Truncating long message before update of StepExecution, original message is: org.springframework.jms.connection.SynchedLocalTransactionFailedException: Local JMS transaction failed to commit; nested exception is javax.jms.IllegalStateException: CWSIA0053E: An exception was received during the call to the method JmsSessionImpl.commitTransaction (#2): javax.resource.spi.LocalTransactionException: CWSJR1138E: An internal error has occurred. An unexpected exception has occurred. A call was made to commitLocalTransaction but there is no local transaction..
    	at org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:407)
    	at org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:1)
    	at org.springframework.transaction.support.ResourceHolderSynchronization.afterCommit(ResourceHolderSynchronization.java:79)
    	at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)
    	at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:121)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:953)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:796)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
    	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:147)
    	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:261)
    	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
    	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
    	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214)
    	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
    	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:247)
    	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:196)
    	at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135)
    	at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61)
    	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
    	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)
    	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
    	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)
    	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281)
    	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120)
    	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
    	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:114)
    	at MY-EJB
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    	at java.lang.reflect.Method.invoke(Method.java:611)
    	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
    	at org.apache.axis2.rpc.receivers.RPCInOutAsyncMessageReceiver.invokeBusinessLogic(RPCInOutAsyncMessageReceiver.java:89)
    	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
    	at org.apache.axis2.receivers.AbstractMessageReceiver$AsyncMessageReceiverWorker.run(AbstractMessageReceiver.java:316)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    	at java.lang.Thread.run(Thread.java:736)
    Caused by: javax.jms.IllegalStateException: CWSIA0053E: An exception was received during the call to the method JmsSessionImpl.commitTransaction (#2): javax.resource.spi.LocalTransactionException: CWSJR1138E: An internal error has occurred. An unexpected exception has occurred. A call was made to commitLocalTransaction but there is no local transaction..
    	at com.ibm.ws.sib.api.jms.impl.JmsSessionImpl.commitTransaction(JmsSessionImpl.java:1884)
    	at com.ibm.ws.sib.api.jms.impl.JmsSessionImpl.commit(JmsSessionImpl.java:598)
    	at org.springframework.jms.connection.JmsResourceHolder.commitAll(JmsResourceHolder.java:181)
    	at org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:404)
    	... 46 more
    Caused by: javax.resource.spi.LocalTransactionException: CWSJR1138E: An internal error has occurred. An unexpected exception has occurred. A call was made to commitLocalTransaction but there is no local transaction.
    	at com.ibm.ws.sib.api.jmsra.impl.JmsJcaSessionImpl.commitLocalTransaction(JmsJcaSessionImpl.java:430)
    	at com.ibm.ws.sib.api.jms.impl.JmsSessionImpl.commitTransaction(JmsSessionImpl.java:1865)
    	... 49 more

    Comment

    Working...
    X