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

Similar Messages

  • 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

  • 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….

  • 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.

  • Spring and Jms message: no message in the queue

    Hi all,
    this is my application
    Spring 3.0.5 + Oc4j 10.1.3.3 + Oracle DB + Oracle Aq
    This is the flow:
    1. Update datas
    2. Send jms message
    The application updates correctly datas, in the same transaction sends a message to an oracle jms queue but the queue table is empty.
    Transaction starts with method avvService.updateStatoService()
    This is a log snapshot
    2013-02-07 11:04:48,982 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:365) CLIENT: HOST: - Creating new transaction with name [it.mycompany.gevi.service.avvenimenti.AvvenimentoService.updateStatoAvvenimentoService]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-java.lang.Exception
    2013-02-07 11:04:52,340 [DEBUG] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO.updateService - getStatement 
    2013-02-07 11:04:52,340 [INFO] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO - SQL is:
              UPDATE TABLE_NAME
              SET STATO = ?
              WHERE COD = ?
    2013-02-07 11:04:52,918 [INFO] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO - {1=1, 2=1200300146}
    2013-02-07 11:04:52,949 [INFO] it.mycompany.gevi.service.GenericService.updateService(GenericService.java:50) CLIENT: HOST: - Risultato updateService:1
    2013-02-07 11:04:52,965 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:470) CLIENT: HOST: - Participating in existing transaction
    2013-02-07 11:04:53,730 [DEBUG] org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:464) CLIENT: HOST: - Executing callback on JMS Session: oracle.jms.AQjmsSession@ee2a92
    2013-02-07 11:04:54,167 [DEBUG] org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:567) CLIENT: HOST: - Sending created message: oracle.jms.AQjmsTextMessage@27fdb9
    2013-02-07 11:04:54,526 [INFO] it.mycompany.gevi.service.JMSSenderService.sendMessage(JMSSenderService.java:64) CLIENT: HOST: - JSM Message Sent!
    2013-02-07 11:04:54,526 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:752) CLIENT: HOST: - Initiating transaction commit Spring bean configuration file
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:jee="http://www.springframework.org/schema/jee"
         xmlns:orcl="http://www.springframework.org/schema/data/orcl"
         xmlns:context="http://www.springframework.org/schema/context"
         xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
              http://www.springframework.org/schema/tx
              http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
              http://www.springframework.org/schema/aop
              http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
              http://www.springframework.org/schema/context
              http://www.springframework.org/schema/context/spring-context-3.0.xsd
              http://www.springframework.org/schema/task
              http://www.springframework.org/schema/task/spring-task-3.0.xsd
              http://www.springframework.org/schema/data/orcl
              http://www.springframework.org/schema/data/orcl/spring-data-orcl-1.0.xsd
              http://www.springframework.org/schema/jee
              http://www.springframework.org/schema/jee/spring-jee-3.0.xsd"
         default-lazy-init="true" default-autowire="byName">
         <jee:jndi-lookup id="geviDs" jndi-name="jdbc/DBGeviDS" />
         <jee:jndi-lookup id="geviAqAdmDs" jndi-name="jdbc/AQAdmGeviDS" />
         <orcl:aq-jms-connection-factory id="topicConnectionFactory" data-source="geviAqAdmDs"
          connection-factory-type="TOPIC_CONNECTION" />
         <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
              <property name="sessionTransacted" value="true"/>
            <property name="connectionFactory" ref="topicConnectionFactory"/>
            <property name="explicitQosEnabled" value="true"/>
            <property name="timeToLive" value="60000"/>
            <property name="pubSubDomain" value="true"/>
            <property name="defaultDestinationName" value="VR_INFO_VAR_TOPIC"/>
        </bean>
         <tx:jta-transaction-manager/>
         <tx:annotation-driven transaction-manager="transactionManager"  proxy-target-class="true" />
         <aop:config>
              <aop:pointcut id="genericServiceMethods" expression="execution(* it.mycompany.gevi.service..*Service.*(..))" />
              <aop:advisor pointcut-ref="genericServiceMethods" advice-ref="txServiceAdvice"/>
         </aop:config>
         <tx:advice id="txServiceAdvice" transaction-manager="transactionManager">
              <tx:attributes>
                   <tx:method name="read*Service" read-only="true"/>
                 <!-- Other methods use the default transaction settings (see below) -->
                 <tx:method name="insertReturning*Service"    propagation="REQUIRED" />
                 <tx:method name="create*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="delete*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="update*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="sendMessage" propagation="REQUIRED" rollback-for="java.lang.Exception" />
              </tx:attributes>
         </tx:advice>
         <bean name="genericService" class="it.mycompany.gevi.service.GenericService" />
         <bean name="avvService" class="it.mycompany.gevi.service.avvenimenti.AvvenimentoService"/>
         <bean name="jmsSender" class="it.mycompany.gevi.service.JMSSenderService" >
              <property name="jmsTemplate" ref="jmsTemplate"/>
         </bean>
    </beans>Thanks in advance.

    Hi all,
    this is my application
    Spring 3.0.5 + Oc4j 10.1.3.3 + Oracle DB + Oracle Aq
    This is the flow:
    1. Update datas
    2. Send jms message
    The application updates correctly datas, in the same transaction sends a message to an oracle jms queue but the queue table is empty.
    Transaction starts with method avvService.updateStatoService()
    This is a log snapshot
    2013-02-07 11:04:48,982 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:365) CLIENT: HOST: - Creating new transaction with name [it.mycompany.gevi.service.avvenimenti.AvvenimentoService.updateStatoAvvenimentoService]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-java.lang.Exception
    2013-02-07 11:04:52,340 [DEBUG] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO.updateService - getStatement 
    2013-02-07 11:04:52,340 [INFO] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO - SQL is:
              UPDATE TABLE_NAME
              SET STATO = ?
              WHERE COD = ?
    2013-02-07 11:04:52,918 [INFO] it.mycompany.service.qbuilder.logic.QBUpdateService.doExecute(QBUpdateService.java:62) CLIENT: HOST: - DAO - {1=1, 2=1200300146}
    2013-02-07 11:04:52,949 [INFO] it.mycompany.gevi.service.GenericService.updateService(GenericService.java:50) CLIENT: HOST: - Risultato updateService:1
    2013-02-07 11:04:52,965 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:470) CLIENT: HOST: - Participating in existing transaction
    2013-02-07 11:04:53,730 [DEBUG] org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:464) CLIENT: HOST: - Executing callback on JMS Session: oracle.jms.AQjmsSession@ee2a92
    2013-02-07 11:04:54,167 [DEBUG] org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:567) CLIENT: HOST: - Sending created message: oracle.jms.AQjmsTextMessage@27fdb9
    2013-02-07 11:04:54,526 [INFO] it.mycompany.gevi.service.JMSSenderService.sendMessage(JMSSenderService.java:64) CLIENT: HOST: - JSM Message Sent!
    2013-02-07 11:04:54,526 [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:752) CLIENT: HOST: - Initiating transaction commit Spring bean configuration file
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:jee="http://www.springframework.org/schema/jee"
         xmlns:orcl="http://www.springframework.org/schema/data/orcl"
         xmlns:context="http://www.springframework.org/schema/context"
         xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
              http://www.springframework.org/schema/tx
              http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
              http://www.springframework.org/schema/aop
              http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
              http://www.springframework.org/schema/context
              http://www.springframework.org/schema/context/spring-context-3.0.xsd
              http://www.springframework.org/schema/task
              http://www.springframework.org/schema/task/spring-task-3.0.xsd
              http://www.springframework.org/schema/data/orcl
              http://www.springframework.org/schema/data/orcl/spring-data-orcl-1.0.xsd
              http://www.springframework.org/schema/jee
              http://www.springframework.org/schema/jee/spring-jee-3.0.xsd"
         default-lazy-init="true" default-autowire="byName">
         <jee:jndi-lookup id="geviDs" jndi-name="jdbc/DBGeviDS" />
         <jee:jndi-lookup id="geviAqAdmDs" jndi-name="jdbc/AQAdmGeviDS" />
         <orcl:aq-jms-connection-factory id="topicConnectionFactory" data-source="geviAqAdmDs"
          connection-factory-type="TOPIC_CONNECTION" />
         <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
              <property name="sessionTransacted" value="true"/>
            <property name="connectionFactory" ref="topicConnectionFactory"/>
            <property name="explicitQosEnabled" value="true"/>
            <property name="timeToLive" value="60000"/>
            <property name="pubSubDomain" value="true"/>
            <property name="defaultDestinationName" value="VR_INFO_VAR_TOPIC"/>
        </bean>
         <tx:jta-transaction-manager/>
         <tx:annotation-driven transaction-manager="transactionManager"  proxy-target-class="true" />
         <aop:config>
              <aop:pointcut id="genericServiceMethods" expression="execution(* it.mycompany.gevi.service..*Service.*(..))" />
              <aop:advisor pointcut-ref="genericServiceMethods" advice-ref="txServiceAdvice"/>
         </aop:config>
         <tx:advice id="txServiceAdvice" transaction-manager="transactionManager">
              <tx:attributes>
                   <tx:method name="read*Service" read-only="true"/>
                 <!-- Other methods use the default transaction settings (see below) -->
                 <tx:method name="insertReturning*Service"    propagation="REQUIRED" />
                 <tx:method name="create*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="delete*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="update*Service" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
                 <tx:method name="sendMessage" propagation="REQUIRED" rollback-for="java.lang.Exception" />
              </tx:attributes>
         </tx:advice>
         <bean name="genericService" class="it.mycompany.gevi.service.GenericService" />
         <bean name="avvService" class="it.mycompany.gevi.service.avvenimenti.AvvenimentoService"/>
         <bean name="jmsSender" class="it.mycompany.gevi.service.JMSSenderService" >
              <property name="jmsTemplate" ref="jmsTemplate"/>
         </bean>
    </beans>Thanks in advance.

  • XAException during sending JMS message

    I'am having following exception during sending JMS message using JMSService to remote OC4J queue:
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    <2004-09-15 16:35:02,717> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseSc
    heduledWorker::process> Failed to handle dispatch message ... exception Message
    handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.
    engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Transac
    tion was rolled back: TwoPhase Commit failed; nested exception is: javax.transac
    tion.xa.XAException: rollback(c0:a7:9:14:cd:2d:0:0:2a:0:0:0:0:0:0:0:0:2b:0:ff:2:
    84:8c:1):
    Regards
    Jarek

    Hi Jarek,
    Is it possible to send us a reproducible bpel package or steps to reproduce? you can send the test case to [email protected]
    when you send the zip file could you please rename to .zap extension. I haven't seen this problem before. I want to reproduce this on my development env.
    -muruga

  • 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

  • Lost (and found) JMS - messages

              Using WLS 6.1 and have experienced that JMS messages has not been delivered to
              its consumer correctly. We are interested in any suggestions to what has happend,
              what can be done to avoid the problem in the future, or perhaps how we can find
              out more about the problem.
              We have a message driven bean A which sends messages to the queue Q, of which
              the message driven bean B is the only consumer.
              What we recently have experienced is that some of the messages delivered by A
              to Q never are delivered to B. But the messages seems to be persisted correctly,
              because after a restart they reappear!
              Following is a more detailed description of the scenario:
              1. A message is sendt with DeliveryMode=PERSISTENT and TimeToLive=0. QueueSender.send
              is invoked and returns normally.
              2. The consumers never gets the message (B.onMessage i never invoked with this
              message).
              3. Point 1-2 is repeated for 13 different messages over a period when ~100 similar
              messages are delivered normally.
              4. The server is then restarted.
              5. In the starup log it is indicated that 44 records are found in the JMSStore.
              6. When the server restarts, the "lost" messages gets delivered to B.
              After the server restart we have not experienced the problem again.
              Logs does not show anything unusual about the previous restart.
              Other details:
              There is always exatly 1 instance of A running, and 5-20 instances of B. A implements
              and uses a pool of javax.jms.XAQueueSession instances, which shares a single instance
              of javax.jms.XAQueueConnection. The aknowledge-mode for B is "Auto-aknowledge".
              We're using Weblogic Server 6.1.3.0 / Red Hat Linux 7.3.
              Any help on this problem is appreciated!
              

              I believe we've seen just the behaviour you describe on 6.1 SP2, but only on a
              multi-cpu box (Solaris), and only under load. We can't reproduce the problem reliably,
              and get no error messages/warnings anywhere, so very little to send to customer
              support; by the time we notice this, the problem's long passed, so a thread dump's
              of no use.
              We're going to try and see how SP5 (which has loads of JMS fixes) pans out.
              But if you find anything out, could you post here?
              simon.
              "Harald Stendal" <[email protected]> wrote:
              >
              >Using WLS 6.1 and have experienced that JMS messages has not been delivered
              >to
              >its consumer correctly. We are interested in any suggestions to what
              >has happend,
              >what can be done to avoid the problem in the future, or perhaps how we
              >can find
              >out more about the problem.
              >
              >We have a message driven bean A which sends messages to the queue Q,
              >of which
              >the message driven bean B is the only consumer.
              >What we recently have experienced is that some of the messages delivered
              >by A
              >to Q never are delivered to B. But the messages seems to be persisted
              >correctly,
              >because after a restart they reappear!
              >
              >Following is a more detailed description of the scenario:
              >
              >1. A message is sendt with DeliveryMode=PERSISTENT and TimeToLive=0.
              >QueueSender.send
              >is invoked and returns normally.
              >2. The consumers never gets the message (B.onMessage i never invoked
              >with this
              >message).
              >3. Point 1-2 is repeated for 13 different messages over a period when
              >~100 similar
              >messages are delivered normally.
              >4. The server is then restarted.
              >5. In the starup log it is indicated that 44 records are found in the
              >JMSStore.
              >6. When the server restarts, the "lost" messages gets delivered to B.
              >
              >After the server restart we have not experienced the problem again.
              >
              >Logs does not show anything unusual about the previous restart.
              >
              >Other details:
              >There is always exatly 1 instance of A running, and 5-20 instances of
              >B. A implements
              >and uses a pool of javax.jms.XAQueueSession instances, which shares a
              >single instance
              >of javax.jms.XAQueueConnection. The aknowledge-mode for B is "Auto-aknowledge".
              >
              >We're using Weblogic Server 6.1.3.0 / Red Hat Linux 7.3.
              >
              >Any help on this problem is appreciated!
              >
              

  • Problem in sending JMS message on remote OC4J

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

  • 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

  • How to stop and start MDBs to listen for JMS messages

    Hello! This might be more of an architecture question rather than a technical questing, but I post it here, in the lack of a better place...
    For several years I have been using Webster and Webster MQ to send messages back and forth to clients. The architecture for the middleware platform has been designed around the functionality of ListenerPorts. Listenerports is a Webster functionality that let you "stop" and start to listen to JMS messages for a given MDB either by admin console, or by JMX.
    The arhitecture we used was something like this :
    1.Client sends a persistent message to a queue. (order)
    2. An MDB pics up the order message, calls a SessionBean that "fronts" the IIOP back end system.
    This is quite "out of the box" architecture, but we used the Listenerports to solve a stability problem for our back end system.
    The backEnd system was quite unstable, so the EJB threw an exception (typically because of timeout or connection refused) back to the MDB.
    The Listenerport was "defined" to handle 3 errors before stopping, so the MDB resent the message twice before the listenerport automatically stopped. The nice thing about this feature was that the client could continue to send orders, and was not bothered when the back end system was down.
    When the backEnd system was up and running, we could start the listenerport and it was all back to normal state. We even had a start script that checked the state of the listenerport every 30 minute, and started it automatically if it was stopped, making the admin task of starting the MDB unnecessary..
    Now.. Why am I telling this story..
    I would like to know how this could be done using "clean" J2EE technologies..That is..Not using any technology that is not portable..
    I`m playing with glassfish at home, and it struck me that there is nothing in the J2EE spec that defines the functionality described above ? Am i missing something ?
    I Do not want to stop My application because the back end system is down? That is the only way (i know of) that i can "stop" to listen for messages..
    I can put all the messages on an error queue when the backbend system is down, but that would lead to more code just to handle the error messages. Maybe the easiest way to solve this is to "move" (programmatically) all messages from the error queue over to the "standard" queue every XX minute, but somehow that sounds "wrong"
    Can anyone give me some advice to how this problem situation should be solved ? I`m interested in the solution both from an architectural perspective and from a more technical perspective..
    Best regards
    Hans-Jacob Melby

    Breakpoints, whether normal or conditional, are just meant for debugging of your code.  I had the sense from your question that the pausing you want to do is a part of normal operation of your code.  I would NOT recommend using a breakpoint for that situation.  It would bring up the block diagram showing the breakpoint when it occurs.  A user besides the programmer would not know what to do in that case.
     Yes, both the inner and outer loops would have shift registers.
    Putting a case structure with a small while loop inside the "Pausing Case" is doable.  It just depends on what you are doing or waiting for while the program operation is "paused".

  • 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

  • What is the recommended way for persisting JMS messages?

    What is the recommended way for persisting JMS messages?. As per the IMQ admin documentation , using the default built-in persistence type which is through unix flat files is much efficient and faster, compared to the database persistence .
    Tried setting up the jdbc stuff for database persistence on iAS 6.5 . I am getting the following
    error .
    [24/Apr/2002:16:09:20 PDT] [B1060]: Loading persistent data...
    [24/Apr/2002:16:09:21 PDT] Using plugged in persistent store: database connection
    url=jdbc:oracle:thin:@dbatool.mygazoo.com:1521:qa1 brokerid=ias01
    [24/Apr/2002:16:09:23 PDT] [B1039]: Broker "jmqbroker" ready.
    [24/Apr/2002:16:11:56 PDT] ERROR [B4012]: Failed to persist interest
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Response%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0AisReadonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_Response%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    java.sql.SQLException: ORA-01401: inserted value too large for column
    [24/Apr/2002:16:11:56 PDT] WARNING [B2009]: Creation of consumer SM_Response to destination 1
    failed:com.sun.messaging.jmq.jmsserver.util.BrokerException: Failed to persist interest
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Response%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0AisReadonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_Response%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    java.sql.SQLException: ORA-01401: inserted value too large for column
    Any thoughts?

    From the output, you are using imq 2.0. In that release
    the key used to persist a durable subscriber in the database
    table has a limit of 100 characters. The output shows that
    your value is:
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Res
    ponse%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0Ais
    Readonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_R
    esponse%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    which is much longer than 100 characters.
    You might want to shorten the string you use for the
    durable name.
    And yes, the default file-based persistence store is
    more efficient when compared to the plugged-in persistence
    through a database.

  • How to parse XML content in JMS Message...

    Hi everybody,
    I am currently developing a Message-Driven Bean and has some problem parsing the XML data that contains in the JMS body.
    The XML data is contained in TextMessage (JMS message type) and in order to parse the data, I need to use the DOM builder, which is expecting to read from a file (e.g. abc.xml).
    My question is how can I use TextMessage (can be output to a String) as the input source instead of a file.
    Thanks in advance.

    Hi Boon,
    "Boon Keong" <[email protected]> wrote in message
    news:3dd46800$[email protected]..
    I am currently developing a Message-Driven Bean and has some problemparsing the XML data that contains in the JMS body.
    >
    The XML data is contained in TextMessage (JMS message type) and in orderto parse the data, I need to use the DOM builder, which is expecting to read
    from a file (e.g. abc.xml).
    >
    My question is how can I use TextMessage (can be output to a String) asthe input source instead of a file.
    What about this:
    DocumentBuilder db = ...
    Document doc = db.parse(new InputSource(new
    StringReader(textMessage.toString()));
    or
    Document doc = db.parse(new
    ByteArrayInputStream(textMessage.toString().getBytes()));
    Regards,
    Slava Imeshev

  • Can not dequeue JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE using DBMS_AQ

    I'm having a problem using DBMS_AQ package to dequeue a JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE that was put on the queue using Java JMS API.
    Both JMS header and payload return empty but if I do "select user_data" from the queue table, I can see the message.
    Appreciate any helps or tips.
    Kim

    This has been asked a lot of times - I'm not sure how my initial searching missed all of the other questions/answers related to this topic.
    In our case, the solution was to:
    1) Leave the queue as a sys.aq$_jms_text_message type
    2) Construct a sys.xmltype object with our desired payload
    3) Do a getStringVal() on the xmltype object and use that string as the payload for our queue message
    - Nathan

