Can BPEL retry consuming message from JMS Q Infinite times after rollback?

Hi Guys,
I have a scenario where a simple BPEL 11g with a throw consumes messages from a JMS queue.
If some error occurs the message would be rolled back to JMS queue.
I want to configure the BPEL in such a way that the BPEL would retry to consume the rolled back message again and again regardless of how many times it is getting rolled back.
please suggest some solutions.
Thanks in Advance...

To get rollbacks to sucessfully put messages back on a queue we:
1. Ensure the BPEL component in composite.xml has the following properties set:
<property name="bpel.config.transaction">required</property>
<property name="bpel.config.oneWayDeliveryPolicy">sync</property>
2. Use ASync fault policy
<property name="oracle.composite.faultPolicyFile">oramds:/apps/AIAMetaData/faultPolicies/IC/ASync/V1/fault-policies.xml</property>
<property name="oracle.composite.faultBindingFile">oramds:/apps/AIAMetaData/faultPolicies/IC/ASync/V1/fault-bindings.xml</property>
These are custom fault policies we have that simply rethrows the fault (I can send them to you if required)
The problem is that you will fire your server into an endless loop and not have any control over the process. Many kinds of error will cause the loop not just the one you want. I can imagine SOA server will hang, or run out of memory then you will reboot it and it will just hang again.
You may have a resubmit delay of 5 mins but if you have 300 messages in the queue that is still one try every second. I can imagine your server falling over.
Automatic re-submission is possible but I would suggest going for a design that gives you a little more control over the process. Having error messages go into an error queue and an automatic re-submission process might be a good idea. You could then control the process. e.g. Try one of the messages every 5 mins and if that works put the entire contents of the error queue back into the main queue.

