JMS Message Rollback Issue.

Hi,
I have a requirement where i have to read from a queue and then insert into a table. There are 2 scenarios where the message should remain in the queue
a) If the insert fails
b) There is some exception after reading the message but before inserting into the table.
I am using Weblogic, Oracle and MQ Series
I have created the QCF (XA based) and also created a XAdatasource thru the WL console.
However, the XA does not seem to be happening!!
This is my spring configuration
<bean id="TxManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" >
<property name="jndiTemplate" ref="jndiTemplate"></property>
<property name="transactionManagerName" value="javax.transaction.TransactionManager"/>
</bean>
<!-- =================== ASPECT CONFIGURATION ===================== -->
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* *..*Processor*.*(..))" advice-ref="txReqAdvice"/>
<aop:advisor pointcut="execution(* *..*Listener*.*(..))" advice-ref="txReqAdvice" />
<aop:advisor pointcut="execution(* *..*Dao*.*(..))" advice-ref="txReqAdvice"/>
</aop:config>
<aop:config />
<tx:advice id="txReqAdvice" transaction-manager="TxManager">
<tx:attributes>
<tx:method name="save*" propagation="REQUIRED" timeout="100"/>
<tx:method name="on*" propagation="REQUIRES_NEW" timeout="100" />
<!-- <tx:method name="process*" propagation="REQUIRED" timeout="100"/>-->
</tx:attributes>
</tx:advice>
<tx:advice id="txReqNewAdvice" transaction-manager="TxManager">
<tx:attributes>
<tx:method name="create*" read-only="false" propagation="REQUIRES_NEW" />
<tx:method name="update*" read-only="false" propagation="REQUIRES_NEW"/>
<tx:method name="insert*" read-only="false" propagation="REQUIRES_NEW"/>
<tx:method name="add*" read-only="false" propagation="REQUIRES_NEW"/>
<tx:method name="*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<!-- ====================================JTA End====================================== -->
<!-- JNDI Environment Template -->
<bean id="jndiTemplate"
class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://localhost:7001</prop>
</props>
</property>
</bean>
<!-- Start Connection Factory -->
<bean id="jmsQueueConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate">
</property>
<property name="jndiName" value="/jms/WLReceiverQCF">
</property>
<property name="lookupOnStartup" value="false"/>
<property name="proxyInterface" value="javax.jms.QueueConnectionFactory"/>
</bean>
<bean id="jmsXAQueueConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate">
</property>
<property name="jndiName" value="/jms/WLXAReceiverQCF">
</property>
<property name="lookupOnStartup" value="false"/>
<property name="proxyInterface" value="javax.jms.XAQueueConnectionFactory"/>
</bean>
<!-- End Connection Factory -->
<!-- Start Queue destination, queuetemplate, sender & Listener -->
<!-- Spring JMS Queue Connection Factory -->
<bean id="destinationQueue"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>/jms/WLReceiverQueue</value>
</property>
<property name="proxyInterface" value="javax.jms.Queue"/>
</bean>
<bean id="jmsQueueTemplate"
class="org.springframework.jms.core.JmsTemplate102">
<property name="connectionFactory" ref="jmsQueueConnectionFactory">
</property>
<property name="defaultDestinationName" value="RequestQQ"/>
<!-- <ref bean="destinationQueue" />-->
<!-- </property>-->
<!-- <property name="defaultDestination" ref="destinationQueue"/>-->
</bean>
<bean id="jmsSender" class="com.sample.JmsSender">
<property name="jmsTemplate102">
<ref bean="jmsQueueTemplate"/>
</property>
</bean>
<bean id="jmsListener"
class="com.sample.JMSRequestListener" />
<bean id="jmsListenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="jmsXAQueueConnectionFactory" />
<property name="destinationName" value="RequestQQ" />
<property name="messageListener" ref="jmsListener" />
<property name="transactionManager" ref="TxManager" />
<property name="transactionTimeout" value="100" />
<!-- <property name="sessionTransacted" value="true" />-->
</bean>
<bean id="datasource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate"/>
<property name="jndiName">
<value>jdbc/MyDS</value>
</property>
<property name="expectedType" value="javax.sql.DataSource"/>
<property name="lookupOnStartup" value="false"/>
</bean>
<bean id="hibernatePropsBean" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.default_schema">common</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
<prop key="hibernate.connection.release_mode">after_transaction</prop>
</props>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- <property name="useTransactionAwareDataSource" value="true"/>-->
<property name="dataSource" ref="datasource"/>
<property name="hibernateProperties" ref="hibernatePropsBean"/>
<property name="mappingResources">
<list>
<value>com/sample/Event.hbm.xml</value>
</list>
</property>
</bean>
<bean id="EventDAO" class="com.sample.EventSpringDao">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
</beans>
Can somebody point me where i am doing a mistake?
Regards
Siva.

Ensure that the custom connection factory with JNDI name "/jms/WLXAReceiverQCF" is configured with "XA Transactions Enabled".
Try setting the Spring "sessionTransacted" to "false" -- which should be the default. googling "Spring sessionTransacted" reveals there's a bit of weirdness with this field, and behavior may differ with different JMS vendors.
FWIW For a variety of reasons, including your plans to use MQSeries XA, I would normally recommend using WebLogic MDBs rather than the Spring messaging container.
Tom