Maybe you are looking for

  • Getting Connected for the First Time with JDBC

    Hello everyone. I am trying to make my first database connection to a mysql database with Java. I am using jdk 1.5.0, MySQL 4.1.11 nt, and I think I have the freshly downloaded driver C:\jdk1.5.0\jre\lib\ext\mysql-connector-java-3.0.16-ga-bin.jar" in

  • Using wifi and bluetooth at the same time

    Hello, I have a MacBook Pro bought in 2014 and since the latest updates of OS X (10.10.2) I very often face a drop on wifi efficiency when bluetooth is as well enable on the laptop. Even worse, it sometimes becomes completely frozen; as soon as I dis

  • How to create transformations in BI content

    hi, while doing lo extraction , i have used data source 2lis_11_vaitm and cube 0sd_c05. I have replicated the datasource in BI, can anyone tell me how to create transformations to the data target which is 0sd_c05.

  • Sun Hardware Monitoring using HP OVO

    Hello, I want to monitor the SUN Hardware monitoring in HP OVO, e.g. HDD failure, Ram Failure,NIC failure, etc... Can anyone assist me how to gather this informtion from SUN system and monitor in HP OVO, Appriciate for your quick response. Thanks, Eq

  • HELP With Setting Users as Listeners

    I belong to two chats: In the first chat, I am a "MASTER" role. In the second chat, I am the "CREATOR" role. However, in the first chat I can set people as listeners and in the second chat I cannot, which is weird because I'm the creator. For example