Similar Messages

  • How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    If you want to use JMS with AQ as datastore then there is some configuration you need to do to enable this. This is outside SOA Suite per sa, e.g. no adapter required.
    If you want to connect to the AQ direct then use the AQ adapter.
    this blog may be of some help understand the configuration
    http://biemond.blogspot.com/2008/01/oracle-jms-with-esb-and-bpel.html
    cheers
    James

  • Is there a way to control the number of consumed messages from JMS?

    Hi everyone,
    I have a BPEL process that is consumes messages from a foreign queue, performs a transformation, and passes it to Oracle Apps. I'm curious if there is a way to control the number of messages consumed at a time for processing.
    For example, if we place 50 transactions on this queue, I would like to only consume 10. And then as each one is processed and passed to Oracle Apps, I would like to pull another transaction off the queue. So basically I would only be processing 10 at the most.
    The issue I am having is we put 50 on the queue and the 50 are take off right away. But then half are making it into Oracle Apps and the remainder is failing with a JCA Connection Factory max connection error.
    Instead of changing the settings to get more through, I am wondering if it's possible to limit the number being processes at any one time.
    Thanks

    Hi,
    Have a look at the adapter.jms.receive.threads Property for JMS Adapter...
    http://docs.oracle.com/cd/E21764_01/core.1111/e10108/adapters.htm#BABCGCEC
    Cheers,
    Vlad

  • Debatching is possible when we are reading messages from JMS queue

    Hi all,
    If i place a message in a queue can i read the message from JMS using BPEL ( JMS Adapter ) or OSB( JMS Transport ) like batcth rather than reading the whole message in to the OSB or BPEL at the same time .
    is this option is available in OSB/BPEL ??
    Thanks
    Phani

    Hi all,
    If i place a message in a queue can i read the message from JMS using BPEL ( JMS Adapter ) or OSB( JMS Transport ) like batcth rather than reading the whole message in to the OSB or BPEL at the same time .
    is this option is available in OSB/BPEL ??
    Thanks
    Phani

  • How to pick(or consume) messages from Woblogic JMS Queue only when DB is UP

    Hi,
    I have a requirement to pick(or consume) messages from Woblogic JMS Queue only when DB is UP.
    When DB is down, messages should remain in queue. When DB is up, messaged should be picked on scheduler basis.
    We are using SOA suite 11g(BPEL or mediator,JMS Adapter).
    What is the best way to achive it in SOA 11g.
    I tried, but when I setup a Consumer, there is no control over there. Messages are picked automatically.
    Please advise.
    Thanks
    Ram

    something wrong with the design.
    why dont you set the retry options in the fault policies?
    So if the external DB is down you could reprocess them after specified interval or make it go to human retry queue.
    Then you could use SOA api to retry all of them.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JMS: can I access SAP messages from extenal Java

    - Can I access SAP Messages from an external (non-SAP) java program?
    - Do I use JNDI or can I call using a jar file from my java invocation?
    - Do I have to define a queue (or does SAP JMS have queues)
    - What port do I use?
    Thanks

    Hi John,
    > - Can I access SAP Messages from an external
    > (non-SAP) java program?
    >
    Yes, you can use the JMS provider on the Web AS from a standalone java program.
    > - Do I use JNDI or can I call using a jar file from
    > my java invocation?
    You connect your remote java client to the server by getting an InitialContext. The you lookup the JMS resources (such as Topic- or Queue ConnectionFactory, etc.) from the JNDI. You can have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/25/bf8f44540c469abc19fb6ac3ac7885/frameset.htm">this</a> page for more info.
    >
    > - Do I have to define a queue (or does SAP JMS have
    > queues)
    >
    The JMS Provider on the Web AS provides default connection factories that you can use to create a topic ot queue. The lookup strings you have to use are
    jmsfactory/default/TopicConnectionFactory
    for topics and
    jmsfactory/default/QueueConnectionFactory
    for queues.
    > - What port do I use?
    >
    You use the P4 port (50004 by default for instance number 00) when obtaining the InitialContext with this code:
    java.util.Properties properties = new Properties();
    // set the properties of the connection
    properties.put("Context.INITIAL_CONTEXT_FACTORY", "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    properties.put(Context.PROVIDER_URL, "<Server_Host>:<p4_port>");
    properties.put("Context.SECURITY_PRINCIPAL", "Administrator");
    properties.put("Context SECURITY_CREDENTIALS", "admin_password");
    // start initial context with the properties specified
    InitialContext context = new InitialContext(properties);
    Hope that helps!

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Jms adapter not polling messages from jms topic

    Hi
    We have a jms adapter configured in BPEL process which need to poll messages from JMS topic.Unfortunately its not polling message from JMS Topic if we add Message Selector and Durable Subscriber properties in jca file.Please find jca file content below
    <adapter-config name="SyncCustomerPartyListCDHJMSConsumer" adapter="JMS Adapter" wsdlLocation="oramds:/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/CDH/V1/ProviderABCS/SyncCustomerPartyListCDHProvABCSImpl.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/jms/aia/syncCustomerParty_cf" UIJmsProvider="WLSJMS" UIConnectionName="Dev"/>
      <endpoint-activation portType="Consume_Message_ptt" operation="Consume_Message">
        <activation-spec className="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec">
          <!--property name="DurableSubscriber" value="XYZ"/-->
          <property name="PayloadType" value="TextMessage"/>
          <!--property name="MessageSelector" value="Target in ('XYZ')"/-->
          <property name="UseMessageListener" value="true"/>
          <property name="DestinationName" value="jms/aia/Topic.jms.COMMON.CustomerParty.PUBLISH"/>
        </activation-spec>
      </endpoint-activation>
    </adapter-config>
    If we remove Durable subscriber and message selector properties,its able to poll messages.
    Any pointer will help
    thanks in advance
    Baji

    After changing below property in jca file.JMS adapter is able to poll messages from JMS Topic.
    <property name="UseMessageListener" value="false"/>
    But if i un comment below line and deploy my code again, it stop pulling the messages from topic.
    <property name="DurableSubscriber" value="XYZ"/>
    If i bounce the server after above change and deployment ,it will start polling the message.I am not sure why i need to restart my server after adding above property.
    Thanks
    Baji

  • GUI receiving log messages from JMS

    Hi,
    I have three classes: GUI, EventListener and JMSListener. What I want to do is to create a login dialog. The user enters his username and password, presses the login button and waits (as this process can take a while). While waiting, he can see log messages sent via JMS.
    I set up a TextListener (in my case a JMSListener) and a subscriber like it is described here: http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/client.html#1027256.
    But the JMSListener never gets any message although the connection is set up correctly (this is just a guess as no exception is thrown). I think that this is a GUI problem. Because if only the JMSListener is running, it does receive messages. Is it possible that the GUI blocks somehow?
    Here is some code... First the class that holds the main method:
    package de.dtnet.client.run;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import de.dtnet.client.gui.SWDemoGUI;
    import de.dtnet.client.listener.SWDemoEventlistener;
    public class SWDemoClient {
        private static SWDemoGUI swdemo = null;
         * @param args
        public static void main(String[] args) {
            swdemo = new SWDemoGUI();
            SWDemoEventlistener listener = new SWDemoEventlistener(swdemo);
            swdemo.registerEventlistener(listener);
    }The code from the GUI (only the important parts):
    package de.dtnet.client.gui;
    import de.dtnet.client.listener.SWDemoEventlistener;
    public class SWDemoGUI extends JFrame implements Serializable {
        private static final long serialVersionUID = 1L;
         * Default constructor
        public SWDemoGUI() {
            initialize();
         * Creates widget objects and puts everything together
        public void initialize() {
            // GUI with JTextPane for log messages
        public void logOK(String msg) {
            log(OK, msg);
        public void logInfo(String msg) {
            log(INFO, msg);
        public void logWarning(String msg) {
            log(WARNING, msg);
        public void logError(String msg) {
            log(ERROR, msg);
        public void log(String level, String msg) {
            StyledDocument doc = messagesTextPane.getStyledDocument();
            try {
                doc.insertString(doc.getLength(), msg + "\n", doc.getStyle(level));
            } catch (BadLocationException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            messagesTextPane.setCaretPosition(doc.getLength());
        public void registerEventlistener(SWDemoEventlistener listener) {
            loginBtn.addActionListener(listener);
            usernameTxt.addFocusListener(listener);
            passwordField.addFocusListener(listener);
    }The enventlistener:
    package de.dtnet.client.listener;
    // imports
    public class SWDemoEventlistener implements ActionListener, FocusListener {
        private SWDemoGUI gui = null;
        private String logLevel = null;
        private String logMessage = null;
        private TopicConnectionFactory conFactory = null;
        private TopicConnection connection = null;
        private TopicSession topicSession = null;
        private Topic topic = null;
        private TopicSubscriber subscriber = null;
        public SWDemoEventlistener(SWDemoGUI gui) {
            this.gui = gui;
            initJMS();
        private InitialContext getInitialContext() {
            // set the properties for the InitalContext
            Properties env = new Properties( );
            env.put("java.naming.provider.url",
                    "jnp://localhost:1099");
            env.put("java.naming.factory.initial",
                    "org.jnp.interfaces.NamingContextFactory");
            env.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
            try {
                // initalize and return the InitalContext with
                // the specified properties
                return new InitialContext(env);
            } catch (NamingException ne) {
                System.out.println("NamingException: " + ne);
            return null;
        private void initJMS() {
            try {
                // Obtain a JNDI connection
                InitialContext jndi = getInitialContext();
                Object ref = jndi.lookup("ConnectionFactory");
                // Look up a JMS connection factory
                conFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(
                        ref, TopicConnectionFactory.class);
                // Create a JMS connection
                connection = conFactory.createTopicConnection();
                // Create a JMS session objects
                topicSession = connection.createTopicSession(
                        false, Session.AUTO_ACKNOWLEDGE);
                // Look up a JMS topic
                topic = (Topic) jndi.lookup("topic/testTopic");
            } catch (NamingException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (JMSException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == gui.getLoginButton()) {
                // Do some authentication stuff etc.
                /* Now awaitening messages from JMS */
                subscribe(sessionID);
        public void subscribe(Long sessionID) {
            String selector =  "SessionID='" + sessionID.toString() + "'";
            gui.logInfo("Selector: " + selector);
            try {
                //subscriber = topicSession.createSubscriber(topic, selector, true);
                subscriber = topicSession.createSubscriber(topic);
                JMSListener listener = new JMSListener(gui);
                subscriber.setMessageListener(listener);
                connection.start();
                gui.logOK("Verbindung zu JMS erfolgreich");
            } catch (JMSException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    }and finally the JMSListener:
    ackage de.dtnet.client.listener;
    public class JMSListener implements MessageListener {
        private SWDemoGUI gui = null;
        private String logLevel = null;
        private String logMessage = null;
        public JMSListener(SWDemoGUI gui) {
            super();
            this.gui = gui;
        public void onMessage(Message incomingMessage) {
            System.out.println("You got message!");
            try {
                MapMessage msg = (MapMessage) incomingMessage;
                logMessage = msg.getString("Message");
                logLevel = msg.getString("Level");
            } catch (JMSException e) {
                e.printStackTrace();
            Runnable logTopicMessage = new Runnable() {
                public void run() {
                    System.out.println("Now updating the GUI");
                    gui.log(logLevel, logMessage);
            SwingUtilities.invokeLater(logTopicMessage);
            System.out.println("Message fully retrieved!");
    }I spent a whole day on this and I'm really becoming desperate as I can't see where the problem is and my time is running out (this is for my diploma thesis)! Does anyone of you? Please!
    Thank you!
    -Danny

    Hello Veronica4468,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning Messages and SMS:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • How to read Java Object message from JMS Queue using JMS Adapter .

    Dear All,
    In my scenario i have to read a java object message from JMS Queue . I tried by using the JMS Adaper ,but i am not getting any Payload . Can any one tell me is there any special settings for JMS Adapter to read the Java Object message .
    I am able to read the Message successfully thru JMS Adapter but in SXMB_MONI it is not showing any payload .
    I also went in Message monitoring but i am getting this type of message in Sender JMS Adapter  in Audit Log.
    JMS Message ID XXXXX Message Type Null unknown.Payload can not be read and will be empty.
    JMS Message ID XXXXX Payload Empty can not read.
    Please Help.
    Lateef

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • How can i send simple message from PC-to-another device

    How can i send simple message from PC-to-another device
    just simple message (like command String) not SMS or Data File.
    I have a computer with bluetooth and the oter side is Embeded Blue
    Thanks.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Get back the Message from JMS Topic

    Hi,
    I want to Process message came to the JMS topic (say for past 10 days) in PRODUCTION environment . Is there any way i can get those messages from Persistent Store(File/JDBC).Any sugesstions????
    thanks in advance...

    As far as I think you can not directly read messages from persistence store without putting the message integrity at stake.
    Also, do you know if the messages are actually in the persistence store? Messages will persisted by the Topic only if there is any durable subscriber is there which has not read those messages. If there are no durable subscribers or if all durable subscribers have read their copy of the message from Topic the messages will be removed from persistence storage.

  • How can i print text messages from my htc amaze to my deskjet 3050A

    how can i print text messages from my htc amaze to my hp deskjet 3050A

    Hi,
    I believe the phone uses Android OS, v2.3.4 (Gingerbread) therefore you can use one of these applications:
       http://www.printeron.com/apps/androidprinting.html
       https://market.android.com/details?id=com.pauloslf​.cloudprint&hl=en
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • TS4268 I CAN NOT RECEIVE TEXT MESSAGES FROM PEOPLE USING IMESSAGE - I HAVE MY IMESSAGE TURNED OFF BECAUSE I DO NOT WANT TEXTS GOING TO ALL MY ACCOUNTS - HOW DO I RESOLVE THIS PLEASE HELP - MISSING SEVERAL IMPORTANT COMMUNICATIONS...

    I CAN NOT RECEIVE TEXT MESSAGES FROM PEOPLE USING IMESSAGE

    On an iPhone your iMessages will go to your phone number.
    You can select another email to use on iPod or iPad.
    Go to settings
    Messages
    Send and receive
    Check your phone number and uncheck the common Apple ID you share so your messages will not go to other devices.

Maybe you are looking for