Similar Messages

  • JMS Message Rollback

    Hi,
    I would like to know whether the JMS Adpater transaction can be rolled back.
    I have scenario where
    Jmsdequeue->BPEL->InserttoDB
    the insertion operation generates a error and rollbacks the BPEL transaction, but i cant see the dequed message back in Queue in EM
    Is there any property i should configure to rollback the transaction of JMS adapter.
    Any help or Idea would be appreciated.
    Note: Also tried making adapter as synchronous but no result.
    Regards,
    Santosh Hemashekar,

    What would you expect?
    If there is an error on de delivering side of the process, should the message become available in de consuming queue again? If so, then that same message would be dequeued again as it is the first message to be dequeued. In that situation you would come in a kind of deadlock: each time, the message is dequeued it would error, the message would be placed on the queue again but will then be dequeued again, resulting in the same error.
    So for this situation you have to take measurements. Think of error queues and so on. If the expectation is that the problem can be resolved when retrying, then specify more retries.
    Regards
    Jos

  • Having issue opening the JMS message

    HI I am having issue while monitorig the JMS queue thorugh Weblogic Console (9.3). Its throwing me below exception though i recycle the entire domain and it still gives me the below exception. Same domain has two more other JMS module which has some queue and that work fine.
    Error opening /jsp/jms/message/JMSMessageTable.jsp.
    The source of this error is java.lang.NullPointerException at weblogic.jms.common.JMSMessageOpenDataConverter.createCompositeData(JMSMessageOpenDataConverter.java:43) at weblogic.messaging.kernel.runtime.MessageCursorDelegate.getCompositeDataArray(MessageCursorDelegate.java:141) at weblogic.messaging.kernel.runtime.MessageCursorDelegate.getNext(MessageCursorDelegate.java:60) at weblogic.messaging.kernel.runtime.MessageCursorDelegate.getItems(MessageCursorDelegate.java:105) at weblogic.messaging.runtime.CursorRuntimeImpl.getItems(CursorRuntimeImpl.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:443) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153) at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153) at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:443) at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor$10.run(AuthenticatedSubjectInterceptor.java:377) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor.invoke(AuthenticatedSubjectInterceptor.java:375) at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:310) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1348) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782) at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475) at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Rgds
    Sohail K

    Hi Sohail,
    JMS is a WebLogic Server component and not something directly supported in Tuxedo. If you are using the WebLogic Tuxedo Connector tBridge to access JMS queues from Tuxedo or to forward JMS queues to Tuxedo /Q, please give us the details. Otherwise I suggest you post your question to one of the WebLogic forums.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • EntityManager.persist and JMS messaging issues?

    Hi everyone:
    I am seeing a problem that I could not figure out a solution. Can anyone shed me some lights on this?
    I have a EJB method which basically does 2 things: 1). persists a record into a database table using EntityManager 2). sends out a message to a JMS topic. So it is th like:
    myMethod() {
    entityManager.persist(myObj);
    notifier.notify(...);
    The client will then listen to the JMS topic and read the new record from database. Usually this works pretty well, but sometimes, the client cannot find the new record from database at all and a few seconds later it can. It is as if there is a delay between the JMS messaging and database persistence - somehow the client receives the message first and at this time the record is not really saved into database yet!
    Can anyone explain to me what is going on here? What kind of solutions might help to resolve this?
    BTW, I am using the Hibernate EntityManager. My app server is Glassfish.
    Thanks a lot for your help
    jmao

    You need to use flush method to persist the value before you calling notifier.notify(...);
    below code should works
    myMethod() {
    entityManager.persist(myObj);
    *entityManager.flush();</<br />
    notifier.notify(...);
    }

  • Weblogic Message Bridge Producing Duplicate JMS Messages

    We have a message bridge that we use to integrate with TIBCO. The message bridge is deployed on a WL cluster. We see duplicate JMS messages produced by the bridge when it is deployed on the cluster. We don't see this behavior when only one ManagedServer in the cluster is active,.
    TIBCO version: 4.4.3 V5
    WLS: 10.3.3 with patch for bug BUG8732539 (BQC6)
    java -version
    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Oracle JRockit(R) (build R28.0.0-679-130297-1.6.0_17-20100312-2121-linux-x86_64, compiled mode)
    We are also seeing a lot of exceptions related to
    <May 27, 2011 4:11:57 PM PDT> <Warning> <Connector> <BEA-190032> << eis/jms/WLSConnectionFactoryJNDIXA > ResourceAllocationException thrown by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.ResourceException: Failed to start the connection ">
    However the bridge is active. We are monitoring the message-out count on TIBCO and we observed that we see duplicates whenever there a message is re-delivered. We opened a case with Oracle support and they suggested patch 10258751 which didn't help. The next suggestion was a patch for "Bug 11852771 - [WLS10.3.2]MISSING AND DUPLICATE IN JMS QUEUE MESSAGE MONITORING" but I don't think it will help since our JMS consumers are getting duplicate messages and this is not just a UI issue.
    Here is the message behavior when we send a single message:
    Timelines
    11:34:17 --> Message sent to TIBCO EMS queue
    11:34:17 --> WL MS3 throws an javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMFAIL : Resource manager is unavailable exception
    11:34:17 --> WL MS1 says it got the message and committed the transaction
    11:34:17 --> Message is visible in the JMS queue in the admin console
    11:34:17 --> TIBCO EMS has still not received an ACK from WL for the message
    11:34:31 --> TIBCO EMS resends the same JMS message to WL
    11:34:31 --> WL MS2 says it got the message and committed the transaction
    11:34:31 --> WL MS1 throws an javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMFAIL : Resource manager is unavailable exception
    11:34:31 --> Message is visible in the JMS queue in the admin console (At this point there are two messages in the JMS queue)
    11:34:31 --> TIBCO EMS has still not received an ACK from WL for the message
    11:34:54 --> TIBCO EMS resends the same JMS message to WL
    11:34:31 --> WL MS4 says it got the message and committed the transaction
    11:34:31 --> WL MS2 throws an javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMFAIL : Resource manager is unavailable exception
    11:34:31 --> Message is visible in the JMS queue in the admin console (At this point there are three messages in the JMS queue)
    11:34:31 --> TIBCO EMS receives an ACK from WL for the message
    MS04
    ####<May 27, 2011 11:34:54 AM PDT> <Debug> <MessagingBridgeRuntime> <> <MS04> <[ACTIVE] ExecuteThread: '109' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-6A59E8FE76C4FC4CA149> <> <1306521294611> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) received message:
    JMS Message Class: TextMessage
    JMSMessageID: ID:MS01.4B044DDFEE1F1:25354AD
    JMSCorrelationID: null
    JMSDeliveryMode: PERSISTENT
    JMSDestination: Queue[SourceQueue1]
    JMSExpiration: 0
    JMSPriority: 4
    JMSRedelivered: true
    JMSReplyTo: null
    JMSTimestamp: 1306521256905 (Fri May 27 11:34:16 PDT 2011)
    JMSType: null
    Transaction Id: BEA1-6A59E8FE76C4FC4CA149
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    ####<May 27, 2011 11:34:54 AM PDT> <Debug> <MessagingBridgeRuntime> <MS04> <MS04> <[ACTIVE] ExecuteThread: '109' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-6A59E8FE76C4FC4CA149> <> <1306521294611> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) successfully sent message:
    JMS Message Class: TextMessage
    Old JMS MessageID: ID:MS01.4B044DDFEE1F1:25354AD
    New JMS MessageID: ID:<193654.1306521294611.0>
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    MS03
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257342> <BEA-000000> <Bridge MessageBridge1 Successfully got connection to the target destination>
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257343> <BEA-000000> <Bridge MessageBridge1: both source and target adapters support XA = true>
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257343> <BEA-000000> <Bridge MessageBridge1 supportsMDBTX = false supportsXA = true async = true>
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257343> <BEA-000000> <Bridge MessageBridge1 WorkMode = Exactly-once>
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntimeVerbose> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257343> <BEA-000000> <Bridge MessageBridge1 Entering processMessages() ------ >
    ####<May 27, 2011 11:34:17 AM PDT> <Error> <MessagingBridge> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-3AA29116A4CA622834EA> <> <1306521257343> <BEA-200015> <An error occurred in bridge "MessageBridge1" during the transfer of messages (java.lang.Exception: javax.resource.ResourceException: Failed to setup the Resource Adapter Connection for enlistment in the transaction, Pool = 'eis/jms/WLSConnectionFactoryJNDIXA', javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMFAIL : Resource manager is unavailable
    javax.transaction.xa.XAException: Internal error: XAResource 'eis/jms/WLSConnectionFactoryJNDIXA' is unavailable
    at weblogic.transaction.internal.XAResourceDescriptor.checkResource(XAResourceDescriptor.java:948)
    at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:634)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1227)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:507)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:434)
    at weblogic.connector.transaction.outbound.XATxConnectionHandler.enListResource(XATxConnectionHandler.java:117)
    at weblogic.connector.outbound.ConnectionWrapper.invoke(ConnectionWrapper.java:218)
    at $Proxy62.receive(Unknown Source)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1431)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1006)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1083)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    at weblogic.connector.transaction.outbound.XATxConnectionHandler.enListResource(XATxConnectionHandler.java:200)
    at weblogic.connector.outbound.ConnectionWrapper.invoke(ConnectionWrapper.java:218)
    at $Proxy62.receive(Unknown Source)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1431)
    at $Proxy62.receive(Unknown Source)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1431)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1006)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1083)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMFAIL : Resource manager is unavailable
    javax.transaction.xa.XAException: Internal error: XAResource 'eis/jms/WLSConnectionFactoryJNDIXA' is unavailable
    at weblogic.transaction.internal.XAResourceDescriptor.checkResource(XAResourceDescriptor.java:948)
    at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:634)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1227)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:507)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:434)
    at weblogic.connector.transaction.outbound.XATxConnectionHandler.enListResource(XATxConnectionHandler.java:117)
    at weblogic.connector.outbound.ConnectionWrapper.invoke(ConnectionWrapper.java:218)
    at $Proxy62.receive(Unknown Source)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1431)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1006)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1083)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1185)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:507)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:434)
    at weblogic.connector.transaction.outbound.XATxConnectionHandler.enListResource(XATxConnectionHandler.java:117)
    ... 8 more
    ).>
    ####<May 27, 2011 11:34:17 AM PDT> <Warning> <MessagingBridge> <MS03> <MS03> <[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521257344> <BEA-200026> <Bridge "MessageBridge1" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was java.lang.Exception: MessagingBridgeException: Messaging bridge operation failed
    .)>
    MS02
    ####<May 27, 2011 11:34:31 AM PDT> <Debug> <MessagingBridgeRuntime> <MS02> <MS02> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-679AF074F381152F047C> <> <1306521271386> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) received message:
    JMS Message Class: TextMessage
    JMSMessageID: ID:MS01.4B044DDFEE1F1:25354AD
    JMSCorrelationID: null
    JMSDeliveryMode: PERSISTENT
    JMSDestination: Queue[SourceQueue1]
    JMSExpiration: 0
    JMSPriority: 4
    JMSRedelivered: true
    JMSReplyTo: null
    JMSTimestamp: 1306521256905 (Fri May 27 11:34:16 PDT 2011)
    JMSType: null
    Transaction Id: BEA1-679AF074F381152F047C
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    ####<May 27, 2011 11:34:31 AM PDT> <Debug> <MessagingBridgeRuntime> <MS02> <MS02> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-679AF074F381152F047C> <> <1306521271392> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) successfully sent message:
    JMS Message Class: TextMessage
    Old JMS MessageID: ID:MS01.4B044DDFEE1F1:25354AD
    New JMS MessageID: ID:<196075.1306521271386.0>
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    ####<May 27, 2011 11:34:54 AM PDT> <Error> <MessagingBridge> <MS02> <MS02> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521294610> <BEA-200015> <An error occurred in bridge "MessageBridge1" during the transfer of messages (java.lang.Exception: weblogic.transaction.RollbackException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:495)
    at weblogic.connector.transaction.outbound.XAWrapper.setTransactionTimeout(XAWrapper.java:457)
    at weblogic.connector.transaction.outbound.RecoveryOnlyXAWrapper.setTransactionTimeout(RecoveryOnlyXAWrapper.java:34)
    at weblogic.transaction.internal.XAResourceDescriptor.setXAResourceTransactionTimeoutIfAppropriate(XAResourceDescriptor.java:1422)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1223)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:485)
    ... 14 more
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1871)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:330)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:225)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:293)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1534)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1006)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1083)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:495)
    at weblogic.connector.transaction.outbound.XAWrapper.setTransactionTimeout(XAWrapper.java:457)
    at weblogic.connector.transaction.outbound.RecoveryOnlyXAWrapper.setTransactionTimeout(RecoveryOnlyXAWrapper.java:34)
    at weblogic.transaction.internal.XAResourceDescriptor.setXAResourceTransactionTimeoutIfAppropriate(XAResourceDescriptor.java:1422)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1223)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:485)
    ... 14 more
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1185)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    ... 2 more
    ).>
    ####<May 27, 2011 11:34:54 AM PDT> <Warning> <MessagingBridge> <MS02> <MS02> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521294610> <BEA-200026> <Bridge "MessageBridge1" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was java.lang.Exception: MessagingBridgeException: Messaging bridge operation failed
    MS01
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS01> <MS01> <[ACTIVE] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-72BC818FE2BB8C2655C6> <> <1306521257536> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) received message:
    JMS Message Class: TextMessage
    JMSMessageID: ID:MS01.4B044DDFEE1F1:25354AD
    JMSCorrelationID: null
    JMSDeliveryMode: PERSISTENT
    JMSDestination: Queue[SourceQueue1]
    JMSExpiration: 0
    JMSPriority: 4
    JMSRedelivered: false
    JMSReplyTo: null
    JMSTimestamp: 1306521256905 (Fri May 27 11:34:16 PDT 2011)
    JMSType: null
    Transaction Id: BEA1-72BC818FE2BB8C2655C6
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    ####<May 27, 2011 11:34:17 AM PDT> <Debug> <MessagingBridgeRuntime> <MS01> <MS01> <[ACTIVE] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-72BC818FE2BB8C2655C6> <> <1306521257542> <BEA-000000> <Bridge: MessageBridge1 (processMessages()) successfully sent message:
    JMS Message Class: TextMessage
    Old JMS MessageID: ID:MS01.4B044DDFEE1F1:25354AD
    New JMS MessageID: ID:<195581.1306521257536.0>
    <?xml version="1.0" encoding="UTF-8"?>
    <commands ...
    >
    ####<May 27, 2011 11:34:31 AM PDT> <Error> <MessagingBridge> <MS01> <MS01> <[ACTIVE] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521271384> <BEA-200015> <An error occurred in bridge "MessageBridge1" during the transfer of messages (java.lang.Exception: weblogic.transaction.RollbackException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:495)
    at weblogic.connector.transaction.outbound.XAWrapper.setTransactionTimeout(XAWrapper.java:457)
    at weblogic.connector.transaction.outbound.RecoveryOnlyXAWrapper.setTransactionTimeout(RecoveryOnlyXAWrapper.java:34)
    at weblogic.transaction.internal.XAResourceDescriptor.setXAResourceTransactionTimeoutIfAppropriate(XAResourceDescriptor.java:1422)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1223)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:485)
    ... 14 more
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1871)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:330)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:224)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:293)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1534)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1006)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1083)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:495)
    at weblogic.connector.transaction.outbound.XAWrapper.setTransactionTimeout(XAWrapper.java:457)
    at weblogic.connector.transaction.outbound.RecoveryOnlyXAWrapper.setTransactionTimeout(RecoveryOnlyXAWrapper.java:34)
    at weblogic.transaction.internal.XAResourceDescriptor.setXAResourceTransactionTimeoutIfAppropriate(XAResourceDescriptor.java:1422)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1223)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1161)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at weblogic.connector.security.layer.AdapterLayer.setTransactionTimeout(AdapterLayer.java:485)
    ... 14 more
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1185)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:282)
    at weblogic.transaction.internal.XAServerResourceInfo.enlistIfStatic(XAServerResourceInfo.java:181)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistStaticallyEnlistedResources(ServerTransactionImpl.java:1565)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.dispatchRequest(ServerTransactionManagerImpl.java:551)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:132)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:34)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:111)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    ... 1 more
    ).>
    ####<May 27, 2011 11:34:31 AM PDT> <Warning> <MessagingBridge> <MS01> <MS01> <[ACTIVE] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1306521271384> <BEA-200026> <Bridge "MessageBridge1" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was java.lang.Exception: MessagingBridgeException: Messaging bridge operation failed
    .)>

    @Tom, thanks for your hints and sorry for my delayed response. Here are my answers to your queries…
    -- Does messaging work, without any exceptions, when only one bridge is active?
    It works fine when only one node of the cluster is active. -- I'm not familiar with Tibco monitoring, but I suspect that the "message-out count on TIBCO" stat doesn't always imply that there's a duplicate message. It could mean that an initial message delivery attempt failed, it's transaction rolled back, and the message was redelivered. Redelivery after a failure is normal - the original delivered message, if one actually made it onto a WebLogic queue, should be discarded by WebLogic when its failed transaction eventually rolls back (before its ever handed to a consumer application).
    You are absolutely right. The mismatch in count was due to redelivery attempts. We could see that as soon as we turned on trace in TIBCO-- The posted stack traces look like they may be JVM stdout/stderr scrapes, which are often automatically truncated, for example, see the "... 8 more" listed at the bottom of one of the stack traces below. There might be more information in the full stack trace for the "Resource manager is unavailable" exception. Full traces are logged in each WebLogic Server's log files.
    I tried redirecting the output and even set "stdout Stack Trace Depth:" to -1 but I am not albe to see the complete trace.-- The setTransactionTimeout NullPointerException error message looks like it is collateral damage from the original reported "Resource manager is unavailable" exception that's thrown earlier during the enlistResource() step. If you are truly getting duplicates, then I think this is a clue that the bridge is somehow (stupidly) trying to proceed with forwarding the message despite the fact that there's no current transaction on the thread...

    I have a case open with Oracle support and we have extensive debugging turned on. Here is what the engineer came back with. There is an issue with XA transactions in JCA adapter when it talks to third party providers like TIBCO. Since the resource names are not unique across the cluster, a XA transaction is started on multiple nodes in the cluster for the same message. All transactions abort but the message is persisted and TIBCO redelivers the message since the connection is severed when the transaction aborts. We were able to reproduce this scenario at will with our setup and Oracle was able to reproduce the issue too. 
