JMS Message redelivery in BPEL

Hi,
I have a requirement that I want to distinguish the instance consuming original message from the instance consuming the retried message.
eg. I have the requirement that if its the original message then I need to take the action A in the BPEL and if it is the retried one then I want to take the action B.
Is there some mechanism with which I can differentiate the above stuff?
Thanks in Advance.
Best Regards,
Amit Jain

Hi,
I have got the solution to above issue.
Once my JMS adapter picks the message, it passed the message to BPEL through mediator.
In Mediator assign, by using $in.property.jca.jms.JMSProperty.JMSXDeliveryCount I got the value.
Thanks & Regards,
Amit Jain

Similar Messages

  • How to acknowledge JMS messages manually in BPEL

    How to acknowledge JMS messages manually in BPEL?
    Thanks!

    If Oracle BPEL/SOA Dev team is watching this form then please add this feature as all the major vendors support this.

  • How to read JMS message properties from BPEL or BPMN process

    Hi all,
    I have a JMS Adapter that consumes messages from a remote ActiveMQ queue and I don't find the way the get the properties of the JMS message as I would like to map them in BPEL or BPMN process variable. I only manage to get the content of the message.
    I've also read that if using a MapMessage, one of the map entry can be mapped directly and that the other map entries go to jca.jms.Map.xxxx where xxxx is key of the map entry.
    But how can I map those "jca.jms.Map.xxxx" properties on process variables ? and how to map JMS Properties (that seem to be mapped on jca.jms.JMSProperty.xxxx) to process variables ?
    I use SOA Suite version : 11.1.1.4.0
    Thanks for your help

    SOA Suite 11g - how to set/get JMS headers ?

  • Using JMS Messaging Bridge in BPEL

    Hi
    I wanted to create a bpel process to put a message on to a JBoss queue on an external system.
    I could see from many forums that JMS Messaging bridge is a suitable option to go ahead. I could create new JMS destinatiosn and a JMS bridge on top of that.
    Can some once help me out with a sample bpel process inidcating how to use the JMS bridge within the bpel prpcess.
    Thanks in advance

    Hi
    You can define the same queue in both domains.
    In domain A ( the source ) create the Origin of bridge
    In domain A too ( the source) create the destination of bridge ( pointing to address and port of domain B)
    In domain A create the bridge ( joining source and destination )
    In domain A , deploy the connector ... a .rar file
    Best Regards
    Jin
    PD: this doesn?t affect the code of your app.

  • JMS Message Redelivery

    I have a MDB (Bean managed Transaction) listening to a MQ.
              App server used: weblogic 8.1
              While a message is being processed in the onMessage() of this MDB and if server goes down, will the message be redelivered the next time I start the server?
              At what point is the message removed from MQ?
              Thanks
              MKP

    Hi,
              quote from edocs:
              "if an application fails, a transaction rolls back, or the hosting server instance fail during or after the onMessage() method completes but before the message is acknowledged or committed, the message will be redelivered and processed again. "
              So if you are not acknowledging it before onMessage is completed, it should be reprocessed (Depending also on the redelivery settings of the JMS Queue)
              -Kai

  • JMS message redelivery in EJB 3

    Hi,
    We are using EJB 3, message driven bean as a subscriber to JMS queues.
    I am looking for an option which could enable us in driving the redeliver on failure & forwarding the messages to different queue in case of failure & reprocessing of messages on failure.
    Does anybody has any idea how can we do this.
    Can it we done through annotations or there is some other way.
    Thanks & Regards,
    Manish
    Edited by: mjain1983 on May 31, 2009 9:27 PM

    Manish,
    These options will be provided by most of the application servers and can be easily configured.
    What is the application server that you are using?

  • JMS Message Redelivery Delay

    Using OC4J 9.0.4.0.0 i've set up a message driven ejb that consumes messages from a queue. I've got a scenario whereby on rare occasions my bean won't be able to process the message due to the absence of an external service. When this happens, i roll back the transaction so the message is returned to the queue, the idea being that it can be processed later when the external service may/may not be available.
    The problem is that the message is redelivered straight away - i want to be able to specify a delay. Can anyone help?

    Try the following two attributes.
    dequeue-retry-count="10"
    dequeue-retry-interval="300".
    For me it didn't help.I have my Oracle Advanced Queue's as my JMS Provider.So I changed init parameters for my Oracle where I have queues , as follows.
    ALTER SYSTEM SET aq_tm_processes=1;
    It then started working as expected.
    Good luck.
    Giri Kosuru.
    Sample orion-ejb-jar.xml
         <message-driven-deployment
                   name="GiriMDB"
                   connection-factory-location= "java:comp/resource/prototypeRP/TopicConnectionFactories/myTCF"
                   destination-location="java:comp/resource/prototypeRP/Topics/rpTestTopic"
                   subscription-name="MDBSUB"
    dequeue-retry-count="10"
    dequeue-retry-interval="300"
                   listener-threads="1">

  • How to count JMS messages count using BPEL

    Hi All,
    Can you please let me know how to count , total numbers of messages while pooling or pushing the messages using BPEL.
    Thanks,
    Srinivas.

    What do you mean by total number of messages? That are dequeued by BPEL? Or that are in the queue?
    Is the BPEL process started if a message is dequeued? In that case you could just count the number of BPEL instances...
    Kind regards Lonneke

  • Message Redelivery

              Hi there,
              I would like to know how to set the JMS Message Redelivery from a server restart
              to only redeliver message after all the weblogic startup classes have completed?
              The reason for this is because the message consumer(s) depend on some configuration
              setting that are setup by the startup classes and I am getting problems during a
              server restart because the container is trying to redeliver the persisted message
              BEFORE the startup classes have completed there execution.
              Thanks!
              Vincent
              

    Another approach would be to have your startup class spawn it's own thread
              (that contains code to deploy your MDB application) and do a JMX call to
              query if the server is up and listening (meaning that all services have been
              deployed). The JMX call could be in a loop with a sleep interval. Once the
              server is up the thread can deploy your MDBs. This way you don't have to
              worry about your MDBs consuming all available threads.
              To deploy the application using JMX, you could use code like the below. The
              following code also makes sure that the config.xml is not updated so that
              you can achieve a custom deploy every time your server is re-cycled.
              public class ApplicationDeployer implements Runnable {
              private MBeanHome home;
              private TargetMBean targetMBean;
              private ApplicationMBean appMBean;
              private WebLogicObjectName targetObj;
              .... include methods to start the thread and check if the server is up
              public void doDeploy() {
              ComponentMBean deployBean = null;
              try
              ApplicationMBean appMBean = (ApplicationMBean)
              home.findOrCreateAdminMBean(appName, "Application", domainName);
              appMBean.setPath(appPath);
              if (deployFileName.indexOf(".jar")>0){
              deployBean = (EJBComponentMBean)
              home.createAdminMBean( deployAppName ,
              "EJBComponent", domainName, appMBean);
              } else if (deployFileName.indexOf(".war")>0){
              deployBean = (WebAppComponentMBean)
              home.createAdminMBean( deployAppName ,
              "WebAppComponent", domainName, appMBean);
              if ( Double.valueOf(getVersion()).doubleValue() > 6.0 )
              deployBean.setPersistenceEnabled( false );
              deployBean.setURI(deployFileName);
              deployBean.addTarget(targetMBean);
              appMBean.addComponent(deployBean);
              appMBean.deploy();
              appMBean.load();
              catch (Exception e){
              System.err.println("Exception at AppDeployer.doDeploy " , e);
              Thanks,
              Adarsh
              "Tom Barnes" <[email protected]> wrote in message
              news:[email protected]...
              > The messages on boot are not "redelivered" messages (there is no matching
              > recover/rollback in the current server's context), so a delay has no
              effect.
              > I'm sorry if I gave the impression that a redelivery delay has an effect
              at boot time...
              > Specifically, redelivery delay configures the amount of time a message
              should remain
              > in limbo before it is made visible again after an application calls
              recover or rollback.
              >
              > You really should post to the ejb newsgroup. I think there may be some
              control
              > over startup ordering (MDB after startup classes).
              >
              > Worse comes to worse, your MDB
              > can block (wait()) until the startup class calls notify() - Just make sure
              the MDBs max
              > pool size is less than the default-thread-pool-size, or make sure to
              give the MDBs
              > their own thread pool, to prevent them from consuming all available
              threads.
              >
              > Tom
              > Vincent wrote:
              >
              > > Hi Tom,
              > >
              > > I am using WLS6.1 sp2 running on solaris. The problem I am having is
              that messages
              > > are getting reloaded and sent at the next server restart before my
              weblogic startup
              > > class has completed its execution. My onMessage() method in my
              MDB(shouldn't matter
              > > if it's a MDB or a PTP JMS consumer..?) depends on some objects that are
              initialized
              > > by the startup class. I tried setting DefaultRedeliveryDelay in the
              JMSConnectionFactory
              > > to a very long delay but that does not help.
              > >
              > > Tom Barnes <[email protected]> wrote:
              > > >By "containers" I assume you mean MDBs???? Please post your question
              to
              > > >the ejb newsgroup, along with your version and SP level.
              > > >
              > > >Tom
              > > >
              >
              

  • How to test BPEL Process that starts with a pick consuming a JMS message

    Hi,
    We are using App Server v 10.1.3.3.0 and attempting to test a BPEL process which starts with a pick operation which is awaiting a JMS message on a specific queue.
    We are using the Oracle JMS adapter to achieve this.
    Is there any way in which this particular configuration can be easily tested using the BPEL testing framework? I have problems when I write the first initiate XML statement in my test case (stack trace below)
    <2011-01-27 10:23:47,028> <ERROR> <ProvisioningInterface.collaxa.cube.bpeltest> test run failed!
    ORABPEL-20011
    Instance initiation error.
    An error occurred while launching an instance for suite "BasicTest", test "baseline.xml".
    Please examine the log file for details or contact the system administrator.
    at com.collaxa.cube.engine.test.BPELTestRunManager.initiate(BPELTestRunManager.java:218)
    at com.collaxa.cube.ejb.impl.BPELTestBean.runSuites(BPELTestBean.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Unfortunately, there are no further details or any example I can see which simulate the kind of setup I have for my test.
    Any help much appreciated,
    Kind Regards,
    Colin.

    Hi,
    I assume you mean the JMS example under the $OH BPEL examples area. Unfortunately, this only shows how to get a BPEL process kicked off by awaiting a JMS message - but there is no test code there! There are specific examples which show off the testing framework facilities but it appears that all the examples which use async type of interactions are in the middle of a process which is kicked off by a normal synchronous client interaction.
    Any further help much appreciated.
    Colin.

  • Assigning JMS message in BPEL: The result is empty for the XPath expression

    Hi,
    My project, an Oracle BPEL 11g project, is reading an XML payload from a JMS queue. I would like to transform the message and assign the elements of the messages to other variables. But when I am doing that in the "assign" step, it raises an error: Error in evaluate <from> expression at line "63". The result is empty for the XPath expression : "/ns2:publishProject/payload/Message".
    Even though I can see the message payload in the Audit with all the values.
    To me it looks like a name space issue, but I could not find out how to correct it. Any hint will be a big help. Please let me know if you want to check the .xsd for the message.

    I publish a JMS message to a topic in one BPEL process and have another BPEL process read from the topic and start the flow. The problem I have is that the first process is writing fine to the topic, but the second process seems to be reading twice. I am seeing two instances of the second process in em.
    Can anyone help? I am using JDev 11.1.1.1.0
    Thanks

  • Configuring message redelivery with jmcjca (sun-jms-adapter) in Glassfish

    I use Glassfish v2 server and its OpenMQ as JMS Provider.
    My MDB is configured to use sun-jms-adapter for accessing JMS Provider.
    ra.xml of adapter wasn't change so all configuration is done through the sun-ejb-jar.xml of my MDB.
    Type of destination my MDB listens to is javax.jms.Topic.
    At the same time, I have defined the following redelivery strategy in the sun-ejb-jar.xml
    <activation-config-property>
    <activation-config-property-name>RedeliveryHandling</activation-config-property-name>
    <activation-config-property-value>2:1000; 3:move(queue:*psdmqqueue*)</activation-config-property-value>
    </activation-config-property>
    psdmqqueue is an administred server Destination of type javax.jms.Queue. So a target destination of MDB is topic and redelivery should be performed to queue
    The problem is that application deplyment failes with this configuration with the following exception:
    #|2008-11-22T18:38:48.152+0300|WARNING|sun-appserver9.1|com.stc.jmsjca.core.Activation|_ThreadID=169;_ThreadName=JMSJCA connect;_RequestID=ed86af75-1577-4548-ac57-60ca127a28a2;|JMSJCA-E016: [sync-Durable TopicSubscriber(provisioning_subscription)(lookup://targetTopic) @ [mq://localhost:7676/jms]]: message delivery initiation failed (attempt #85); will retry in 10 seconds. The error was: java.lang.ClassCastException: com.sun.messaging.jmq.jmsclient.XATopicSessionImpl
    java.lang.ClassCastException: com.sun.messaging.jmq.jmsclient.XATopicSessionImpl
    at com.stc.jmsjca.core.RAJMSObjectFactory.createDestination(RAJMSObjectFactory.java:423)
    at com.stc.jmsjca.core.Delivery.createDLQDest(Delivery.java:626)
    at com.stc.jmsjca.core.SyncDelivery.start(SyncDelivery.java:204)
    at com.stc.jmsjca.core.Activation.asyncStart(Activation.java:535)
    at com.stc.jmsjca.core.Activation.access$000(Activation.java:80)
    at com.stc.jmsjca.core.Activation$1.run(Activation.java:343)
    at java.lang.Thread.run(Thread.java:595)
    Could you please help me to figure out what is wrong with my configuration?
    Part of sun-ejb-jar.xml related to ra activation spec:
    <mdb-resource-adapter>
    <resource-adapter-mid>sun-jms-adapter</resource-adapter-mid>
    <activation-config>
    <activation-config-property>
    <activation-config-property-name>ConnectionURL</activation-config-property-name>
    <activation-config-property-value>lookup://targetConnFactory</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>Destination</activation-config-property-name>
    <activation-config-property-value>lookup://targetTopic</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>DestinationType</activation-config-property-name>
    <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>RedeliveryHandling</activation-config-property-name>
    <activation-config-property-value>2:1000; 3:move(queue:psdmqqueue)</activation-config-property-value>
    </activation-config-property>
    <!--subscription properties-->
    </activation-config>
    </mdb-resource-adapter>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>

    Hi Alexej,
    I looked at the problem and found out what the issue is. We recently added some functionality that will test if the dead letter destination is in fact a valid destination -- we thought it's better to find that out upfront, rather than if an error occurs. This is especially important with dead letter destinations being looked up in JNDI: mistakes are easily be made there.
    In any case, this new functionality introduced a problem where messages are sent from a queue, and the dead letter destination is a topic, or vice versa, where messages are received from a topic, and the dead letter destination is a queue.
    In case you're wondering why: we still need to support JMS 1.0.2 servers. For these servers, the queues and topics are strictly segregated. We do have automated tests that test functionality across domains, but as it turns out, these tests also test some other functionality at the same time that fool the dead-letter-destination-validation into thinking it is the same messaging domain.
    In any case, I've have created a fix for this, and I'm testing it right now.
    I'll send you an updated RAR by email in case you don't want to wait until the updated bits are available for download. What you also could do, as a workaround, is doing the same trick that fooled the automated test: you can specify the redelivery handling in the MDB code, e.g.
    public void onMessage(Message message) {
    message.setStringProperty("JMS_Sun_JMSJCA_RedeliveryHandling", "2:1000; 3:move(queue:*psdmqqueue*)");
    // do stuff
    HTH, Frank Kieviet

  • Message redelivery with non-transactional message bean JMS standard or weblogic standard?

    It is my understanding (or maybe my assumption) that a message is
              re-queued only if the transaction attribute of a container-managed
              message bean is set to "Required" and the message is PERSISTENT. So if
              it's set to "NotSupported", and thus, message receival is not within a
              transaction, the message would be un-queued and thus never be
              redelivered, should a failure occur within the bean. I discovered that
              even if the message bean is set as "NotSupported", should a failure
              occur within the bean, the message is re-queued to be received again
              at a later time.
              I'm very confused as to whether this mechanism is a JMS standard, or a
              feature of Weblogic. Well, maybe I'm just confused about message
              delivery/re-delivery. I understand that the JMS standard requires
              guaranteed delivery of a message to a receiver. Does this mean a
              message is only considered delivered if an acknowledgement is
              received, regardless of the transaction level? In other words, is the
              JMS standard that a message is considered delivered only if
              acknowledgement is indicated through the container, regardless of the
              transaction level of the message bean itself?
              

    You're right on the second part. That is, a JMS message is not considered to
              be "delivered" until it is acknowledged. There are a number of ways to make
              this happen when programming to the raw JMS API -- a look at the Javadoc for
              JMS or a good JMS book should clarify how to do this.
              With a message-driven bean, the EJB container acknowledges the message after
              you've successfully returned from the "onMessage" method. If you throw a
              RuntimeException from the "onMessage" method, or if it's an MDB with a
              transaction mode of "Required" and you call "setRollbackOnly" on the
              "MessageDrivenContext" object -- then your message will be redelivered.
              Regardless of how a message is acknowledged, if it's not acknowledged then
              it will be redelivered. This has nothing to do with whether the message is
              persistent. The difference is that if a message is persistent, then the JMS
              server is required to keep a copy on stable storage until the message is
              acknowledged so that if the JMS server itself crashes, the message will not
              be lost. For a non-persistent message, on the other hand, if the JMS server
              crashes, then the message may be lost.
              greg
              "Justin" <[email protected]> wrote in message
              news:[email protected]...
              > It is my understanding (or maybe my assumption) that a message is
              > re-queued only if the transaction attribute of a container-managed
              > message bean is set to "Required" and the message is PERSISTENT. So if
              > it's set to "NotSupported", and thus, message receival is not within a
              > transaction, the message would be un-queued and thus never be
              > redelivered, should a failure occur within the bean. I discovered that
              > even if the message bean is set as "NotSupported", should a failure
              > occur within the bean, the message is re-queued to be received again
              > at a later time.
              >
              > I'm very confused as to whether this mechanism is a JMS standard, or a
              > feature of Weblogic. Well, maybe I'm just confused about message
              > delivery/re-delivery. I understand that the JMS standard requires
              > guaranteed delivery of a message to a receiver. Does this mean a
              > message is only considered delivered if an acknowledgement is
              > received, regardless of the transaction level? In other words, is the
              > JMS standard that a message is considered delivered only if
              > acknowledgement is indicated through the container, regardless of the
              > transaction level of the message bean itself?
              

  • Need suggestion on  implementing JMS message error recovery

    Hi,
    Our application has a JMS topic where we publish application events. Now, there can be scenarios where the consumers cannot process the message due to some infrastructure issues and would error out. We need a way so that those messages can be reprocessed again later. we are thinking of the following design for JMS message error recovery
    1. Use a persistent TOPIC (this would ensure guaranteed delivery)
    2. Configure a error destination on JMS topic e.g a jms queue
    3. Have an error handling MDB listening to the Error destination. An error handling MDB would dequeue the errored messages from error destination and persist it to a Data base "error" table..
    4. Provide a mechanism to republish those messages to topic (e.g a scheduler or admin ui or a command line utility) .. The messages would deleted from database "error" table and published to topic again....
    A. Are there any issues with the above design which we need to handle?
    B. Are there any additional steps required in a Cluster environment with a distributed topic and distribute error destination? (our error mdb will have one-copy-per-application setting)
    B. From a performance angle, Is it OK to use persistent TOPIC ? Or will it better to persist the message to the db table and then publish it as a non persistent message ... ? (But i guess the performance should be more or less the same in both of these approaches)
    C. Are there any other recommended design patterns for error recovery of JMS messages
    Please advise.
    Regards,
    Arif

    Thanks Tom !
    We may not be able to go with the approach of delaying/pausing redelivery of the messsage because
    1. Pausing entire MDB approach: Our MDB application consumes messages generated by different producers and our MDB needs to continue processing the messages even if messages corresponding to one producer is erroring out
    2. Redelivery delay : This would only delay the retry of an errored message. But there would still be a problem if the message fails during all retries (i.e redelivery limit count). We don't want to lose this message. In our case, It is possible that a particular message cannot be processed due to unavailability of a third party system for hours or may be a day.
    Basically, i am looking on approaches for a robust and performant error recovery/retry framework for our application (refer details in my first post on this thread) while fully making use of all features provided by middleware (WLS). Please advise.
    Regards,
    Arif

  • I am unable to send JMS message to application which resides in third party

    I am able to produce the Message into JMS demoQueue which is available in SOA 10.1.3.3. And also I tried remote server which is available in my office it having the application SchoolMAX with JMS Configuration. So I need to produce the JMS message into SchoolMAX application. But I am unable to pass to the data’s to that SchoolMAX JMS.
    for this I have configured the respective queues, queue factory etc in Enterprise Manager , but i am not able to access our application which is in remote server through third party in JDeveloper for BPEL Process.
    please i am very new to this JDeveloper & BPEL Console , please help me out in resolving the issue ASAP. please we will be waiting for some reply.

    Hi Kathy,
    Happy Holidays!  Do you have an iPad with cellular service and a text-messaging plan?
    Send messages with your iPhone, iPad, or iPod touch - Apple Support
    http://support.apple.com/en-us/HT201287
    What's the difference between SMS/MMS and iMessage?
    SMS/MMS lets you send text messages and photos to other cellular phones or devices. iMessage lets you send text messages and photos to another iOS device over Wi-Fi, without worrying about text-messaging charges (cellular data charges may apply). 
    What do I need to use SMS/MMS and iMessage?
    Here's what you need to use SMS/MMS and iMessage:
    SMS/MMS: A text-messaging plan. Contact your carrier for more information.
    iMessage: An iPhone, iPad, or iPod touch with iOS 5 or later.
    How do I know if my message used SMS/MMS or iMessage?
    You can tell which type of message you're sending by the color of the Send button and text bubble.
    SMS/MMS: Send button and text bubbles are green.
    iMessage: Send button and text bubbles are blue.
    How can I link my iPhone number with Messages on my iPad, iPod touch, or Messages for Mac?
    When you sign in to Messages with your Apple ID on your iPhone, you link your phone number to your Apple ID. If you then sign in to Messages with the same Apple ID on your iPad, iPod touch, or Mac, Messages will link that device to your phone number as well.
    I hope this information helps ....
    - Judy

Maybe you are looking for