Making DB updates and sending message to JMS queue enclosed in a single transaction

          using a container managed transactions can we achieve sending a message to the JMS
          queue and updating DB as part of single transaction with the data base driver not
          supporting XA. If yes what all configurations setting I need to do. I tried to achieve
          this using 2PC but I am getting the error that "javax.transaction.xa.XAException:
          JDBC driver does not support XA, hence cannot be a participant in two-phase commit.
          To force this participation, set the enableTwoPhaseCommit property on the corresponding
          JDBCTxDataSourceproperty, to true. Pool = ejbPool".
          

As far as I know, your only options is to do as the exception you cut-and-pasted below
          states:
          "To force this participation, set the enableTwoPhaseCommit property on the corresponding
          JDBCTxDataSourceproperty, to true. Pool = ejbPool"
          The "enableTwoPhaseCommit" property has definite drawbacks
          see the javadoc and/or documentation for configuring
          a "JDBCTxDataSource".
          This problem is specific to non-XA resources in general, not JMS (which is an XA resource),
          you may wish to get more info by posting to the transaction newsgroup.
          Tom
          Manoj Bansal wrote:
          > using a container managed transactions can we achieve sending a message to the JMS
          > queue and updating DB as part of single transaction with the data base driver not
          > supporting XA. If yes what all configurations setting I need to do. I tried to achieve
          > this using 2PC but I am getting the error that "javax.transaction.xa.XAException:
          > JDBC driver does not support XA, hence cannot be a participant in two-phase commit.
          > To force this participation, set the enableTwoPhaseCommit property on the corresponding
          > JDBCTxDataSourceproperty, to true. Pool = ejbPool".
          

