Scenario: JMS to EJB

Hi guys,
well i have an IBM-Frame in where i gonna get a queue. This data should be transfered to an EJB which will do the logic (logging, calculating etc.)
Getting the data from the IBM i gonna use JMS-Adapter.
I would like to know how i can call this EJB via Adapter-Framework. Which adapter do i have to take and how do i configure this one?
Additional: The EJB is deployed on another Web AS.
br Jens

Hi Jens
have  a look
/people/ekaterina.anachkova/blog/2007/02/05/using-jms-resources-in-java-ee-applications-ejb-mdb-servlets-jsps-etc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
How do you read content from XI to JMS Receiver Adapter
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c5fa5a1b-0c01-0010-9aab-fa205c31e62f
http://help.sap.com/saphelp_nw04/helpdata/en/a3/63af1bbf09469fa1615c05f0daff6f/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/90/57849e5e3e45d784afc4e3bfa8136f/frameset.htm
Pls see :
http://help.sap.com/saphelp_webas630/helpdata/en/e8/48ef3d5e10af5ee10000000a114084/frameset.htm
Problem with JMS ConnectionFactory on WAS
Thanks !!

Similar Messages

  • How to implement this Scenario(JMS to IDOC)

    Hi Frnds,
    I am working on one scenario JMS to IDOC .based on JMS Message my XSLT Mapping will genarate Multiple Idocs(max 3) or 2 or one.
       I have to send this IDOCS based on some conditions,the conditions mentioned below.
    xslt mapping genarats one message ,but this contains 3 IDOCS or 2 or 1.(Order Create , Order Change and Order Response),
    what is the best approach to implement this scenario
    1)f Order Create  segment exists (new PO), first check SAP to see if PO does actually exist using RFC Z_BBPR46_GET_PO_FROM_FPA ,If it does not exist, pass Order Create idoc to SAP to create new purchase order
    If it does exist, retrieve PO details from RFC and pass Order Change idoc to SAP to update existing purchase order
    2)If Order Change segment exists (change PO), retrieve PO details using RFC Z_BBPR46_GET_PO_FROM_FPA and pass Order Change idoc to SAP to update existing purchase order
    3)If Order Response segment exists (goods movement), retrieve PO details using RFC Z_BBPR46_GET_PO_FROM_FPA and pass Order Response idoc to SAP to create goods movement.
    Above logic i implemented in one mesage mapping Source is XSLT Mapping Output and Receiver message in message mapping is Multimapping selected 3 IDOCS.
    Regards,
    raj

    thanks

  • Do i have to use JMS with EJBS?

    Hi
    I want to use JMS as a messaging system (a queue) between my system and someone elses. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JMS i always hear it in relation to EJBs. Can i only use JMS with EJBS?
    If i can use JMS is there anything important i need to know about.
    Thanks in advance!
    San H.

    As far as I understand you are use JNDI and JMS is not bound with EJB's. These are java API's which are independent. Like JDBC you can use with Servlets, Applets, standalone applications, EJB, JMS etc etc.......
    In the same way you can use JNDI and JMS with diferent API. And the important feature of Java is that all java API interact with each other when these are independent. I would appricate comments of everyone......................Thanks

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,
              I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
              XDoclet.
              In my current project I have the following piece of code
              in one of my message driven beans (code cited as pseudocode
              without unnecessary details):
              * @ejb.bean name="MyMessageProcessor"
              * display-name="Display name for a MyMessageProcessor"
              * jndi-name="ejb/MyMessageProcessor"
              * description="Bean MyMessageProcessor"
              * destination-type="javax.jms.Queue"
              * transaction-type="Container"
              * acknowledge-mode="Auto-acknowledge"
              * subscription-durability="Durable"
              * generate="false"
              * @ejb.transaction type="Required"
              public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
              public void onMessage(Message msg) {
                   try {
                        //obtaining connections to two different databases via JNDi
                        java.sql.Connection connOne =
                        ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                        java.sql.Connection connTwo =
                             ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                        // performing some UPDATEs and INSERTs on connOne and connTwo
                        // calling some other methods of this bean
                        //creating the reply JMS message and sending it to another JMS queue
                        Message msgTwo = this.createReplyMessage(msg)
                        this.queueSender.send(msgTwo);
                        //commiting everything
                        this.queueSession.commit();          
                   } catch (Exception ex) {
                   try {
                        if (this.queueSession!=null) this.queueSession.rollback();
                   } catch (JMSException JMSEx) {};     
                   this.context.setRollbackOnly();
              Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
              connection pool with non-XA jdbc driver. Everything worked fine
              including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
              to database and the incomming message was thrown back to the my bean's
              queue).
              When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
              participate in a global transaction. When I changed both datasources
              to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
              EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
              and the JMS message wasn't resent to the JMS queue.
              So here are my questions:
                   1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
                   Are there any global server configurations, which may influence this situation?
                   2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
                   (of course, if necessary)?
                   3. Are there any JMS Queue settings, which would disable the container to send message back to the
                   queue in case of setRollbackOnly()? How should be the Queue configurated?
              As I am new to the topic and the deadline for the project seems to be too close I would be grateful
              for any help.
              This message was sent to EJB list and JDBC list.
              Sincerely yours,
              Marcin Zakidalski

    Hi,
              I found these information extremely useful and helpful.
              The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
              Anyway, I still have some problems. I have made some changes to the
              code cited in my previous mail. These changes included changing QueueSessions
              to non-transactional. I also set the "Honorate global transactions" to true.
              I am using XA JDBC driver. After setting "Enable local transactions" to false
              (I did it, because I assume that JDBC transactions should be part on the global
              EJB transaction) I got the following error:
              java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
              driver supports performing SQL operations with no global transaction, explicitly allow it by setting
              "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
              transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
              complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
              I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
              the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
              My questions are as follows:
              1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
              thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
              from doing that? Can using setAutocommit(true/false) change the situation for better?
              2. How to encourage the JDBC driver to be a part of EJB transaction?
              3. As I have noticed each of ejb method has its own transactions (transactions have different
              Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
              way that if already started transaction exists it is used by the called method?
              4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
              impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
              enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
              solved programmically?
              Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
              I am loosing the ability to perform all actions in one transaction.
              Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
              Marcin

  • Complex scenario JMS(multiple)-PI-IDOC( multiple)

    Hi,
    My scenario is JMS-XI-IDOC.
    We have 10 legacy systems and one MQ-Series Queue for each system is setup.
    Each legacy system will send multiple types of data to its respective queue. (i.e. single queue for multiple types of data).
    XI side I am configuring 10 sender JMS adapters to pick from these 10 Queues.
    I have 3 types of IDOCu2019s which I imported to XI.
    Depending on the content of the data ( may be first two characters) XI need to map the data to respective IDOC and post it to R/3.
    How to achieve this????? Can we do this without BPM?

    My issue is not only dynamic interface determination.
    As each queue will have different transactions , so the structure for each transaction will be different.
    how to do dynamic sender aegrement.
    Is it possible in XI.
    I am planningto read everything into a string and then map to the different structures. Is it advisable.
    I am torally confused with this scenario.
    Please suggest the correct method.

  • JMS Adapter EJB Add-on

    hi
    I want to add this code to change  ONLY the JMS_IBM_Last_Msg_In_Group JMS Parameter
    any way to do it with EJB after all the messages are sent with the adapter?
    Thx,Shai
    MQConnectionFactory factory = new MQConnectionFactory();
    factory.setQueueManager("QM_host")
    MQQueue destination = new MQQueue("default");
    destination.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
    Connection connection = factory.createConnection();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer producer = session.createProducer(destination);
    String groupId = "ID:" + new BigInteger(24 * 8, new Random()).toString(16);
    for (int i = 1; i <= 5; i++) {
        TextMessage message = session.createTextMessage();
        message.setStringProperty("JMSXGroupID", groupId);
        message.setIntProperty("JMSXGroupSeq", i);
        if (i == 5) {
            message.setBooleanProperty("JMS_IBM_Last_Msg_In_Group", true);
        message.setText("Message " + i);
        producer.send(message);
    connection.close();

    Hi Shai,
    I'm not too convinced that this is the XI-way to go. The JMS adapter will have its own MQ Connection and handle the communication with JMS (putting the message on the queue, etc.)
    I believe, you should try one of the following options (even though I don't know whether they will work):
    Set Additional JMS Properties in the Communication Channel configuration (this will only allow a fixed value to be set)
    Implement a module that accomplishes this task. However, I don't know if this is supported by the Module Chain.
    Have you asked SAP (through an OSS Message) whether this can be accomplishe in a Module?
    regards,
    Peter

  • Scenario jms synchronous

    Hi everyboy,
    The scenario is: R3 -->XI (JMS) ---> MQ -
    > XI (JMS) ---> R3
    I have a scenario with jms synchronous. I created a correlation to take the correct message from MQSeries. But the correlations works wrong.
    I think the instance process doesn't know if it is responsible for the message that MQ return. The correlations is the problem.
    Anybody can say me how to correlate jms adapter correctly?
    Have anybody got a good manual?
    My e-mail is: [email protected]
    Thanks for advance.

    Paloma,
    I am using XI 3.0 with SP16 and revisited the document <b>How To...Correlate JMS Messages</b> to confirm
    3. The Step-By-Step Solution
    3.1 BPM Header-Based …
    Followed the Design steps 1 - 5
    Followed the Config steps
    6. FYI - the JMS-Compliant option is set to JMS-Compliant
    7. FYI - the JMS-Compliant option is set to WebSphereMQ (non-JMS)
    <b>Difference</b> - I have used the Correlation Setting Stored JMSCorrelationId of request
    I have provided a sample and some mapping logic for the application that processes the MQ queue
    <b>Request – note the MessageId and ConversationId</b>
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!-- Response -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30">
    <SOAP:Header>
    <SAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
    <SAP:MessageClass>ApplicationMessage</SAP:MessageClass>
    <SAP:ProcessingMode>asynchronous</SAP:ProcessingMode>
    <SAP:MessageId>A4869D70-A593-F94A-9716-4353769D5C0C</SAP:MessageId>
    <SAP:ConversationId>6195CFF0-9ECB-11DC-A178-000347055950</SAP:ConversationId>
    <SAP:TimeSent>2007-11-29T22:35:26Z</SAP:TimeSent>
    <SAP:Sender>
    a) XI puts the JMS request message on the MQ request queue
    b) An application reads the request from the MQ request queue and needs to save JMS message id from the MQMD field MsgId
    c) The application then does some action(s)
    d) The application then generates a response message.  To correlate this response message back to XI, Adaptris will need to copy the JMS message id from the MQMD field MsgId (saved from the request message) into the MQMD field CorrelId of the response message and then write the message to the MQ response queue
    e) XI reads the JMS response message from the MQ response queue
    <b>Response – note the MessageId is different but the ConversationId is the same</b>
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!-- Response -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30">
    <SOAP:Header>
    <SAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
    <SAP:MessageClass>ApplicationMessage</SAP:MessageClass>
    <SAP:ProcessingMode>asynchronous</SAP:ProcessingMode>
    <SAP:MessageId>6C5E95C0-9ECB-11DC-A679-000347055950</SAP:MessageId>
    <SAP:ConversationId>6195CFF0-9ECB-11DC-A178-000347055950</SAP:ConversationId>
    <SAP:TimeSent>2007-11-29T22:35:44Z</SAP:TimeSent>
    <SAP:Sender>
    Regards,
    Mike

  • Using JMS from EJB

    Hello,
    In fact I have 2 questions.
    1). Can I use JMS inside my EJBeans (I mean, obtain connections, create sessions, create producers/consumers, send/receive messages)? If I can not, please explain in a couple of words, why?
    2). Can I use static variables inside entity beans?
    Any suggestions will be highly appreciated.
    Thank you,
    densimf.

    1. yah i think there is no issue in this
    2. entity bean object represent a single row in a database. so doesnt understand the significance of having a static field in this. generally it is not used i feel.

  • Weblogic JMS EJB : ThreadLocal access query : getting null in same thread

    We have two applications(one is jms and other is ejb) on single instance of weblogic managed server.
    On receving a new jms message the jms application call the ejb application by passing the new xml message.
    ejb application creates a threadlocal object and allocated transaction id to this transaction. I want to access this transactionid(present in threadlocal) in my jms application. But i am getting null.
    I believe i am in the same thread as i printing the thread number in the both the application log. I verified that same thread number was present for multiple messages
    in both logs [Except if one scenario of thread pooling is present that when jms calls ejb it frees the thread(23) and when ejb completes its job if gives back the thread(23) to jms...but it resets thread local]
    I need answer to following question
    1. Why is my transaction id null when i access through jms application.
    2. I believe i am in the same jvm instance.
    3. I believe i am in the same thread instance...( looking at logs except if someone can tell me i am not.....)
    4. Or if there is alternative solution to pick up threadlocal variable in my jms application.
    JMS application is new application trying to connect to existing ejb application which had the thread local design and we want to use that existing architecture before we decide to change. We need the transactionid for log corelation.

    I assume that either your JMS destination is backed by a database or your application is doing some database operations in the same transaction as the JMS send operation. I suspect that there is some kind of database maintenance process going on every night, which causes the database operations to be slow or not responding, which in turn causes the MDB transaction that the JMS send operation participates in to timeout.

  • EJb 3.0 com.ibm.mq.jms.MQQueueConnectionFactory

    Hi All
    I see this error
    [EJB:011013]The Message-Driven EJB attempted to connect to the JMS connection fa
    ctory with the JNDI name:xxxx.ccerqcf. However, the object with th
    e JNDI name xxxx.ccerqcf is not a JMS connection factory. NestedEx
    ception Message is :com.ibm.mq.jms.MQQueueConnectionFactory
    When using MDB/ EJB 3.0 in WLS 10.0 Mp2
    When I use EJB 2.x I don't see the issue, can ejb 3.o read weblogic-ejb-jar.xml for its connection factory?
    Is there any debug flag to see a better exception
    This is a MDB intended to listen to message from IBM MQ server using a foreign server configured in the console
    Edited by: user12297324 on Mar 15, 2010 3:47 PM
    Edited by: user12297324 on Mar 15, 2010 4:04 PM

    EJB 2.0
    import javax.ejb.*;
    import javax.jms.*;
    public class FOTSysInqMsgBean implements MessageDrivenBean, MessageListener
    //     private static Logger logger = Logger.getLogger(FOTSysInqMsgBean.class);
         MessageDrivenContext messageDrivenContext;
         public void ejbActivate(){}
         public void ejbRemove(){}
         public void ejbPassivate(){}
         public void ejbCreate() throws CreateException {}
         // This is the key onMessage method
         public void onMessage(Message msg)
              //if (logger.isInfoEnabled()) logger.info("Enter MDB onMessage");
    //          byte buf[] = new byte[1000];
    //          int      length      = 0;
              String      inString = null;
              String jmsMsgId = null;
              try
                   if(msg instanceof TextMessage)
                        TextMessage tm = (TextMessage) msg;
                        inString = tm.getText();
                        jmsMsgId = tm.getJMSMessageID();
                        System.out.print(inString);
                        //MQMessageFormatter.parse(inString, jmsMsgId);
                   //else
                        //System.out.println("Is not instanceOf TextMessage");
                   //     if (logger.isInfoEnabled()) logger.info("Not instanceOf TextMessage");
         catch(Exception ex)
              System.out.println("Error IncomingMessage is *********************" +ex);
              //if (logger.isInfoEnabled())
              //     logger.info("FOTSysInqMsgBean === " + ex + " === in Bean class Message method");
         //if (logger.isInfoEnabled()) logger.info("IncomingMessage:" + inString);
         //     if (logger.isInfoEnabled()) logger.info("Exit MDB onMessage");
              //System.out.println("IncomingMessage is *********************" +inString);
         public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
              this.messageDrivenContext = messageDrivenContext;
    EJB 3.0
    package foo;
    import javax.annotation.Resource;
    //import javax.ejb.*;
    import javax.ejb.MessageDriven;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDrivenContext;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    import javax.jms.MessageListener;
    import javax.jms.Message;
    import javax.jms.TextMessage;
    * MDB asynchronously feeds the new added reviews to subscribers.
    @MessageDriven
    ( name = "FOTSysInqMsgBean3", //,mappedName = "wholesale.ccer.fjms.maint.rsps.q1",
    activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationType",
              propertyValue = "javax.jms.Queue")
    EJB 3.0
    public class FOTSysInqMsgBean3 implements MessageListener
    //     MessageDrivenContext messageDrivenContext;
         @Resource MessageDrivenContext messageDrivenContext;
         //public void ejbActivate(){}
         //public void ejbRemove(){}
         //public void ejbPassivate(){}
         //public void ejbCreate() throws CreateException {}
         // This is the key onMessage method
         public void onMessage(Message msg)
         //     if (logger.isInfoEnabled()) logger.info("Enter MDB onMessage");
    //          byte buf[] = new byte[1000];
    //          int      length      = 0;
              String      inString = null;
              String jmsMsgId = null;
              try
                   if(msg instanceof TextMessage)
                        TextMessage tm = (TextMessage) msg;
                        inString = tm.getText();
                        jmsMsgId = tm.getJMSMessageID();
                   //     if (logger.isInfoEnabled()) logger.info("MQ Message Class:" + msg.getClass());
              //          if (logger.isInfoEnabled()) logger.info("MQ Message Object:" + msg);
              //          if (logger.isInfoEnabled()) logger.info("MQ Message Id:" + jmsMsgId);
                   //     MQMessageFormatter.parse(inString, jmsMsgId);
                   else
                        //System.out.println("Is not instanceOf TextMessage");
              //          if (logger.isInfoEnabled()) logger.info("Not instanceOf TextMessage");
         catch(Exception ex)
              //System.out.println("Error IncomingMessage is *********************" +ex);
              //if (logger.isInfoEnabled())
         //          logger.info("FOTSysInqMsgBean === " + ex + " === in Bean class Message method");
    //     if (logger.isInfoEnabled()) logger.info("IncomingMessage:" + inString);
         //     if (logger.isInfoEnabled()) logger.info("Exit MDB onMessage");
              //System.out.println("IncomingMessage is *********************" +inString);
         /*public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
              this.messageDrivenContext = messageDrivenContext;
    both uses the same weblogic-ejb-jar.xml

  • 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

  • Hwo to do scenario with multiple queues in jms sender

    Hi users,
    In my scenario jms to idoc i have requirement from two diffrerent queues  i need to pick the data.
    if its two sender communication channels then how to create two sender agreements?
    please help out to me
    Regards

    Hi,
    Use same Queue for same kind of data
    OR
    Create multiple sender agreement by checking the "Sender uses virtual receiver" Option

  • My JMS 2 wish list - Part 3, number of message deliveries

    I attended the JavaOne 2010 session on future JMS evolutions. During the session I described some current limitations or issues I'd like to be solved in a portable way. I've been adviced to share the issues to get feedback from the community. I will post each issue in a dedicated thread.
    Issue 3 - How many times are topic messages delivered ?
    This may seem to be a trivial question, but when clustering is involved, it's not.
    JEE has strong support for clustering, but many JEE specifications do not define what is actually supported, and leaves room for application server specific features. This is the case for JMS in the various specifications involved (JMS, JEE, EJB, JCA).
    The question is how many times are messages delivered and treated (e.g. once per cluster or once per application server)?
    Note that to simplify the problem I will not address selectors, delivery modes or acknowledgement considerations. I will also only address business application clustering, not JMS implementation clustering.
    When Queues are used the situation is quite clear, the message is delivered once whether you use clustering or not. But when Topics are used, there is no simple answer.
    When a message is sent to a Topic, each currently active non-durable subscriber should receive the message once. If the receiving application is clustered, the message should be received one time per application server instance in the cluster. That's what we get with JBoss 4.2.3.
    This is actually not always the case. One example with WebSphere 6.1:
    - A business application is deployed to a cluster of two application servers
    - The JMS message engine is also deployed to a cluster of two application servers
    - The application uses a MDB with a non-durable subscription to a Topic
    - A message is sent to that Topic
    If the two clusters are different, then the message is received by one MDB on each application instance, so the message is treated twice. But if the two clusters are actually the same, then the message is only received by one MDB instance on the application server where the message engine instance runs, so the message is treated once instead of twice. Painful.
    For reliability considerations, enterprise applications often use durable subscriptions to Topics. This makes the situation even more complicated.
    Durable subscriptions are identified by a subscription name. This defines the number of deliveries, meaning that the message should be delivered once per distinct subscription name.
    JMS offers three ways to receive messages: Message Driven Beans (MDB), synchronous receptions using MessageConsumer:receive and explicit message listeners using MessageConsummer:setMessageListener. We won't address message listeners as they are forbidden on the server side by the JEE specifications.
    When doing synchronous receptions or message listeners, the durable subscription name is managed by the developper using Session:createDurableSubscriber. This way it is possible (it is actually required by the JMS specification) to give a different name per application instance in the cluster to choose the number of times the messages are received.
    With MDB we cannot officially manage the subscription name, so there is not portable control of the number of messages delivery. Note that we cannot manage the client ID either. In more details, both client ID and subscription name are valid parameters as per the JCA specification, but they are not according to the EJB specification.
    We need precise, portable and cluster compliant semantics about the number of time JMS messages get delivered.

    gimbal2 wrote:
    A portable solution would be useful.You could already do it now by leveraging the Timer functionality that has been part of the EJB spec since JEE 1.4. In stead of sending the message directly, let the timer do it after the delay you specify. That would make it portable with current tech.
    I can't be sure what other implications that might have though, such as in the area of performance and resource usage - I can imagine you wouldn't want to use a timer when you need to send large volumes of messages.In the original requirement, the message is put in the queue immediately by a call to queuesender.send(message) and there's a delivery in delay to a consumer.
    Whereas in this solution, the delay is in the message delivery to the queue itself.
    IMHO there's a subtle but important difference here.What would for example happen if posting the message to the queue is in the scope of a distributed JTA transaction? You can definitely include the timer call to be in the scope of the transaction, but now you will have to account for the fact and there may be an error when the message is delivered which has to be handled explicitly. In the original scenario the tx would automatically rollback.
    cheers,
    ram.

  • BPM Design required 1:N scenario

    Hi Frnds,
    I am working on one scenario JMS to (IDOC,RFC,MAIL).
    1) when i receive message from MQ first level i wl apply XSLT Maping then it gives one message it contains 3 sub  messages.in this case i have to send mail (confirmation mail ).
    1.1 I have to map XSLT Mapping out put to MBGMCR IDoc or DESADV IDOC or RFC based on  conditions.
          If SAP PO not found(RFC LookUp to retrieve PO Value) i have to send RFC message to SAP
          If SAP PO found ,the value =12 then i have to send MBG MCR IDOC
            If SAP PO found value is 10 0r 11 I Have to send MBGMCR IDOC and DESADV IDOC to SAP.
    final confirmation mail...
    my receievrs 5 .. how to design Intergratipn process,i developed message mapping and Operation mapping,but i am not clear about IP.
    many thanks,
    raj

    Hi prateek thanks for you replay,but i need some clarity,
    I developed 5 Interface mapping,
    1)to post message in to RFC
    2)to post message in to IDOC(mbgmcr if po =12)
    3)to post message in to IDOC(mbgmcr if po = 10 or 11)
    4)to post message in to IDOC(desadv if po=10 or 11)
    5)Mail(rfc response value si have to send as a mail)
    first four interface mapping wil have first step is XSLP Mapping second level maping is Message mapping.
    in message mapping i retrieved PO value(RFC LookUp) based one PO value i created target.
    my design approch correct? or i need to chnage design..
    many thanks,
    Raj

  • Problem in JMS-Adapter with CharacterSet Websphere MQ

    Hi,
    we have the following scenario:
    JMS -> PI -> File
    We have a local Websphere MQ Queue Manager and the follwoing configuration in our sender adapter:
    Transport-Protocol: WebSphere MQ (non JMS)
    Message-Protocol: JMS 1.x
    ConnectionFactory: com.ibm.mq.jms.MQQueueConnectionFactory
    Java-class Queue: com.ibm.mq.jms.MQQueue
    CCSID: 819
    Transport: TCP/IP
    JMS-conform: WebSphere MQ (non JMS)
    In the local queue manager the messages (XML-Messages with header <?xml version="1.0" encoding="ISO-8859-1"?>) have characterSet 819 (ISO-8859-1). That's correct. You can open the files with XMLSpy and it works.
    When we receive the messages by our JMS Sender Adapter all the character seems to be in UTF-8 and I don't know why. All the special characters are wrong cause the header of the XML-message shows ISO-8859-1 but all the signs are decoded in UTF-8.
    In the other direction (JMS Receiver adapter, File -> PI - JMS) we have the same problem.
    We create a ISO-8859-1 message in mapping (and it is really ISO-8859-1) and send it via JMS Receiver Adapter to the local message queue. But there the message arrives in UTF-8 encoding. I don't understand this.
    Does anybody know what could be the cause for this?
    Does the JMS adapter convert the messages from ISO-8859-1 into UTF-8?
    Are there any parameters we have to set?
    I hope anybody has an idea what's wrong.
    Regards
    Thorsten
    Edited by: Thorsten Hautz on Oct 12, 2010 5:42 PM

    Hi,
    thanks a lot for your replies.
    our driver settings are correct (as I can see).
    I removed value 819 from CCSID, but we have the same effect.
    The messages in the local queue manager are TextMessages in XML.
    Does anybody know, if we need the standard modules (ConvertJMSMessageToBinary and ConvertBinaryToXMBMessage) in this case?
    Is it possible to set the CCSID for the message payload anywhere in the configuration?
    The CCSID in the Source tab doesn't have any influence to the encoding of the payload message, only to the header data.
    Regards
    Thorsten

Maybe you are looking for

  • Vista Ultimate and iPod Nano Drag and Drop

    I upgraded my laptop to Vista Ultimate (which it is not) and I have iTunes 7.1.1.5 running. I use a shared network drive for my music library. I have a 80 G Video IPod that syncs up with no (known) issues. I just got a new iPod Nano and iTunes will r

  • Office "in general" Locking up.."file save as"

    Ok guys n gals I have one that I cannot figure out and Google is really not helping much. Here is the deal, recently on some Windows 7 Pro pc's Excel and Word seem to lock up when doing a File Save As. We have an older version of Office, Office 2003

  • Java and pogo

    I have had pogo for several months...now I am unable to get into the games...it says there is a problem with Java .. did everything they said even download the Java again and still nothing ... what can I do to correct the problem

  • Does the Ipad2 support .epub (ebook) files?

    Does the Ipad2 support .epub (ebook) files? And: does it support websites built with flash?

  • PS 6.0 'Bin' Area

    When I open a folder and am in the editor mode all the pics open in both the 'bin' area and the main editor window. Multiple windows in the editor window is a mess. I would like to open a folder with multiple pics in the 'bin' area only. This would m