JMS to JDBC

Hi Friends,
          This is Bhavya.Right now I am working with the interface i.e. JMS to JDBC.
Can anybody send me the sample scenario?
Thanks,
Bhavya...

Hi Bhavya,
First you need to install the external drivers for JMS and JDBC adpater.
You can check the following link for that.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf4b1055-0d01-0010-32a3-b3848d77a6b9">How to Install and Configure External Drivers for JDBC JMS</a>
Now your sender service is an JMS server, the details of which you must have..which you will provide it in the channel...it is not that complicated....
For JDBC side..
Check the following blog for the same.
<a href="/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30">FILE to JDBC Adapter using SAP XI</a>
<b>*Reward points if helpful*</b>
Regards,
Sushil

Similar Messages

  • JMS and JDBC Adapter in PI7.1

    Hi All,
    Kindly tell me about the blogs for JMS and JDBC adapter.
    Please tell me about the Message Types in JMS adapter.
    Thanks in advance.

    Hi Shwetambari,
    Thanks for the reply.
    We need to mention the Adapter Modules while configuring the communiucation channels in JMS
    e.g. Adapter/ConvertJMSMessageToBinary,Adapter/ConvertBinaryToXMBMessage etc.
    So please tell me whether we need to write the cide for the same in JAVA or it is already there ?If it is there then whre can we get it?Do we need to decompile the archeve ?If so, then how to do it?
    Can you give me the Adaqpter Modules for which the code is already there?
    The JMS adapter (Java Message Service) enables you to connect messaging systems to the Integration Engine or the PCK.
    What are the different types of Messaging Systems?Or what is meant by the Messaging System in JMS?
    What are the different types of Messages used?
    Thanks in advance.
    Edited by: Shweta Kullkarni on Sep 4, 2009 5:22 AM

  • JMS to JDBC scenario

    Hi All:
    I need to create one JMS to JDBC Scenario. For Sender side i.e JMS what I need to do.
    Like I dont have any messaging System like MQ series etc. I have JMS client and I know how to use JMS adapter, but where should I create Queue? In there any way like we can
    create Test queue in XI and can send the data from JMS client to that Queue?
    Also if the and Messaging Sysytem that I can download as a trial version please let me  know with the required setting in XI.
    Thanks & Regards,
    Farooq.

    Hello Farooq,
    Instead of creating a queue in visual admin, I would suggest you to use the default queue provided by XI.
    Please have a look at the parameters(Sender/Receiver):
    Select the <b>Transport Protocol as 'Access JMS Provider with JNDI'</b>
    JNDI Lookup Name of QueueConnectionFactory: jmsfactory/default/QueueConnectionFactory
    JNDI Lookup name of JMS Queue: jmsqueues/default/sapDemoQueue
    Name of JNDI Initial Context Factory: com.sap.engine.services.jndi.InitialContextFactoryImpl
    JNDI Server Address: <Host Name of your XI server>:<J2EE Port>
    JNDI Logon User and Password are not mandatory.
    Please note that you will not be able to monitor the sapDemoQueue. However you can test your scenario by doing a File to JMS scenario first and then a JMS to File scenario.
    Before granting points please let me know if this helped you out.
    Thanks,
    Pritish

  • Sample scienario on JMS to JDBC/File

    Hi,
       Can any one send me the sample scenario on JMS to JDBC or FILE. Any suggestions for how to configure JMS with MQ will be helpful for me .
      Thanking you with anticipation
    Regards
    Ramesh.

    Hi Ramesh,
    Go thru these links :
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/e7673c86d19b35e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/33/e6fb40f17af66fe10000000a1550b0/frameset.htm
    And these threads
    JMS and MQ Series (sender and receiver)
    SAP XI and JMS for WebSphere MQ
    JMS - MQ Series
    Hope these will be helpful.
    Regards
    Suraj

  • JMS and JDBC Transaction

    I have recently tried using the JMS interface for AQ and I have discovered that the queue connection is a separate JDBC connection even if you create a queue connection using an OracleConnection. Is there a workaround for this? It seems a bit strange to have two connections open to the database and be forced to use an XA session in order to get the commits synchronized. Any ideas ? Below is some sample code I am using:
    queueConnection = AQjmsQueueConnectionFactory.createQueueConnection((OracleConnection)connection);
    queueConnection.start();
    QueueSession queueSession = queueConnection.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
    AQjmsSession aqs = (AQjmsSession)queueSession;
    Queue queue = aqs.getQueue("TEST_SCHEMA", "TEST_QUEUE");

    Hello,
    What version are you using of the jar files? What version of the database are you using?
    From what I recall the example in <Note:301434.1> successfully reused an existing JDBC connection.
    I would be interested to see a more complete code example if this is not helpful.
    Thanks
    Peter

  • JMS-SOAP-JDBC

    Hi,
    I have a typical scenarion like this.
    Request coming from JMS queue into SOAP which is synchronous , and getting a response from webservice which should be routed through JDBC as a asynchronous.
    Other question is that i am getting response from webservice in the format of CSV,which needs to be routed through jdbc, what approach used to convert the same.

    Look into the thread. I have achieved the same concept with File adapters.
    Asynch - Synch Bridge will work with all adapter running on the Central Adapter Engine. It will work for your case as well.
    1. Sender Adapter JMS adapter --> This changes the QOS to BE and forwards it to the IE.
    2. The webservice call is made and response is returned to the Sender JMS adapter. Using the parameter of the sender JMS adapter you mention the actual receivr adapter to be used .( the name of the Receiver JDBC adapter  ). and this will be forwarded to the receiver JDBC adapter.
    It will work.
    regards
    Bhavesh

  • Distributed transaction (JDBC+JMS), durable MDB, NullPointException in weblogic

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

  • Startup Mode for XI Adapters JDBC and JMS

    We have configured several JMS and JDBC channels which are running fine.  During application of support packages, we want to disable these channels.  I know that I can individually inactive each channel but I am looking for a way to disable all JMS and JDBC channels together. 
    I am thinking that I should be able to disable the SAP XI Adapter: JMS service and the SAP XI Adapter: JDBC Adapter.  The startup modes for these services are set to automatic so when the web as java is stopped and restarted these services will restart.
    Am I correct in thinking that I can stop these services without effecting the XI system (i.e. these services are not mandatory)?  How can I temporarily change the startup mode for these services to manual?

    Hi,
    I believe you can stop JMS and JDBC services individually from visual admin but I am not sure (lets give a try).
    If you don't mind getting errors i.e, if your motive is just to stop the execution of all JDBC and JMS scenarios, just redeploy the jmsproviderlib sda without any external jars in it.
    Regards,
    Felix

  • JDBC Lookup in PI 7.1 - SELECT ? FROM DUAL and Connection timed out

    Hi,
    We have a scenarios (Idoc to JMS) with JDBC lookup. We have used graphical JDBC lookup functionality.
    We are reading country names for a given country code from SAP in an external database table. The query is so simple. That  should not take much time
    Now the actual issues is,
    When we are executing the scenario, its taking quite a long time. Almost 6 minutes to excute a mapping. Which causing high performance issue in the Porduction.
    We started the inviestigation about found some interesting stuff. Here we have used Willy Introscope for the investigation.
    1. First few messages are taking quite a long time. LIke 6 minutes per messages. As i can see in the log i am getting below error in Willy,
    I dont know why PI is executing below queury apart from real secelt query to fetch the country name. I am getting below error: Error Message: Backends|ABCD2 mydatabase01-1526 (Oracle DB)|SQL|Dynamic|Query|SELECT ? FROM DUAL: java.sql.SQLException: Io exception: Connection timed out
    2. After couple of messages, interface works very normal. I mean rest of the messages works pretty fine.
    Please let me know if you have any idea about this error. What could be the problem for the issue.
    Thank you in advnace.
    Best Regards,
    Prasad.

    Did you check how many SQL requests were executed per one message ? Do you have a log of these SQL requests ?
    I assume that the country table is quite small, so that lookup should not be an issue.
    About this:
    >Message: Backends|ABCD2 mydatabase01-1526 (Oracle DB)|SQL|Dynamic|Query|SELECT ? FROM DUAL: >java.sql.SQLException: Io exception: Connection timed out
    1. I only know SELECT * FROM DUAL, not SELECT ? FROM DUAL. Better use the former
    2. the exception means that the database server can not be reached => check your network configuration
    So I assume that there is a network (performance) problem between PI and this Oracle server. Or the Oracle Server is so overloaded that it has (sometimes) problems in processing new requests.
    CSY
    Edited by: Christian Sy on Mar 9, 2010 10:17 AM

  • JDBC drivers for MSSQL 7.0

    Hi,
    We have installed JDBC drivers for MSSQL by following guide "how to install and configure a JMS and JDBC adapter" and they are "msutil.jar, mssqlserver.jar, msbase.jar". Our platform is NETweaver 2004s PI 7.0 on UNIX and Oracle.
    The interfaces are working fine when we are sending data to MSSQL 2000, but when we are sending data to MSSQL 7.0, we are getting errors incompatible drivers.
    Are there seperate drivers MSSQL 7.0 or we need to have different set of drives. Checked Note 639702 and as per note we should be able to find drivers installed on system at
    - (NetWeaver 2004s:)
    usr\sap\<SAPSID>\SYS\exe\<NUC|UC>\Platform\mssjdbc
    I did not find the 'Platform' in my system at the above mentioned path.
    Can anyone help us with this issue.
    Thank You,
    Praveen

    Hi Praveen,
    As I know, there is no JDBC driver MSSQL 7.0, so there is no direct way to get access to it.
    But there is another way to do it if you have access to a MSSQL 2000 or above server.
    In MSSQL 2000 you can create a linked server to the MSSQL 7.0, and then you can use XI to get access to MSSQL 7.0 tables.
    Regards,
    Hui

  • JDBC Adapter: DELETE and INSERT in Mapping

    Hi,
    I have a JMS to JDBC interface. While this is straightforward enough, there is a requirement to clear the contents of the table before carrying out the insert
    What I've tried is:
    <MT_Message>
       <Statement>
            <TableClear>
                 <action> .....attribute mapped to SQL_DML
                 <access> ....element mapped to DELETE FROM table
            <TableInsert>
                  <action> .....attribute mapped INSERT constant
                  <table> ......element mapped to Table name
                  <access> ...allthe fields in the table
    The DELETE statement works and the Insert statement work but they won't work together. Is this possible at all? What other options are there in this case?

    I went for two different Statement tags so the structure of the Message Type is:
    <MT_Message>
      <StatementDelete>
             <TableClear>
                 <action> ....attribute mapped to SQL_DML
                 <access> ...element mapped to DELETE FROM Table
      <StatementInsert>
             <TableInsert>
                  <action> ....attribute mapped to INSERT constant
                  <table>  ....element mapped to table name
                  <access> ...all the columns in my table

  • Content Conversion in JMS Adapter

    Hi All,
    I am having a scenario JMS - XI - JDBC.
    Now I have to do the content conversion in the incming records.
    The sample incoming data is as follows:-
    <Field1>,<Field2>, ...,<Fieldn>        -->Row1
    {<Field1A>,<Field2A>, ...,<FieldnA>}   -->Row2
    {<Field1A>,<Field2A>, ...,<FieldnA>}   -->Row3
    <Field1B>,<Field2B>, ...,<FieldnB>     -->Row4
    {<Field1C>,<Field2C>, ...,<FieldnC>}   -->Row5
    {<Field1C>,<Field2C>, ...,<FieldnC>}   -->Row6
    {<Field1C>,<Field2C>, ...,<FieldnC>}   -->Row7
    Now at the target, we have 3 oracle tables, in which the data from the Row1 &4 will go to Table 1, Row2&3 --> Table2 and Row5,6 &7 --> Table3.
    The source data type that i m using is of the structure:-
    <TC>
      <GT>
        <Field1>
        <GS>
          <Field1A>
        </GS>
        <Field1B>
        <Field2B>
        <GDS>
          <Field1C>
        </GDS>
      </GT>
    </TC>
    Please help me out in the modules configuraton, how this can be handled.
    Thanks in advance, hope to receive some solution at the earliest.
    Rocky.

    Hi Rocky,
    Please have a look at these threads..
    JMS Adapter: Content Conversion
    JMS Adapter Content Conversion
    JMS Content Converrsion
    Hope these help you!
    cheers,
    Prashanth

  • New to EJB, JMS

    I recently started to understand the concepts and examples around EJB, JMS, servlets. Now I am trying to understand how does UserTransactions (JTA) works in an environment where there is a TIBCO server that handles the queues and transactions to Oracle that gets handled by JBoss. I am just trying to understand what happens between utx.begin and utx.commit or utx.rollback when there are calls specific to JMS and JDBC are involved (in my case Tibco and Jboss). Does everything gets rolled back or commit ? I couldn't find any material that clears such concept. Best I could get was some information about Bean Managed transaction in JavaEE 5 tutorial. It would be great and helpful if someone could direct me to good resources or if somebody could explain it to me.

    JTA can make your queue and database a single unit of work. If the database process fails, the message is put back on the queue. You have to use XA database drivers and two-phase commit.
    For somebody who's new, this is a pretty advanced topic.
    %

  • JMS Transaction problem

    Hi
    I am using JBoss 3.2.3 and I have a MDB which calls up some entity beans Home and Business methods.
    onMessage use both JMS and JDBC transactions and I have configured my Oracle-XA-Ds to handle transactions.
    10:22:32,415 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl [Fo
    rmatId=257, GlobalId=sanjeewad//33, BranchQual=] errorCode=XAER_RMERR
    oracle.jdbc.xa.OracleXAException
    at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157
    at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:29
    5)

    Are you using Container Managed Transactions or Bean Manager Transactions? If CMT, what is the type set to 'Required'? You need Required in a CMT MDB to enable an XA transaction to be created /joined/rolled back.
    Scott
    http://www.swiftradius.com

  • JMS message archives

    We are implementing our messaging services using JBoss JMS. The question here is specific to JMS in general.
    We are using durable PTP messaging pattern. The messages will be deleted from the JMS_MESSAGING table as soon as they consumed by the message consumer.
    But because of our business requirements we need to keep those messages in the table for certain period of time (couple months at least). Is it possible to keep them in the database using JMS? What are the steps I need to follow to achieve that?
    -APK.

    Use topics instead of queues. Add an extra subscriber that stores the message in a database.
    If you can't use topics for some reason then either...
    a. Write a message listener that reads the messages from the original queue, stores them in a database then forwards them on to a new queue. Reconfigure your original consumer to read messages from the new queue.
    b. Write a message listener that duplicates the messages from the original queue, and forwards them to two new queues. One queue will be read by the original consumer, the other by a message listener that stores the message in the database.
    Option b is more complex but has the slight advantage that if your database is temporarily down, but JMS is still working your consumer will keep getting messages.
    For any of these solutions you need to make sure you're using distributed transactions, so the JMS and JDBC part are atomic. If not you run the risk of either losing messages or more likely processing them twice.

Maybe you are looking for