JMS message transacted

I am trying to deploy a MDB PTP implementation within WebLogic 7 and I keep getting the following error. Could some please enlighten me to what configuration or code changes I need to make?
Thankyou in advance for any help :-)
####<4/10/2002 10:20:56> <Warning> <EJB> <WSJON> <T5MBankServer> <ExecuteThread: '9' for queue: 'default'> <kernel identity> <> <010061> <The Message-Driven EJB: mBankingJMSBean is unable to connect to the JMS destination: mBankingJMSQueue.
The EJB container will automatically attempt to re-establish the connection with the JMS server. This warning may occur during WebLogic Cluster start-up if the JMS destination is located on another WebLogic Server instance. When the JMS server connection is re-established, the Message-Driven EJB will again receive JMS messages.
The Error was:
Message Driven Bean 'mBankingJMSBean' is transacted but the provider defined in the ejb is not transacted. Provider should be transacted if onMessage method in MDB is transacted.>

The connection factories that you configure for your MDB must return XAConnection. From that the MDB container can create XASessions and ultimately get access to the XAResource for your JMS provider. If your factory is not returning XA connections.
My guess is you are using container managed transactions. That is you want everything in the same transaction. Without XA support from your JMS provider the container cannot provide the guarantees that you have requested, therefore it fails the connection (rather than lie to you and give you something that is not atomic).