-- Can you check the state of the message on the WebLogic Q? The fact that a message is shown on the WL console doesn't necessarily mean that the state of the message is visible (it could be waiting for the transaction to commit - something that apparently never happens). On the console: Services -> Messaging -> JMS Modules -> [module name] -> [destination name].

    Our consumer was getting duplicate messages. This confirms that the console was not giving us incorrect information. The console showed that 2/3/4 messages were in "current" state when we expected only one message.
-- Make sure that the bridge's Tibco destination is a Tibco queue not a Tibco topic (it's happened).

    Yeah we made sure it was a Queue.
-- Can you post your bridge and destination stanzas from your config.xml? 

    Will try to do this shortly but have to strip out lot of information.
-- I vaguely recall that there was a problem with untyped connection factories in Tibco at one point (not sure). You might want to try changing the Tibco configuration to spin-up "XA Queue Connection Factory" instead of just an "XA Connection Factory" (plus modify the bridge configuration accordingly).

    We tried this but it didn't eliminate this issue. One thing we did notice however was that the number of rollbacks were greatly reduced.

    Here is the workaround that Oracle is suggesting: Create pinned destinations and assign it to a distributed queue. This will keep the transactions local and hence eliminate the duplicate transactions and rollback. We tried it and it eliminated the dups issue. However I discovered another bug during my testing. Our cluster messaging mode is "Unicast" and message forwarding from zero consumer queues to queues with consumers fails. We have four/five nodes in the cluster and two consumer threads. I observed that the zero consumer queues always forward to one queue in the cluster that has consumers. The forwarding stalls when I bring down the node that has consumers. Again, we were able to reproduce this issue at will and Oracle has acknowledged that it is a bug. They've reported that Unicast fails without any warning whereas Multicast fails with a warning in the log. We have observed this message forwarding stalling even with UDQs.
    I have another case open for an issue where our message bridges that transfer messages from TIBCO to WLS stalls after sometime. The status is shown as active but it is not doing anything. The server instance shows stuck threads trying to roll back a message. TIBCO logs indicate that it is receiving a request to rollback a transaction but it is not finding the transaction to rollback. The only way to recover from this condition is to restart the cluster. I am fairly confident that he root case for this issue is again the XA transaction issue. I changed our UDQ to pinned destination in one environment and we are no longer seeing dups or bridge stalling there. Hopefully Oracle can resolve the message forwarding issue.Thanks again….

  • JMS - UserTransaction - Commit issue

    Introduction
    I am moving from WebSphere to Weblogic and have counterd an UserTransaction commit issue.
    The code have not been modified, however the logic in Weblogic and Websphere behaves different.
    The messagingsystem is Websphere MQ, in Weblogic I have QCF, destinations, host and port etc. in a .bindings file, and I have configured JMS server and JMS modules with corresponding jndi names.
    I have verified that this configuration is correct throug a custom develop testtool deployed in WL, message is sent successfully to MQ.
    The problem - description
    However in my application i'm using UserTransaction and this is not working as expected.
    I have two classes that communicate with MQ (AbcDAO.java and QueueBroker.java) AbcDAO.java creates a UserTransaction and communicates with Queuebroker throug a method called "SendToAutoS" this method retrives the corrilationId (for the message sendt to MQ) from Queuebroker.
    The SendMessage method creates qcf, queueconnection, queue etc and sends the message to MQ. When i debug this steps (line:queueSender.send(theMessage) I can verify in MQ that a message count is registerted in mq on the correct queue, but it's not shown (since its not commited). However when performing finalize in Queuebroker, which close both session and connection, the messagecount is gone in MQ, and when returing to AbcDAO.java to perform ut.commit(); there is not any message on Queue.
    For me it looks like the message is rolledback when session and connection closes.
    Actions tried
    If I change this line QueueBroker , transacted to false witch i understand sends message without the need to commit:
    boolean transacted = false;
    queueSession = queueConnection.createQueueSession(transacted, QueueSession.AUTO_ACKNOWLEDGE);
    the message is sendt successfully to MQ. However now either commit or rollback on the UserTransaction is working with transacted=false.
    I need the commit and rollback to be done on the UserTransaction for my application.
    Anyone have an idea why this is not working?
    The files - content
    AbcDAO.java - that creates a usertransaction
    ut = ServiceLocator.getInstance().getUserTransaction();
    ut.begin();
    msgCorId = sendToAutoS(userVO, messageSend, transactionQeueSend, transactionQeueFactory);
    ut.commit();
    //SendToAutoS - that calls the Queuebroker method - sendMessage
    private String sendToAutoS(UserVO userVO, String message, String transactionQueue, String transactionQueueFactory) throws DaoException {
    try {
    log.debug("..");
    return QueueBroker.getInstance().sendMessage(message, transactionQueue, transactionQueueFactory);
    } catch (BrokerException be) {
    log.error("BrokerException", be);
    QueueBroker.java - that sends the message to MQ
    public String sendMessage(String message, String transactionQueue, String transactionQueueFactory) throws BrokerException {
    try {
    // Get service locator
    ServiceLocator sl = ServiceLocator.getInstance();
    // Create QueueConnectionFactory with help form service locator
    queueConnectionFactory = (QueueConnectionFactory) sl.getQueueConnectionFactory(transactionQueueFactory);
    // Create QueueConnection
    queueConnection = queueConnectionFactory.createQueueConnection();
    // Create QueueSession, transacted - client has to commit !
    boolean transacted = true;
    queueSession = queueConnection.createQueueSession(transacted, QueueSession.AUTO_ACKNOWLEDGE);
    // Create queue with help from service locator
    queue = (Queue) sl.getQueue(transactionQueue);
    // Create QueueSender
    queueSender = queueSession.createSender(queue);
    // Create message and sent it
    Message theMessage = null;
    theMessage = queueSession.createTextMessage(message);
    // Log time
    long time = System.currentTimeMillis();
    // Set log time on message
    theMessage.setJMSTimestamp(time);
    // Send
    queueSender.send(theMessage);
    queueSender.close();
    // Return unique messageID for message just been sent
    return theMessage.getJMSMessageID();
    } catch (JMSException je) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey("requisition.jms.broker.queue");
    Object[] o = {"SEND", "String to Autosys = " + message};
    ex.setMessageArgs(o);
    ex.setRootCause(je);
    throw ex;
    } catch (ServiceLocatorException e) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey(e.getMessageKey());
    ex.setMessageArgs(e.getMessageArgs());
    ex.setRootCause(e.getRootCause());
    throw ex;
    } finally {
    // Clean up - close connection and session if exist
    if (queueConnection != null) {
    finalize();
    * Finalize queue handling
    * @throws BrokerException e
    protected void finalize() throws BrokerException {
    try {
    // Close connections
    queueSession.close();
    queueConnection.close();
    } catch (JMSException je) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey("requisition.jms.broker.queue");
    Object[] o = {"FINALIZE", "Close connections" };
    ex.setMessageArgs(o);
    ex.setRootCause(je);
    throw ex;
    Edited by: reZer on 14.sep.2011 13:05
    Edited by: reZer on 14.sep.2011 13:06

    I know you are trying to send a JMS message, but just because this is true the generic JMS forum is not automatically the place you should ask questions like this. Your real beef is with the container you are using (Weblogic), UserTransaction and persistent JMS messages in combination with the specific JMS provider you are using.
    You will have far more chance to get help with this problem if you ask it in the Weblogic forum which you can also find on this very website. If you make a new post, be sure to create a link to it here so people can follow it.
    https://forums.oracle.com/forums/category.jspa?categoryID=193
    And perhaps more specific:
    WebLogic Server - JMS

  • Need suggestion on  implementing JMS message error recovery

    Hi,
    Our application has a JMS topic where we publish application events. Now, there can be scenarios where the consumers cannot process the message due to some infrastructure issues and would error out. We need a way so that those messages can be reprocessed again later. we are thinking of the following design for JMS message error recovery
    1. Use a persistent TOPIC (this would ensure guaranteed delivery)
    2. Configure a error destination on JMS topic e.g a jms queue
    3. Have an error handling MDB listening to the Error destination. An error handling MDB would dequeue the errored messages from error destination and persist it to a Data base "error" table..
    4. Provide a mechanism to republish those messages to topic (e.g a scheduler or admin ui or a command line utility) .. The messages would deleted from database "error" table and published to topic again....
    A. Are there any issues with the above design which we need to handle?
    B. Are there any additional steps required in a Cluster environment with a distributed topic and distribute error destination? (our error mdb will have one-copy-per-application setting)
    B. From a performance angle, Is it OK to use persistent TOPIC ? Or will it better to persist the message to the db table and then publish it as a non persistent message ... ? (But i guess the performance should be more or less the same in both of these approaches)
    C. Are there any other recommended design patterns for error recovery of JMS messages
    Please advise.
    Regards,
    Arif

    Thanks Tom !
    We may not be able to go with the approach of delaying/pausing redelivery of the messsage because
    1. Pausing entire MDB approach: Our MDB application consumes messages generated by different producers and our MDB needs to continue processing the messages even if messages corresponding to one producer is erroring out
    2. Redelivery delay : This would only delay the retry of an errored message. But there would still be a problem if the message fails during all retries (i.e redelivery limit count). We don't want to lose this message. In our case, It is possible that a particular message cannot be processed due to unavailability of a third party system for hours or may be a day.
    Basically, i am looking on approaches for a robust and performant error recovery/retry framework for our application (refer details in my first post on this thread) while fully making use of all features provided by middleware (WLS). Please advise.
    Regards,
    Arif

  • Specifying additional JMS message attributes in Sender Adapter

    Hi,
    Iam using sender JMS adapter and I have to use the option " Specify Additional JMS Message Properties" for adding addtionalJMS properties in XI message header.
    Once I cselect the option in the below table  Iam not able to add new lines to add addtional JMS Message Properties..But In receiver adapter I was able to add the new lines.
    Is this option graded in SAP PI 7.3 or relatd to any authorization issue..?
    Is anyone faced this issue before.. Please help me out
    Thank you

    Hi everybody
    I'm starting a project where I have to take adptadores JMS and I'm in the same situation kirian, I am need to configure a JMS adapter  with version of SAP PI 7.3 and I wonder if anyone can help me or give me manuals leagues where information comes related.
    Someone can help me with this information
    Regards

  • I am unable to send JMS message to application which resides in third party

    I am able to produce the Message into JMS demoQueue which is available in SOA 10.1.3.3. And also I tried remote server which is available in my office it having the application SchoolMAX with JMS Configuration. So I need to produce the JMS message into SchoolMAX application. But I am unable to pass to the data’s to that SchoolMAX JMS.
    for this I have configured the respective queues, queue factory etc in Enterprise Manager , but i am not able to access our application which is in remote server through third party in JDeveloper for BPEL Process.
    please i am very new to this JDeveloper & BPEL Console , please help me out in resolving the issue ASAP. please we will be waiting for some reply.

    Hi Kathy,
    Happy Holidays!  Do you have an iPad with cellular service and a text-messaging plan?
    Send messages with your iPhone, iPad, or iPod touch - Apple Support
    http://support.apple.com/en-us/HT201287
    What's the difference between SMS/MMS and iMessage?
    SMS/MMS lets you send text messages and photos to other cellular phones or devices. iMessage lets you send text messages and photos to another iOS device over Wi-Fi, without worrying about text-messaging charges (cellular data charges may apply). 
    What do I need to use SMS/MMS and iMessage?
    Here's what you need to use SMS/MMS and iMessage:
    SMS/MMS: A text-messaging plan. Contact your carrier for more information.
    iMessage: An iPhone, iPad, or iPod touch with iOS 5 or later.
    How do I know if my message used SMS/MMS or iMessage?
    You can tell which type of message you're sending by the color of the Send button and text bubble.
    SMS/MMS: Send button and text bubbles are green.
    iMessage: Send button and text bubbles are blue.
    How can I link my iPhone number with Messages on my iPad, iPod touch, or Messages for Mac?
    When you sign in to Messages with your Apple ID on your iPhone, you link your phone number to your Apple ID. If you then sign in to Messages with the same Apple ID on your iPad, iPod touch, or Mac, Messages will link that device to your phone number as well.
    I hope this information helps ....
    - Judy

  • Adapter Status Error :  Error in creating message ID map for JMS message:

    Currently in the SAP XI 3.0 JMS Adapter, I am receiving the following error
    Error in creating message ID map for JMS message:
    ie. Error while processing message 'de8265f6-c864-4479-1137-9bab17b78b3b';  detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error in creating message ID map for JMS message: ID:c3e2d840d8d4d7f14040404040404040c44f8e2213630b01 at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:103)
    Although I am receivng this error, when I check the details of the message processing, all steps are successful and the message is set to status : DLVD
    Audit Log for Message: de8265f6-c864-4479-1137-9bab17b78b3b
    Time Stamp     Status     Description
    09.06.2009 13:27:24     Success     New JMS message with JMS message ID ID:c3e2d840d8d4d7f14040404040404040c44f8e2213630b01 received. The XI message ID for this message is de8265f6-c864-4479-1137-9bab17b78b3b
    09.06.2009 13:27:24     Success     JMS message converted to XI message format successfully
    09.06.2009 13:27:24     Success     RRB: entering RequestResponseBean
    09.06.2009 13:27:24     Success     RRB: suspending the transaction
    09.06.2009 13:27:24     Success     RRB: passing through ...
    09.06.2009 13:27:24     Success     RRB: leaving RequestResponseBean
    09.06.2009 13:27:24     Success     Transform: using Transform.Class: com.sap.aii.messaging.adapter.Conversion
    09.06.2009 13:27:24     Success     Transform: transforming the payload ...
    09.06.2009 13:27:24     Success     Transform: successfully transformed
    09.06.2009 13:27:24     Success     Application attempting to send an XI message synchronously using connection JMS_http://sap.com/xi/XI/System.
    09.06.2009 13:27:24     Success     Trying to put the message into the call queue.
    09.06.2009 13:27:24     Success     Message successfully put into the queue.
    09.06.2009 13:27:24     Success     The message was successfully retrieved from the call queue.
    09.06.2009 13:27:24     Success     The message status set to DLNG.
    09.06.2009 13:27:25     Success     The application sent the message synchronously using connection JMS_http://sap.com/xi/XI/System. Returning to application.
    09.06.2009 13:27:25     Success     The message was successfully transmitted to endpoint http://sapxia.swets.nl:8000/sap/xi/engine?type=entry using connection JMS_http://sap.com/xi/XI/System.
    09.06.2009 13:27:25     Success     The message status set to DLVD.
    Not sure why this is occurring.......

    No, not using correlation id.
    I was able to resolve the issue on this queue by changing the following setting
    Under the PROCESSING tab, under XI SETTINGS
    Time period for Duplicate Check for EO(IO) (secs) it was set to 86400
    I have changed this to 300 seconds and the adapter has now gone green.
    BUT......
    That said, I have the exact scenario on another sender JMS channel set to 300 seconds and it exhibits the same issue.
    correlation settings:
    Set XI message id  to  = GUID
    Set Xi conversation

  • JMS Messages getting stuck in queues

    Hi,
    I am facing this peculiar issue with queue messages not getting picked up.
    Application Architecture: There is 1 JMS queue ( which resides in WLDomain1 with in a Unix Box) and there are 2 windows boxes having 2 weblogic domains each with 3 instances of MDB deployed on each of the domains. So total of 12 consumers (2 Box * 2 Domain * 3 Instances of MDB) listens to the JMS queue.
    Issue: After bringing everything up I am able to see 12 consumer count listening to the queue. But when I run the application which writes total of 13 messages in the queue only 7 of them are getting processed and 6 messages are always getting stuck in the queues. Interestingly this 7 messages are mostly getting processed by consumers with in the same windows box. And the selection of windows box is completely random. To confirm whether both the windows boxes are configured fine I tried to test them individually and it works fine individually, the problem happens only if I bring up both the boxes together.
    Another observation is, if I bring down the non working domains, the pending messages start getting processed by the working domains. It gives an impression that the non working domains seem to lock the messages for processing but doesn't actually process it. Only when I bring down the domains it releases this lock.
    Below is the JMS Life cycle events I captured from log files :
    1. Start domain1 in WIN Box1
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040304> <783400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <> <>
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040309> <239900> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <> <>
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040313> <2100> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <> <>
    2. Start domain2 in WIN Box 1
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095403> <38600> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <> <>
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095407> <335400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <> <>
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095410> <997700> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <> <>
    3. Start domain1 in WIN Box 2
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172061> <316500> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session80.consumer82)> <> <>
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172066> <324300> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session83.consumer85)> <> <>
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172072> <757000> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session86.consumer88)> <> <>
    4. Start domain2 in WIN Box 2
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214000> <142800> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session90.consumer92)> <> <>
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214005> <38200> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session93.consumer95)> <> <>
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214009> <22400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session96.consumer98)> <> <>
    At this point console shows 12 consumers listening the queue which is absolutely fine.
    5. Run application
    --Message Production
    This produces 13 messages ( I have not pasted the complete log)
    -- Message Consumption ( Only 7 messages are consumed)
    ####<Nov 24, 2009 8:00:05 PM CST> <> <> <1259114405953> <576400> <ID:<1047832.1259114392542.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114392542&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410091> <310100> <ID:<1047832.1259114393181.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393181&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410130> <364600> <ID:<1047832.1259114400626.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400626&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410134> <540700> <ID:<1047832.1259114393125.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393125&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410137> <632400> <ID:<1047832.1259114393128.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393128&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:12 PM CST> <> <> <1259114412026> <984200> <ID:<1047832.1259114393123.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393123&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:16 PM CST> <> <> <1259114416045> <41800> <ID:<1047832.1259114400005.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400005&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    6. At this point Admin Consol shows 6 messages pending in the queue
    and From consumer numbers it is evident that consumers in WIN Box2 domains have not processed any messages
    Now if I stop server in WIN Box2 Domain1, WIN Box1 picks up the messages instantely
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202343> <897600> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session80.consumer82)> <> <>
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202346> <421900> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session83.consumer85)> <> <>
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202379> <582300> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session86.consumer88)> <> <>
    ####<Nov 24, 2009 8:13:24 PM CST> <> <> <1259115204888> <4600> <ID:<1047832.1259114400029.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400029&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:13:32 PM CST> <> <> <1259115212820> <256700> <ID:<1047832.1259114400258.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400258&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:13:43 PM CST> <> <> <1259115223579> <280600> <ID:<1047832.1259114400032.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400032&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    7. At this poing Admin Consol shows 3 messages pending in the queue
    Now if I stop server in WIN Box2 Domain2, the remaining 3 gets processed
    ####<Nov 24, 2009 8:16:08 PM CST> <> <> <1259115368998> <193400> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session90.consumer92)> <> <>
    ####<Nov 24, 2009 8:16:08 PM CST> <> <> <1259115369000> <885500> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session93.consumer95)> <> <>
    ####<Nov 24, 2009 8:16:09 PM CST> <> <> <1259115369002> <902500> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session96.consumer98)> <> <>
    ####<Nov 24, 2009 8:16:25 PM CST> <> <> <1259115385151> <123700> <ID:<1047832.1259114400324.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400324&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:16:29 PM CST> <> <> <1259115389660> <836600> <ID:<1047832.1259114400535.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400535&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:16:37 PM CST> <> <> <1259115397823> <610200> <ID:<1047832.1259114400432.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400432&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    Kindly throw some light on this issue. Also do let me know if you need any more specific details about this.
    Thanks,
    Abhijeet
    Edited by: user5240164 on Nov 25, 2009 11:35 AM
    Edited by: user5240164 on Nov 28, 2009 1:21 PM

    Hi,
    The problem may be conflicting names in your configuration. To ensure proper operation of WL Security, JMS, JTA, and JDBC, make sure that (A) each domain has a unique name, and (B) no two WebLogic servers have the same name (even if in two different domains).
    To ensure a more even distribution of messages, either simply send more than a token amount messages (eg, a hundred or so, rather than just 12), or configure a custom connection factory on the domain that hosts the queue, reduce MessagesMaximum on the connection factory to 1, and then modify each MDB to refer to the custom connection factory. The MessagesMaximum setting controls the number of messages that can be pre-pushed (pipelined) to a single asynchronous consumer.
    For more information see "Best Practices for JMS Beginners and Advanced Users" in the latest versions of the JMS admin guide, and "JMS Performance & Tuning Check List" in the WebLogic Performance and Tuning guide.
    Tom

  • JMS messages stuck in queue in weblogic v923 cluster

    Hi all,
    Enviornment details:
    In our pre-production weblogic v923 cluster enviornment with Oracle 10g database, there are 10 server boxes with 2 managed nodes running on each server box in linux enviornment.
    There are 3 JMS queues and 1 error queue per managed node.
    All the queues are durable and the persitence store is a database table. There is a single database table per single managed node.
    High loads of JMS messages from client applications coming on each of the 3 JMS queue are processed by the cluster on daily basis.
    The JMS messages that failed to be processed the very first time due to the application logic exceptions are put on error queue since the retry is set to zero on the non-error queue.
    The application exceptions are logged to a database table for futher reference.
    The falied messages from the error queue are read by spring based MDP and resent to the application for reprocessing.
    If no application exceptions, the message will be persisted in a relational database; in the case of failures, MDP code puts the failed message back on to the error queue.
    The auto_ack is true on the JMS message.
    It is observed about less than 1% of the messages fail the original processing and are in error queue on daily basis.
    99.9% of the time, the reprocessing of the messages from the error queue is a success.
    Currently due to some obvious reasons, the system administrator stops a managed node when the disk is full and start a different managed node on the same server box. This approach will be stopped in the very near future so that all nodes on all servers are running at any point of time by making few enviornment changes.
    Problem:
    1a) Occasionally, it is observed that 1 - 4 JMS messages are stuck in the error queue. There are no signs of reprocessing as there are no application exceptions or the corresponing insert into the database. The JMS persistence store table still has the JMS message.
    1b) It is observed that over time, the same JMS messages that were originally stuck on server 1's managed node A are no longer there but are found in a different node (say node B) on a different server box.
    As far as I understand the JMS, a message could be in a Pending state if MDP (in my case) does not automatically send ACKNOWLEGMENT back due to an issue in the Spring Defaultlisternercontainer before calling MDP's onMessage(). I am not sure as what happens to that status over time).
    It is also observed that the stuck messages content is not much different than the other messages that are processed fine.
    Any pointers/input is highly appreciated.
    Thanks in advance for your valuable input and time.

    Off the top of my head, I can only think of two reasons why a message might move from node to node:
    (A) An application is dequeueing them and enquening them elsewhere.
    (B) The application is using distributed queues, and the distributed queue has been configured to enable "queue forwarding". The forwarding feature automatically moves messages from distributed queue members that have no consumers to members that do have consumers. Queue forwarding is sometimes enabled as a work-around to better enable MDP support of WL distributed destinations, unlike WebLogic MDBs, MDPs have no container logic to ensure that all members of a distributed destination are serviced by a consumer under all circumstances...
    Regards,
    Tom

  • JMS Message Queue - stuck in

    I am on SOA SUITE 11.1.17
    I have a jms queue set up and am able to successfully send messages to it using the SOA JMS Adapter.  I am able to succesfully listen to a queue using a JMS adapter in a different project.
    However, here when I try to "listen" to the queue using a java program, the message is "received" in my java program and processed as it should be.  The java program is running in a while loop, so it stays running.
    On the queue, when the java program reads it, the message is moved to the "Messages Pending" column.  When I kill the java program, the message is returned to the "Messages Current"
    Would anyone have any ideas about this?  We have an existing java based program isn't properly "closing" the message.
    I tried:
    1.  placing msg.acknowledge() in the code, since the documentation states that messages that are in "Messages Pending" have been read, but not acknowledged or committed -- but this does nothing.
    2.  Setting the expiration on the message to 1, but that is a hack.  I would rather fix the problem than use a hack.
    Anyone have any ideas what is wrong?
    Thank you,
    Stuart
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.jms.Connection;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    public class JMSListenAndRespond extends JMSQueueHandler implements MessageListener {
      private Session jmsSession = null;
      private MessageConsumer jmsMessageConsumer = null;
      private Connection jmsConnection = null;
      int counter = 1 ;
      public static void main(String[] args) throws Exception {
        InputStreamReader commandBuffer = null;
        char command = '\0';
          // first listen for any messages
          JmsDataObject q = new JmsDataObject();
          q.setJmsCF("jms/TestConnectionFactory");
          q.setJmsQueue("jms/TestJMSQueue");
          q.setServerPwd("welcome1");
          q.setServerLogin("weblogic");
          q.setUrl("t3://localhost:7101");
          q.setJmsMsg("na -- we are listinging...");
        JMSListenAndRespond lis = new JMSListenAndRespond();
         lis.consumeMessage(q);
        System.out.println("(type q to exit at any time...)\n");
        try {
          // Now just loop, waiting for messages until user types 'q' to quit
          commandBuffer = new InputStreamReader(System.in);
        while (!(command == 'q')) {
           try {
              command = (char)commandBuffer.read();
              System.out.println("Command: "+command);
              lis.stopListening();
            } catch (IOException e) {
              System.err.println("I/O Exception: ");
              e.printStackTrace();
           } //while
        } finally {
                lis.stopListening();
          lis.stopListening();
       public void stopListening() {
        try {
          if (jmsMessageConsumer != null) {
            jmsMessageConsumer.close();
          if (jmsSession != null) {
            jmsSession.close();
          if (jmsConnection != null) {
            jmsConnection.close();
        } catch (JMSException e) {
          System.err.println("Couldn't properly close all resources.\n");
          e.printStackTrace();
      private void prepareToConsumeMessage() {
        // create JMS connection, session, consumer and register listener - then start session
            try {
          // create connection
          jmsConnection = getJmsConnectionFactory().createConnection();
          // create session
          jmsSession =   jmsConnection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
          jmsMessageConsumer = jmsSession.createConsumer(getJmsDestination());
          // register a message listener (onMessage)
          jmsMessageConsumer.setMessageListener(this);
          // initiate connection - make sure to register your listener first or you might lose messages
          jmsConnection.start();
          System.out.println("\n...listening for message!\n");
        } catch (JMSException e) {
          System.err.println("Problem initializing JMS session");
          e.printStackTrace();
          System.exit(-1);
         * onMessage
         * The callback function invoked upon message reception
      public void onMessage(Message msg) {
        try {
          String msgText;
          if (msg instanceof TextMessage) {
            msgText = ((TextMessage)msg).getText();
            // this method expects a CSV string with the following makeup:
            // firstName,lastName,gender,birthdate,address,city,zipcode,state,insurancePolicyId
            String messageId = msg.getJMSMessageID();
          // code to process goes here.....
          } else {
            // if message is not a TextMessage, attempt a conversion to string
            System.out.println("\n** NEW MESSAGE (" + msg.getClass().getName() +
                               "):\n" +
                msg.toString());
        } catch (JMSException e) {
          e.printStackTrace();
      public void consumeMessage(JmsDataObject q ) {
        initializeJndiProperties(q);
        initializeJNDIandCF(q.getJmsQueue());
        prepareToConsumeMessage();
    import java.util.Properties;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.Destination;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public abstract class JMSQueueHandler {
      protected void initializeJNDIandCF(String destinationQueueName) {
        // initialize JNDI context and lookup connection factory and destination
        try {
          // Initialize JNDI context
          jndiContext = new InitialContext(jndiProperties);
        } catch (NamingException e) {
          e.printStackTrace();
        try {
          // lookup JMS connection factory in JNDI
          jmsConnectionFactory =
              (ConnectionFactory)jndiContext.lookup(jndiProperties.getProperty("factory.name"));
          // lookup JMS destination in JNDI
          jmsDestination = (Destination)jndiContext.lookup(destinationQueueName);
        } catch (NamingException e) {
          System.err.println("Problem during the JNDI lookup\n");
          e.printStackTrace();
          System.exit(-1);
      public void initializeJndiProperties(JmsDataObject qdo ) {
        // set JNDI properties
        jndiProperties.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
        jndiProperties.put("java.naming.provider.url", qdo.getUrl() );
       // jndiProperties.put("java.naming.security.principal", NAMING_PRINCIPAL);
        jndiProperties.put("java.naming.security.principal", qdo.getServerLogin() ) ;
        //  jndiProperties.put("java.naming.security.credentials", NAMING_CREDENTIAL);
        jndiProperties.put("java.naming.security.credentials", qdo.getServerPwd() );
        //jndiProperties.put("factory.name", JMS_CONNECTION_FACTORY);
        jndiProperties.put("factory.name", qdo.getJmsCF() );
      //protected static final String NAMING_PROVIDER_URL = "t3://localhost:7101";
    //protected static final String NAMING_PRINCIPAL = "weblogic";
    // protected static final String NAMING_CREDENTIAL = "welcome1";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/patientsJmsCF";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/TestConnectionFactory";
      ConnectionFactory jmsConnectionFactory = null;
      Destination jmsDestination = null;
      InitialContext jndiContext = null;
      Properties jndiProperties = new Properties();
      public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
        this.jmsConnectionFactory = jmsConnectionFactory;
      public ConnectionFactory getJmsConnectionFactory() {
        return jmsConnectionFactory;
      public void setJmsDestination(Destination jmsDestination) {
        this.jmsDestination = jmsDestination;
      public Destination getJmsDestination() {
        return jmsDestination;

    Thanks for the reply. There are no errors what so ever regarding MDB issues. Not in the weblogic / console logging, nor in the logging of the component itself.
    The MDB itself is setup to have 16 concurrent beans per component deployment. The component is clustered over 4 server instances. So there are quite some concurrent MDBs running. However since the messages get stuck for weeks eventhough the component only has bursts of messages to process, one would think that the the stuck messages would be processed whenever the component has some spare time (which it has a lot between the bursts).
    Therefor i doubt it has anything to do with too little MDBs running. But frankly I have no idea what's wrong.

  • Format of "JMS Message Destination Parameter" for JMS Sender Adapter

    Hi,
    I am trying to use the JMS Sender Communication Channel for several Interfaces by using the "JMS Message Destination Parameter". Currently, the Comm.Channel is reading the message and puts it back on the queue with the following error:
    Fehler bei der XI-Eingangsverarbeitung für Message am bzw. um 2007-07-25|09:34:12.057+0200. JMS- und XI-Identifikatoren für die Message sind ID:414d512051535749515441302020202046a4e892201c4d04 bzw. 701ec850-3a81-11dc-8176-00306e2c36a3. Der JMS-Adapter führt einen Rollback der Datenbank und der JMS-Sitzungtransaktionen durch. Wird die Sitzung ausgeführt, geht die Message nicht verloren und wird später erneut durchgeführt. Der Ausnahme-Stack-Trace ist java.lang.RuntimeException: MQJMS0003: Destination not understood or no longer valid: UserCreateRequest
    at com.ibm.mq.jms.MQDestination.createDestination(MQDestination.java:790)
    at com.ibm.mq.jms.MQSession.createDestination(MQSession.java:1092)
    at com.ibm.jms.JMSMessage.getJMSDestination(JMSMessage.java:4127)
    What is the format I will have to fill this parameter with in order for XI to understand it? I have tried the following so far which did not work:
    1.   (as in error message above)
    Help much appreciated.
    KR,
    Colin.

    One option in BPEL is to have a mid process receive, but this would require you to handle the Correlation of the message with BPEL process instance.
    Please refer the following section in SOA Guide for the same.
    Using Correlation Sets and Message Aggregation - 11g Release 1 (11.1.1.7)
    Please note the example is with File adapter but the same can be achieved for Any Adapter.

  • Using Weblogic jms message id for unique id

    Hi All,
    We have a requirement to generate random unique id for each message processed by the application. We are planning to leverage weblogic jms message id for this purpose rather than building our own application logic for this purpose . Will there be any issue adopting this ? We think weblogic jms message id will be unique across the cluster as id is a hash of current timestamp + jms server name + wl server name + ?? .. is this correct ?
    TIA
    Atheek

    Hi Atheek,
    It depends on what are you planning to do with that id, as there are some gotchas on Weblogic's JMSMessageID generation.
    I guess the msg id could be considered statiscaly unique as Tom says, but the msg id will change during the livecycle of your message, surprise! (yea, the JMS spec allows the JMS server to modify the msg ids).
    So if you want to use that id to correlate messages id, or to group info related to one message, using JMSMessageID could be a problem.
    You can consider to generate a UUID, using Java 1.5 support (java.util.UUID) or a external library (JUG http://jug.safehaus.org for instance), and attach that id as a JMSCorrelationId or a user defined property.
    Hope this helps

Maybe you are looking for

  • Report on Metadata

    I need to make a report on Metadata either in BW 3.5/ BI7.0. The report should contain variables of (user should enter the values) InfoArea, InfoCube, queries in that InfoCube and the InfoObject for that Query. I know 2 InfoObjects: 1> 0TCTQUERY-----

  • Delete Rows for a Table in VC 7.2

    I could able to delete the rows of a table some times and some times it is not clearing I have a button with different actions and one of the action is to clear the delete the rows of a table. some times it is working some times it is not. I am tryin

  • How do I omit an object when serializing?

    I want to serialize a class that has an object of a class that has an AudioClip object in it and Java is not letting me serialize it. I think there is a way to tell the output stream to skip an object in a class but I can't remember how and I can't f

  • Who can explain me why my credit card is rejected  ?

    I have just changed my IPhone 3GS for a 4S. And now, my credit card (in force for a few months remaining) is rejected, Apple store telling me that my credit card is nor valid in France (Visa) , nor my number ....... although I can buy everything evew

  • Replacing A Cloudy Sky with A Blue Sky

    Can anyone suggest an easy way to replace a cloudy sky with a blue sky using Photoshop? I'm doing real estate photography currently, and I have to take photos on a cloudy day. My major problem is when I have trees in the photo that I need to replace