Similar Messages

  • Unable to send messag to JMS Queue using Java

    Hi all,
    I am trying to send a string to the JMS queue using java. I am unable to send the message. It is getting failed at the look up for connection factory. I am using the below code for this purpose.
    public static void messageEnqueue(String payload) throws JMSException,
    NamingException,
    IOException {
    Session session = null;
    MessageProducer publisher = null;
    TextMessage message = null;
    Context context = new InitialContext();
    QueueConnectionFactory connectionFactory =
    (QueueConnectionFactory)context.lookup("*java:comp/env/XAConnectionFactoryJNDIName*");
    Connection connection = connectionFactory.createConnection();
    Queue Queue1 =
    (Queue)context.lookup("*java:comp/env/QueueName*");
    session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
    publisher = session.createProducer(Queue1);
    message = session.createTextMessage(Payload);
    connection.start();
    publisher.send(message);
    connection.stop();
    connection.close();
    kindly help on this.
    Thanks
    Edited by: 887737 on Jun 28, 2012 9:47 PM

    887737 wrote:
    Hi EJP,
    This is the Exception I got when I ran the java class directly from Jdeveloper. Can't I run the standalone class directly from Jdeveloper to insert the message into remote queue?
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at javamail.MessageEnqueue.messageEnqueue(MessageEnqueue.java:30)
         at javamail.MessageEnqueue.main(MessageEnqueue.java:51)Hmm. The stack trace doesn't involve any JMS code. Is javamail.MessageEnqueue.messageEnqueue your application? It seems to be doing a JNDI lookup, and you haven't configured JNDI properly. Exactly how to do this depends on what JNDI provider you are using. Earlier in the thread you mentioned you were using WebLogic, so the answer may lie in the WebLogic documentation.
    Nigel

  • Recieve/Read  Messages  from JMS Queue through ALSB

    Hi,
    I have configured JMS Queue in weblogic server.
    I have created Messaging Service in ALSB which sends messages in MESSAGE QUEUE.
    Now Is it possinle to receive messages from JMS Queue by creating business service in Aqualogic Service bus???

    Hi dear,
    <br>
    I am sending Message through Serializable Object.
    <br>
    I have JMS Proxy which gets invoked when i send message to JMs Queue. JMS Proxy then calls business service.
    <br>
    <br>
    Business Service has two functions. One is taking String as input and one is taking Serializable Object as Input.
    <br>
    <br>
    public void recieveString(String str)<br>
    public void recieveObject(Trade obj)<br>
    --------------------------------------------------<br>
    Now I have configured Proxy Services' Request and Response
    Message Type as a "TEXT". and I am sending ObjectMessage here so what kind of change I require.
    <BR>
    I also want to configure my proxy so that if JMS queue recieves TextMessage then it should invoke reciveString() function and if Object Message then vice versa.....
    <BR><BR>
    But i am not able to handle object even...
    When I am sending Object Message it takes as a TextMessage.
    I am getting following exception when I am sending Object Message to JMS QUEUE. Request and Response Message types are XML Schema of that object.
    <BR>
    <BR>
    <Nov 30, 2006 4:57:19 PM IST> <Warning> <EJB> <BEA-010065>
    <BR>
    <MessageDrivenBean threw an Exception in onMessage(). The exception was: java.lang.AssertionError.<BR>
    java.lang.AssertionError at com.bea.wli.sb.transports.jms.JmsInboundMDB.onMessage(JmsInboundMDB.j
    ava:112)
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:42
    9)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDL
    istener.java:335)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:
    291)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4060)
    Truncated. see log file for complete stacktrace
    >
    Message was edited by:
    alwaysvaghu

  • Error while sending the messages to JMS Queue

    Hi ,
    I am trying to pick the file from JMS Queue and send the response xml as outbound message to JMS Queue again using XAI Sender
    I Created XAI Sender, Outbound Message Type(DM-RCVRESP) and configured these two with External System.
    I am able to pick the file from JMS Queue but unable to send the message through XAI Sender (Real-time)
    Plz find below the error trace getting.
    [Wed Jun 15 16:12:09 IST 2011] Error while processing sender "UPLOADSTG" : Unable to update response in staging table: Row id not given.
    com.splwg.mpl.sending.SameThreadSendingManager$ProcessException
         at com.splwg.mpl.sending.SameThreadSendingManager.processDestination(SameThreadSendingManager.java:341)
         at com.splwg.mpl.sending.SameThreadSendingManager.sendResponse(SameThreadSendingManager.java:293)
         at com.splwg.mpl.sending.SameThreadSendingManager.doSend(SameThreadSendingManager.java:249)
         at com.splwg.mpl.server.async.ExecSendRequestProcessor.ProcessRequest(ExecSendRequestProcessor.java:61)
         at com.splwg.mpl.server.async.RequestProcessingThreadAdapter.run(RequestProcessingThreadAdapter.java:46)
         at com.splwg.mpl.server.PooledThread.run(PooledThread.java:91)
         at java.lang.Thread.run(Thread.java:662)
    Please guide me in this regard..
    Thanks,
    sukumar

    What have you configured for the response tab for the sender? Are you using the MPL or the MDB?
    Take a look at:
    MPL Best Practices (Doc Id 1308165.1)
    Oracle WebLogic JMS Integration (Doc Id: 1308181.1)

  • Publish/Send messages in JMS to be delivered after some time

    I would like to know if the JMS standards address publishing of a message to a Topic or send to a queue which becomes visible or becomes eligible for subscribers to retrieve the message after a certain amount of time.
    In other words I would like to send messages to JMS such that a JMS subscriber can use the feature as a wake up call. Here the sending application sets the time at which subscriber will get the wake up call ( message ).

    I would like to know if the JMS standards address
    publishing of a message to a Topic or send to a queue
    which becomes visible or becomes eligible for
    subscribers to retrieve the message after a certain
    amount of time. Some JMS products provide this functionality. Weblogic and SwiftMQ. The latter has an integrated Job Scheduler:
    http://www.swiftmq.com/products/router/swiftlets/scheduler/index.html
    To solve your problem you'd create a message schedule:
    http://www.swiftmq.com/products/router/swiftlets/scheduler/messagejobs/index.html
    -- Andreas

  • ı wanna delete my purcahe but it did hide and where is the hidding ı wanna delete my purchase please because I am not looking a few purchase (dowloaded at the apple store) help me and send message to my email thank you have good work.

    ı wanna delete my purchase but it did hide and where is the hidding ı wanna delete my purchase please because I am not looking a few purchase (dowloaded at the apple store) help me and send message to my email thank you have good work.

    what?

  • Enter and send message from portal

    Hi
    I am able to allow user to enter rejection reasons using task TS20000139 (Enter and Send Message) when the user clicks the Reject button in SAP Gui. However when the user clicks Reject from the portal, the Enter and Send Message does not appear immediately. Instead it appears as a new task in the portal. Is there a way for the Enter and Send Message to appear immediately in the portal when the user clicks on the Reject button ?

    Hi Ronaldo,
    Also, as Jocelyn says...
    <i>Hi folks,
    Actually advance with dialog will work under some specific scenarios from the UWL.
    1. If you are launching work items using WinGUI.
    2. If you are launching work items using SAPGUI for HTML and are on a high enough release .
    In other words, it depends on the launch mechanism - not the UWL.</i>
    Try checking the launch mechanisms.
    Regards
    <i><b>Raja Sekhar</b></i>

  • Way to receive and send Messages.......................

    Hello All!
    Is there a Way to receive and send Messages with attachments From Forms 6i?
    Could you give us one actual example i really cant understand this how to do this through forms?
    Arona

    What kind of messages? If you are referring to email, then if you search this forum, you will find many threads. Here are a few:
    Sending email with a pdf attachment
    email attachment
    Re: CLIENT_OLE2 and Outlook to send an email..

  • I'm sick of updating and warning messages !!!! one more message then you lose a customer .

    i'm sick of updating and warning messages !!!!
    one more message then you lose a customer .

    Dah•veed wrote:
    So long, farewell, Auf Wiedersein, goodnight... 
    Great movie.

  • I start making the update and on my Iphone 5 but after 3 hours hasn't finished, what should I do?

    I start making the update and on my Iphone 5 but after 3 hours hasn't finished, what should I do?

    A reset, hold down the home/sleep button together until you see the apple logo and then release, then wait for the phone to boot back up.

  • Trying to install update and error message says older version of itunes cannot be removed

    trying to install update and error message says older version cannot be removed

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I want to use ODI to read XML messages from JMS queue and then process it..

    I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
    Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
    As i m very new to ODI, it will be great if you provide detailed steps..
    Thanks in advance for your help....

    Hi,
    Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
    TIA,
    Tedi

  • Capture insert, update and delete messages PlSql

    How can I capture insert, update and delete messages in PlSql, like
    '1 row inserted'.
    TIA, Leo

    You can check the following script --
    satyaki>
    satyaki>create table test_598703
      2   (
      3      Sno   number(5)
      4   );
    Table created.
    satyaki>
    satyaki>declare
      2    cnt  number(5);
      3  begin
      4    insert into test_598703
      5    select empno
      6    from emp;
      7   
      8    cnt := sql%rowcount;
      9   
    10    dbms_output.put_line(cnt||' Rows Inserted');
    11  exception
    12    when others then
    13      dbms_output.put_line(sqlerrm);
    14  end;
    15  /
    16 Rows Inserted
    PL/SQL procedure successfully completed.
    satyaki>
    satyaki>select * from test_598703;
           SNO
          7369
          7499
          7521
          7566
          7654
          7698
          7782
          7788
          7839
          7844
          7876
           SNO
          7900
          7902
          7934
          9898
          7006
    16 rows selected.Similar approach need to follows for other operations.
    Regards.
    Satyaki De.

  • How to send Messages to JMS through ABAP

    Hi,
    I have to send messages to JMS through abap, how to do it.
    step by step is helpful

    Hi,
           You will have to write proxy to Jms to transfer data from R/3 to receiever via JMS.
    Follow this blogs it will be helpfull :
    Re: Proxy->XI->JMS
    For configuring receiver JMS:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    For configuring ABAP proxies etc:
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Thanks,
    Arijit Guha.

  • Why mine iphone 5c cannot normal receive message  and send message to another phone?   I also cannot receive any message form Digi Centre~  I am form malaysia~

    Why mine iphone 5c cannot normal receive message  and send message to another phone?   I also cannot receive any message form Digi Centre~  I am form malaysia~

    Sorry, forgot to add this and I can't find the edit button.
    -I am using build: 9A406
    -One funny thing I want to add too: when I put the iPhone in the Apple dock and connect it with my PC, I open iTunes and select my phone. There you can see the build, software version,.. But after telephonenumber it says N/A: not applicable.. Something I only just noticed. I'm pretty sure my number was displayed back in Nov. when I first got my iPhone 4S.
    And the very last thing: Most of the time I have a very good signal, 4 out of 5 bars. It is only rarely that I have only 1 or 0 bars.

Maybe you are looking for