Similar Messages

  • JMS adapter transaction. Rollback message to queue.

    Hi all !
    A have question about jms adapter transaction. My composite application has 3 steps : JMS adapter (listener), mediator, WS adapter. JMS adapter listen queue push message to mediator, mediator invoke web service. If ws not available (server down), mediator try recovery 5 times. After 5 times, reject message from queue. I wont rollback message to queue. I saw examples with JMS + BPEL, but it not help me. Anybody can help me.

    Hi,
    You don’t need to catch a mediator fault – you can let it rollback to the JMS Queue and let the Queue do the retries.
    To get the retries working, log in to the weblogic console and navigate to JMS Modules -> Your Module -> Your Queue -> Configuration -> Delivery Failure
    Here you will find options for Redelivery Limit. Set this to the number of retries you need.
    Then navigate to the connection factory you want and set the redelivery delay.
    This should get your desired behaviour, but once the message has failed it will be discarded. If you prefer to put it on an error queue you can create an error queue, and in the original queue’s, goto Delivery Failure, change the expireation policy and set the Error Destination to be your error queue.
    Hope that helps!
    Robert

  • JMS Messages Refusing to participate in JTA transaction

    I have been working on this issue for several days, and I cannot find a path out.
    I have a situation where I need to write to the database and also send out a JMS message. I want either both to work, or nothing to work, so its a straightforward JTA application, so I would think.
    The JMS connection factory in use is set to participate in XA transactions (I have checked this 10 times).
    I originally had a UserTransaction started and committed around these statements, but since this did not seem to be working, I put all the code in an EJB with transaction Required.
    Either way, it is not working the way I expect.
    I have a break point in the MDB that receives the message, as well as a break point on the publisher code and the code immediately after it. I find every time that as soon as I step past the JMS publish, the breakpoint in the MDB stops next, indicating that the JMS message was sent out, even though the publishers transaction is definitely not completed -- eventually the debugger will return back to the next line after the publish.
    I am pretty sure we have done this many times in the past, and it has worked like I expect transacted code to work.
    Anyone have any ideas on obvious things to check to determine why the JMS message is going out outside of the transaction? Or not so obvious...
    Thanks in advance,
    ken clark

    Hi Ken,
    You're right -- the use case is common, but there are a couple pitfalls that new users sometimes run into.
    The break-point tracing results that you have are expected. A sender's message goes to the JMS server while the message send call is made. If the message is participating in the transaction, it is still sent, but it won't become visible to consumers until the transaction is later committed.
    To ensure that a sent message participates in a transaction:
    1 - ensure the connection factory is "XA enabled"
    2 - ensure there's a transaction on the thread. For example: System.out.println("MY TX" + weblogic.transaction.TransactionHelper.getTransactionHelper().getTransaction());
    3 - ensure that your connection.createSession() invoke passes "false" for the first parameter -- not true! if true and you're not using a resource ref, then the session becomes a "transacted" session, and JMS messages will participate in an independent local transaction rather than the global XA transaction
    4 - If not using a WebLogic JMS to send, then you need to ensure that WebLogic automatically enlists the foreign vendor send call in the WL TX. All that is required is to use a standared JEE "resource reference" to obtain the CF. rather than directly looking up the foreign CF in the foreign JNDI provider. This lets WebLogic detect and wrap the application's foreign vendor calls, which in turn enables automatic enlistment. See the WebLogic JMS Interop FAQ for more info.
    4B - If you're using AQ-JMS to send, more work is required, as AQ-JMS is fairly unique among JMS implementations. WL 10.3.1 and later provides features to simplify this work.
    For a related FAQ see [ Integrating Remote JMS Providers | http://download.oracle.com/docs/cd/E15523_01/web.1111/e13727/interop.htm#JMSPG553 ], and for resource ref info see [ Enhanced Support for Using WebLogic JMS with EJBs and Servlets|http://download.oracle.com/docs/cd/E15523_01/web.1111/e13727/j2ee.htm#g1329180 ] (especially example 9-5).
    Hope this helps,
    Tom

  • 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 - PI - IDoc scenario: possible to disable check for duplicate JMS message ID?

    Dear all,
    we have a scenario JMS - PI - IDoc. We are on 7.4 SP 7 AEX.
    Once and again we get this error in PI Logs
    com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(MessageFilterContext filterCtx)
    Duplicated and already processed JMS message with JMSMessageID ID:414d512053415050523120202020202053f0f4852000fb39 and XI message id b0beffdbcee64c2605779eaacf27b335 detected.
    We are currently investigating the error and it seems that the duplicate message IDs already exist on the JMS (MQ) side. The messages with the same ID reside in the same queue but have different payloads, so really are different messages
    While it's certainly true that we need to get rid of those duplicate IDs in the long run, I'd like to ask if it is possible to tackle the problem from both sides.
    My sender JMS Adapter looks like this:
    Transactional JMS Session = Checked
    Set PI Message ID (MessageID) to = GUID
    Set PI conversation ID (ConversationID) to = No Value
    Enable Duplicate Handling = Unchecked
    Prefix Channel ID = Unchecked
    --> Is there any way to tell PI to just ignore the duplicate JMS ID and continue processing?
    Many thanks
    Kind regards
    Jens

    Hi Jens - Please have a look at the below note if it helps.
    If you want the duplicate messages received from different channels (that is JMS Messages with the same Message ID) to be processed as a distinct JMS messages and not as duplicate messages, select Prefix Channel ID to JMS Message ID
    Reference :
    Configuring the Sender JMS Adapter - Advanced Adapter Engine - SAP Library

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

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

  • JMS messages sometimes not received by Flex client

    We have a problem that Flex client is sometimes not able to
    receive JMS messages from a JBoss JMS Queue. Most of the time it
    works, but if users logout/login using the same account frequently
    or you restart JBoss 4.0.4 during their session then it might
    happen. Then it doesn't work at all even if you wait. Client is
    able to send messages when this problem occurs, which can then be
    intercepted by other clients but cannot receive any messages from
    himself or from the others. JBoss 4.0.4 is running in cluster mode.
    Could it be that there is an old frozen session which is receiving
    the messages meant for the new client?(consumer selector is unique
    to each user, but if a user logs in twice, the same selector is
    used) If I run 2 instances of my JMS test consumer using the same
    selector then the consumer which registered later receives the
    messages and if it quits, then the older consumer starts receving
    them. This doesn't occur in Flex.
    Flex is running on Tomcat 5.5.17.
    Our messaging-config.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="message-service"
    class="flex.messaging.services.MessageService"
    messageTypes="flex.messaging.messages.AsyncMessage">
    <adapters>
    <adapter-definition id="actionscript"
    class="flex.messaging.services.messaging.adapters.ActionScriptAdapter"
    default="true" />
    <adapter-definition id="jms"
    class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
    </adapters>
    <destination id="JMSQueueB">
    <properties>
    <network>
    <session-timeout>10</session-timeout>
    </network>
    <jms>
    <initial-context-environment>
    <property>
    <name>java.naming.factory.url.pkgs</name>
    <value>org.jboss.naming:org.jnp.interfaces</value>
    </property>
    <property>
    <name>Context.PROVIDER_URL</name>
    <value>jnp://x.x.x.x:1100,jnp://x.x.x.y:1100</value>
    </property>
    <property>
    <name>Context.INITIAL_CONTEXT_FACTORY</name>
    <value>org.jnp.interfaces.NamingContextFactory</value>
    </property>
    </initial-context-environment>
    <destination-type>Queue</destination-type>
    <message-type>javax.jms.TextMessage</message-type>
    <connection-factory>ConnectionFactory</connection-factory>
    <destination-jndi-name>queue/B</destination-jndi-name>
    <destination-name>B</destination-name>
    <delivery-mode>PERSISTENT</delivery-mode>
    <message-priority>DEFAULT_PRIORITY</message-priority>
    <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
    <transacted-sessions>false</transacted-sessions>
    </jms>
    </properties>
    <channels>
    <channel ref="my-rtmp"/>
    <channel ref="my-secure-amf"/>
    </channels>
    <adapter ref="jms"/>
    </destination>
    </service>
    Part of our actionscript code:
    pmConsumer = new Consumer();
    pmConsumer.destination = "JMSQueueB";
    pmConsumer.selector = "some jms selector ....";
    pmConsumer.addEventListener(MessageEvent.MESSAGE,
    presenceMessageHandler);
    pmConsumer.addEventListener(MessageFaultEvent.FAULT,
    faultHandler);
    pmConsumer.addEventListener(ChannelFaultEvent.FAULT,
    channelFaultHandler);
    pmConsumer.subscribe();
    Also Flex seems to be handing channel switching incorrectly,
    if rtmp port is firewalled, it won't use amf properly even though
    it was given 2 channels in configuration file and JMS messaging
    doesn't work. We have to alter the channel set during runtime.
    Flex also doesn't automatically switch to other JMS server if
    one goes down. Is this a feature or a bug? We have to reset
    producer and consumer in order for this to work.

    Hi,
    It was in earlier version of the OS that you could turn Bonjour On and Off.
    If this can be done in Leopard and Snow Leopard I have not found it yet. (But I don't look that often and nor for very long)
    This Forum may help with that
    I would also try a PRAM reset. (on Both computers)
    Shut down the computer.
    Restart it holding down APPLE(or ⌘)ALT+PR Keys until you have heard three Start Up Bongs.
    7:18 PM Tuesday; December 8, 2009
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • JMS Messages Stuck in Pending

    Hi,
    We have Weblogic JMS provider and we use spring JMS listener to read messages of the queues. Our Spring listeners are running inside a webMethods Integration Server container. For a few of the queues, we have been seeing messages that are stuck in the "Pending" state on the JMS queues. The state string inside webLogic is shown as "receive". We don't have any evidence from our logs that the message actually is received by the listener or by subsequent processes down stream. The messages gets cleared when the Weblogic server is restarted.
    Has anyone faced a similar issue or any ideas as to what might be causing this stuck messages?
    Our weblogic version is 9.2
    Regards,
    Aneel
    Edited by: user3127831 on Mar 24, 2009 7:02 AM

    Hi Aneel
    Typically JMS messages get stuck in pending state between components because of XA issues - due to configuration on one side of the fence or another, transactions aren't committed successfully, so a JMS message is placed on a queue successfully, but is not available due to the transaction that created it not committing successfully.
    What is creating the messages being placed on the queues? What's the difference between how you're creating messages for the queues you can read successfully and the ones that are not becoming available?

  • MDB sending a JMS message to a queue (WLS 8.1.4)

    We are trying to implement a MDB to send a JMS message to a dynamically created JMS queue. Is this possible? We have found documentation stating the JMS Queue destination needs to be in the deployment descriptor, but in our case it changes so this is not an option. Any help would be appreciated.

    Sorry I didn't address the answers more clearly. You were correct on the answers except with:
              Switch from using a resource-reference to a direct reference for a send? Answer: No. We are only trying a direct send, not utilizing the resource-reference.
              We are already using "false" for the connection.create[Queue]Session code.
              Should we be trying something else because of transactional behavior of not utilizing the resource-reference for the send as you thought?
              We have tried the queue as XA and non-XA and neither work.

  • JMS Message Bridge - WLS to MQ

    Hi,
    Subsequent to my last posts on Foreign JMS Server setup (where I had to receive a msg from a remote MQ Queue), now I have a requirement to post messages to an remote MQ Queue for a diff application.
    As a POC, I configured the JMS Message Bridge with bridge source as my local JMS queue and bridge destination as the Remote MQ Queue and it works fine as expected !!
    just have couple of questions on that -
    1. For a long time, I was struggling with this error on server startup
    <BEA-190032> << eis/jms/WLSConnectionFactoryJNDINoTX > ResourceAllocationException thrown by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.ResourceException: Failed to start the connection ">
    Then I realized from the server log that the actual reason was authentication failure in MQ Queue Manager :
    JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager '' with connection mode 'Client' and host name '77.40.190.130'. Please check if the supplied username and password are correct on the QueueManager you are connecting to AND
    JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
    Since this MQ setup is managed by someone else, when they pass on the .binding file after creating queuemanager, queue, etc, Should I also ask them for the username and password for the QM?? I am not sure if this is a part of the .binding file.
    2. Some doubts around the QOS. As I understood, I am using the No-Transaction Adapter. This means I can use QOS as either "Atmost once" or "Duplicate OK". The latter seems to be ok so that I dont lost messages in any case. But I am yet to find out if the other application is ok to handle duplicates.
    But is there a restriction/limitation to use "Exactly Once" ?? I noticed that there is also an XA-Transaction Adapter in WLS. Is it not possible to use that with MQ?
    Thanks in advance.
    best regards,
    Murali

    In your binding file QCF or XAQCF definition , you will see a Channel field since you are using a client mode to connect to the queue manager. This channel is called a Server Connection Channel [ SVRCONN]. At the queue manager side of things, when this SVRCONN is defined, MQ Admin teams tend to define an attribute called MCAUSER. In this setup the userid used for authorisation at queue manager is the following in the below precedence:
    1. If MCAUSER is defined in the channel, that will be the user id and it overrides any security context sent from client application. This user id should have sufficient permissions to connect to queue manager , get , put. The MQ admin teams on certain platforms will be able to get the exact permission that is missed from the queue manager error logs when a 2035 security exception occurs.
    2. If no MCAUSER is defined then the userid passed in the createConnection JMS call will be the user context used.
    I am not exactly sure of the behaviour when no MCAUSER and no user id in createConnection calls, but i think it takes the user of the MQ Listener process which starts the SVRCONN channel instance when a client initiates the connection.
    So for your situation, it will be worth start checking with how the MQ side configuration is. This issue tends to be a very common issue with client applns connecting to qmgr.

  • ALDSP 3.2 - How to create JMS message from ALDSP

    Is there a way to write a jms message from ALDSP?
    I want to be able to perform database updates to a database and also write a message to queue in a transaction.
    Thanks

    As per my understanding only one resource can be non-transactional. In this case it would be the Web Service.If you have n data sources and the first n-1 are transactional and the nth one is not - if you update the first n-1 successfully, and the nth one fails - then you just throw an exception and the updates to the n-1 data sources get rolled back. If an update to one of the n-1 data sources fails you throw an exception and the update to the nth data source never happens. In your case, it's up to you to ensure the updates are executed in the correct order (how you write your XQSE procedure).
    Will the call to write a jms message from a Java function in ALDSP participate in the database transaction? DSP doesn't suspend the current transaction when calling a Java function. So yes, the JMS call would participate in the same transaction as the database call.
    If you want to dump out the transactionId in your java function in the same format as it appears in the DSP Audit, you can use :
    public String byteArrayToHexString(byte in[]) {
    StringBuffer out = new StringBuffer(in.length * 2 + 2);
    out.append("0x");
    for(int i = 0; i < in.length; i++) {
    byte ch = 0x00;
    ch = (byte) (in[i] & 0xF0);
    ch = (byte) (ch >>> 4);
    ch = (byte) (ch & 0x0F);
    out.append(HEX[(int) ch]);
    ch = (byte) (in[i] & 0x0F);
    out.append(HEX[(int) ch]);
    return out.toString();
    }

  • 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

  • Solution to detect and discard duplicate JMS messages

    Hi All,
              I have a scenario where in I require this scenario:
              Even though JMS messages are sent twice OR multiple times from JMS producer,as for as consumers are concerned,the JMS consumer should be able to detect and discard the message.
              Can somebody tell me how to achive the same?
              Thanks,
              Prashanth Bhat.

    Funny - I was just talking to our product manager about exposing a "duplicate-elimination" feature in a future release. Anyhow, I think there are two solutions:
              (1) Use transactions on the producer side to guarantee it sends exactly-once. (Eg. The client uses the same tx to get its src message as it does to produce the messaage.) This is the standard solution - and, with batching, often turns out to be the highest performing solution (by far).
              (2) Modify the consumer to keep a history of received messages so that it can detect and discard duplicates. There's a white-paper on this topic here:
              High Performance Message Processing with BMT Message-Driven Beans and Spring
              http://dev2dev.bea.com/pub/a/2006/01/custom-mdb-processing.htm
              While the article specifically mentions "Spring", "Message-Driven Beans", and "BMT", the general concepts apply to any queuing system.
              Be sure to read through the comments. :)
              Tom

  • TransactionRolledbackLocalException in JMS messaging application

    Hi, I have a message driven bean (MDB) that gives the following error and I'm unable to resolve it. Any help would be appreciated. Thanks.
    [1/18/06 15:17:44:977 PST] 7d9913e7 SystemOut O Exception occurred inside AppLogMDBean: java.lang.NullPointerException
    [1/18/06 15:17:44:986 PST] 7d9913e7 ServerSession W WMSG0031E: Exception processing JMS Message for MDB AppLogReceiverMDB, JMS
    Destination jms/appLogQueue : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJ
    BException
    com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java(Compiled Code))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrat
    egy.java(Compiled Code))
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java(Compiled Cod
    e))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java(Compiled Code))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrat
    egy.java(Compiled Code))
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    this is the code for the onMessage function of the bean
    public void onMessage(javax.jms.Message msg)
              int executeStatus          = -1;
              Connection con               = null;
              DataSource ds               = null;
              String dataSourceName     = null;
              PreparedStatement stmt     = null;
              MapMessage mapMessage     = null;
              String sqlStatement          = null;
              Properties properties;
              CommonPropertiesHelper propertyHelper;
              try{
                   mapMessage = (MapMessage)msg;
                   propertyHelper = CommonPropertiesHelper.getInstance("EGOVJournal.properties");
                   properties = propertyHelper.getProperties();
                   sqlStatement = properties.getProperty("INSERT_VIRR052U_APP_LOG");
                   dataSourceName = properties.getProperty("DATA_SOURCE");
                   if ( (sqlStatement != null) && (dataSourceName != null)){
                        UserTransaction transaction = fMessageDrivenCtx.getUserTransaction();
                        transaction.begin();
                        javax.naming.InitialContext ctx = new javax.naming.InitialContext();
                        ds = (javax.sql.DataSource) ctx.lookup(dataSourceName);
                        con = ds.getConnection();
                        if (con != null){
                             int x = 1;
                             stmt = con.prepareStatement(sqlStatement);
                             String logId     = mapMessage.getString("LOG_ID");
                             if (logId.length() > 40)
                                  logId = logId.substring(0,39);
                             String jnlId     = mapMessage.getString("JOURNAL_ID");
                             if (jnlId.length() > 40)
                                  jnlId = jnlId.substring(0,39);
                             String appName     = mapMessage.getString("APPLICATION_NAME");
                             if (appName.length() > 30)
                                  appName = appName.substring(0,29);
                             String logLevel     = mapMessage.getString("LOGGING_LEVEL");
                             if (logLevel.length() > 2)
                                  logLevel = logLevel.substring(0,1);
                             String msgName     = mapMessage.getString("MESSAGE_NAME");
                             if(msgName.length() > 100)
                                  msgName = msgName.substring(0,99);
                             String msgDesc     = mapMessage.getString("MESSAGE_DESCRIPTION");
                             if (msgDesc.length() > 1800)
                                  msgDesc = msgDesc.substring(0,1799);
                             stmt.setObject(x,logId);
                             x++;
                             stmt.setObject(x,jnlId);
                             x++;
                             stmt.setObject(x,appName);
                             x++;
                             stmt.setObject(x,logLevel);
                             x++;
                             stmt.setObject(x,msgName);
                             x++;
                             stmt.setObject(x,msgDesc);
                             x++;
                             // Execute the Prepared Statement
                             executeStatus = stmt.executeUpdate();
                             stmt.close();
                             con.close();
                             transaction.commit();
                        else{
                             System.out.println("Connection is null inside AppLogMDBean");
                   else{
                        System.out.println("Either sql or dataSource is null inside AppLogMDBean. Can't continue.");
              catch(NamingException e){
                   System.out.println("NamingException occurred inside AppLogMDBean: " + e);
              catch(JMSException e){
                   System.out.println("JMSException occurred inside AppLogMDBean: " + e);
              catch(Exception e){
                   System.out.println("Exception occurred inside AppLogMDBean: " + e);
              finally{
                   try{
                        if(stmt!=null){
                             stmt.close();
                             stmt = null;
                        if(con != null){
                             con.close();
                             con = null;
                   catch(Exception e){
                        System.out.println("Exception occurred inside AppLogMDBean in finally block : " + e);
         }

    Hi, I have a message driven bean (MDB) that gives the following error and I'm unable to resolve it. Any help would be appreciated. Thanks.
    [1/18/06 15:17:44:977 PST] 7d9913e7 SystemOut O Exception occurred inside AppLogMDBean: java.lang.NullPointerException
    [1/18/06 15:17:44:986 PST] 7d9913e7 ServerSession W WMSG0031E: Exception processing JMS Message for MDB AppLogReceiverMDB, JMS
    Destination jms/appLogQueue : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJ
    BException
    com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java(Compiled Code))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrat
    egy.java(Compiled Code))
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java(Compiled Cod
    e))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java(Compiled Code))
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrat
    egy.java(Compiled Code))
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    this is the code for the onMessage function of the bean
    public void onMessage(javax.jms.Message msg)
              int executeStatus          = -1;
              Connection con               = null;
              DataSource ds               = null;
              String dataSourceName     = null;
              PreparedStatement stmt     = null;
              MapMessage mapMessage     = null;
              String sqlStatement          = null;
              Properties properties;
              CommonPropertiesHelper propertyHelper;
              try{
                   mapMessage = (MapMessage)msg;
                   propertyHelper = CommonPropertiesHelper.getInstance("EGOVJournal.properties");
                   properties = propertyHelper.getProperties();
                   sqlStatement = properties.getProperty("INSERT_VIRR052U_APP_LOG");
                   dataSourceName = properties.getProperty("DATA_SOURCE");
                   if ( (sqlStatement != null) && (dataSourceName != null)){
                        UserTransaction transaction = fMessageDrivenCtx.getUserTransaction();
                        transaction.begin();
                        javax.naming.InitialContext ctx = new javax.naming.InitialContext();
                        ds = (javax.sql.DataSource) ctx.lookup(dataSourceName);
                        con = ds.getConnection();
                        if (con != null){
                             int x = 1;
                             stmt = con.prepareStatement(sqlStatement);
                             String logId     = mapMessage.getString("LOG_ID");
                             if (logId.length() > 40)
                                  logId = logId.substring(0,39);
                             String jnlId     = mapMessage.getString("JOURNAL_ID");
                             if (jnlId.length() > 40)
                                  jnlId = jnlId.substring(0,39);
                             String appName     = mapMessage.getString("APPLICATION_NAME");
                             if (appName.length() > 30)
                                  appName = appName.substring(0,29);
                             String logLevel     = mapMessage.getString("LOGGING_LEVEL");
                             if (logLevel.length() > 2)
                                  logLevel = logLevel.substring(0,1);
                             String msgName     = mapMessage.getString("MESSAGE_NAME");
                             if(msgName.length() > 100)
                                  msgName = msgName.substring(0,99);
                             String msgDesc     = mapMessage.getString("MESSAGE_DESCRIPTION");
                             if (msgDesc.length() > 1800)
                                  msgDesc = msgDesc.substring(0,1799);
                             stmt.setObject(x,logId);
                             x++;
                             stmt.setObject(x,jnlId);
                             x++;
                             stmt.setObject(x,appName);
                             x++;
                             stmt.setObject(x,logLevel);
                             x++;
                             stmt.setObject(x,msgName);
                             x++;
                             stmt.setObject(x,msgDesc);
                             x++;
                             // Execute the Prepared Statement
                             executeStatus = stmt.executeUpdate();
                             stmt.close();
                             con.close();
                             transaction.commit();
                        else{
                             System.out.println("Connection is null inside AppLogMDBean");
                   else{
                        System.out.println("Either sql or dataSource is null inside AppLogMDBean. Can't continue.");
              catch(NamingException e){
                   System.out.println("NamingException occurred inside AppLogMDBean: " + e);
              catch(JMSException e){
                   System.out.println("JMSException occurred inside AppLogMDBean: " + e);
              catch(Exception e){
                   System.out.println("Exception occurred inside AppLogMDBean: " + e);
              finally{
                   try{
                        if(stmt!=null){
                             stmt.close();
                             stmt = null;
                        if(con != null){
                             con.close();
                             con = null;
                   catch(Exception e){
                        System.out.println("Exception occurred inside AppLogMDBean in finally block : " + e);
         }

Maybe you are looking for

  • P6 R8.1.0 Web Access not loading EPS

    Hi, This is really weird situation. It started out of nowhere without any specific change to the app or the DB (SQL Server 2008 R2). Whenever i try to load the EPS (clicking on the tan Project) the Java bar for loading data shows starts and stays the

  • Date Format Issue With Sharepoint DateTime Control

    I Have a Web part where in create child control I am creating my controls. Where I have SharePoint date time control and I want to change the format of the control on change in the browser languages settings. Currenlt I am doing it by setting localID

  • A/c entries

    hi, pl let me know a/c posting entries in case of 1 goods receipt -101 2 goods issue 641 & 643 in case on intra company & inter compant sto

  • Column Arrenge in order in intractive report

    hi.. i want to Arrenge Column according to me in order in intractive report .I have use arrow for up & dowmn in report Column Attributes .but there are no change . How can i arrenge column in order acording to me. Thanks Manoj Kaushsik

  • Cannot retrieve table metadata - Table does not exist: ODP source 0WRKCNT_CATG_TEXT does not exist

    Hi, when i able to import the 0WRKCNT_CATG_TEXT extractor into source system i am getting the above bug Cannot retrieve table metadata - Table does not exist: ODP source <0WRKCNT_CATG_TEXT> does not exist, i have been checked in RSA5 T code to check