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
          > > >
          >
          

Similar Messages

  • Re: Constant Message Redelivery Problem

    You can get redelivery for other reasons as well. Redelivery occurs if the message is
              participating in a transaction, and the transaction fails for any reason.
              For example, if the MDB in turn calls an EJB which in
              turn calls JDBC then the tx becomes two-phase. If the JDBC call fails then the tx
              will roll back. Or if the tx times-out: the default tx timeout is 30 seconds, so if
              the MDB takes longer than 30 seconds then the tx will roll-back and message the will
              get redelivered.
              Even if the tx succeeds, in some cases you may have error states that re-enqueue the
              received message but let the transaction commit (WLI, BEA's integration product, can do
              this).
              This looks like the redelivery of a failed message, but is actually the delivery of a new
              version.
              Duplicates occur if a Queue MDB's descriptor actually points at a topic destination.
              Check for this one by comparing the JNDI name in config.xml against the
              descriptor destination type field...
              Tom
              sunshine wrote:
              > I encountered the same problem of repeat message delivery. In our situation, we are
              > using JMS JDBC Store and when the database goes down and comes back up, the MDB starts
              > processing messages but the messages keep recycling in the JMS Store.
              >
              > The MDB code tried catching all possible exceptions like RuntimeException and Exception.
              > None of these exceptions are logged. When we re-start the WL managed servers, those
              > messages in the JMS Store were flushed off.
              >
              > Any idea what caused the repeat message redelivery?? Thanks.
              >
              > Tom Barnes <[email protected]> wrote:
              > >Your MDB may be throwing a RuntimeException, which forces message
              > >redelivery. Put a try/catch/Throwable in the outermost scope of your
              > >onMessage() code to see if this is case.
              > >
              > >Note that in 6.1 and up you can configure redelivery delays, max redelivery
              > >counts and error destinations to alleviate this problem...
              > >
              > >Tom
              > >
              > >Toad wrote:
              > >
              > >> I have a message-driven bean listening on a message queue and everything
              > >> appears to work the first time the message is sent. The message is processed
              > >> and the OnMessage method returns without incident. There are no errors
              > >and
              > >> no exceptions are thrown by the JMS client or in the MDB itself. PROBLEM:
              > >> Message continually redelivered pegging the CPU at 100%. Inspection of
              > >the
              > >> JMSSTORE and JMSSTATE reveals messages still queued. Any ideas?
              > >
              

    And make sure that your MDB is not throwing Errors or RuntimeExceptions,
              as these don't necessarily get logged, but they cause rollbacks.
              Put a "try {} catch (RuntimeException re)
              { log; throw re; } catch (Error er) { log; throw er; }"
              around all the code within the MDB's "onMessage()" callback
              to see if this is happening.
              Manikyala Peddi wrote:
              > Hi,
              >
              > I have a MDB which is calling an EJB. The redelivery override period was set at 60 sec.
              >
              > Before completing the first message the same message is redelivered.The processing time in onMessage in MDB takes more than the Redelivery Override Period. Is there a way to prevent the delivery of the duplicate message before completing the first message.Iam using Weblogic 7.1
              >
              > Thanks
              >
              > Manikyala
              

  • Trying to understand message redelivery

    Hi,
    I'm trying to understand redelivery.
    I'm using JMS to sync user data from our J2EE system with our Lotus Domino system. I want to be sure that in the advent of any failure in this the sync-ing process, a notification is sent to ensure that at least the Notes Domino stuff can be sync-ed manually by an administrator.
    So my question is how to be sure to capture and send notification of EVERY failure with the information needed to manually sync if needed?
    As I understand it, it's my responsiblity to ensure that I handle all Exceptions in the onMessage() method of our MessageListener implementation - without throwing any new Exceptions. I do this so I'm confident that things like a Notes Session not being instantiated, or a Notes document not being found are handled and notifcation sent. The result is that if an Exception occurs at this level, I handle it and as far as JMS is concerned the message was consumed and got acknowledged. Right?
    But what about messages that fail before the MessageListener is reached - presumeably a problem with the JMS provider (we're using WebLogic 6.1). Can I just rely on JMS to redeliver failed messages and not worry about them? Is there a recommended way to test such failure so I can be sure what happens? I tried throwing a RuntimeException in the onMessage() method, but I did not observe any attempts to resend the message and when I browsed the queue it was empty.
    So as you can you see, I'm unclear about this! Appreciate and clarifying points!
    Terrence

    You can rely on the JMS provider to take care of it's own failures. However, please note that the JMS provider can fail right after you have successfully done your work in onMessage - but before the message acknowledgement happens. This means that in case of failure, you may get the last consumed message again.
    Also note that different JMS providers will handle RuntimeException's raised from onMessage differently, so check your vendor's documentation. After a couple of re-tries, your JMS provider might for instance deem that the receiver/subscriber has a problem consuming said message and move the message into an error queue.
    - Bjarne.

  • Pending message redelivery wait period after server startup

    Hi, I have seen an strange behaviour in the way pending JMS messages are
              redelivered to MDBs at server startup.
              In my unit test I have seen that, killing Weblogic during an MDB code
              execution as expected makes the container to redelivery unconfirmed message
              at server startup. I have also seen that it's redelivered about 4 minutes
              after server is started (more info of this in thread: "Problem with
              persistent messages and MDBs" 25 October 2002)
              After a recent crash we have had on the system in wich there were a lot of
              messages pending to deliver to an MDB we saw that they were being
              redelivered just after the MDBs were deployed while system was starting. Of
              course due to the fact that some components needed by the MDB were not
              deployed by that time, a lot of exceptions were raised making messages to be
              queued again and promptly delivered wich caused more exceptions. Just a big
              mess!
              I'm tring to figure a good work-around about this, what I wanted to know is
              how is implemented the "delay" to send messages after server startup. Is it
              done by comparing timestamp of message (when did it enter the queue and
              thereby persisted on the store) with current system time?. That approach of
              course will fail if any of the messages were sent before that "delay" time.
              If this is the case and there isn't a fix for it this is what I have in
              mind:
              Each MDB will have a private attribute wich will be used to detect when
              system has completely started. By default it will be false and after a
              message is sent to the MDB the first line of the onMessage method will test
              wether system has started or not (by checking weblogic connection port i.e.
              7001. Btw. is there any better way of checking server has finished start-up)
              if not, a runtime exception will be launched that will force message to be
              redelivered (without trying to execute any MDB code), I think setting a
              proper redelivery delay i.e. 30-60 secs. will allow server to startup with
              less problems (in the situation I described above JVM crashed with an 11
              system signal)
              Any other ideas to deal with this?
              Thanks in advance.
              Regards.
              Ignacio.
              

    Hi Ignacio,
              I think you can usually control the order in which ejb's are booted,
              through a combination of console settings and
              meta file entries. I suggest posting to the ejb newsgroup
              to find out how.
              The four minute delay you see is normal for resolving
              interrupted transactions, but I believe that an enhancement
              was put into a 7.0 SP to reduce or eliminate this interval,
              and that 8.1 has no interval. Post to the transaction
              newsgroup for more info, or contact customer support.
              Given that you referenced earlier posts on this issue, you
              probably already know how to tune the interval down to one
              minute even without the enhancements.
              There is no other delay for sending messages at system startup,
              as soon as the MDB is booted it attaches to JMS, and JMS
              starts delivering messages whose transactional state is known.
              Tom
              P.S. I suppose one way to detect end-of-boot is to
              place a startup class last in the boot order.
              P.P.S. For MDBs one alternative is to code a "sleep" in the onMessage if
              an unavailable resource is detected - this
              is hokey, but works as long as you have made sure that
              max-beans-in-free-pool totals do not come near or exceed
              available thread pool size.
              Ignacio G. Dupont wrote:
              > Hi, I have seen an strange behaviour in the way pending JMS messages are
              > redelivered to MDBs at server startup.
              >
              > In my unit test I have seen that, killing Weblogic during an MDB code
              > execution as expected makes the container to redelivery unconfirmed message
              > at server startup. I have also seen that it's redelivered about 4 minutes
              > after server is started (more info of this in thread: "Problem with
              > persistent messages and MDBs" 25 October 2002)
              >
              > After a recent crash we have had on the system in wich there were a lot of
              > messages pending to deliver to an MDB we saw that they were being
              > redelivered just after the MDBs were deployed while system was starting. Of
              > course due to the fact that some components needed by the MDB were not
              > deployed by that time, a lot of exceptions were raised making messages to be
              > queued again and promptly delivered wich caused more exceptions. Just a big
              > mess!
              >
              > I'm tring to figure a good work-around about this, what I wanted to know is
              > how is implemented the "delay" to send messages after server startup. Is it
              > done by comparing timestamp of message (when did it enter the queue and
              > thereby persisted on the store) with current system time?. That approach of
              > course will fail if any of the messages were sent before that "delay" time.
              >
              > If this is the case and there isn't a fix for it this is what I have in
              > mind:
              >
              > Each MDB will have a private attribute wich will be used to detect when
              > system has completely started. By default it will be false and after a
              > message is sent to the MDB the first line of the onMessage method will test
              > wether system has started or not (by checking weblogic connection port i.e.
              > 7001. Btw. is there any better way of checking server has finished start-up)
              > if not, a runtime exception will be launched that will force message to be
              > redelivered (without trying to execute any MDB code), I think setting a
              > proper redelivery delay i.e. 30-60 secs. will allow server to startup with
              > less problems (in the situation I described above JVM crashed with an 11
              > system signal)
              >
              > Any other ideas to deal with this?
              >
              > Thanks in advance.
              >
              > Regards.
              >
              > Ignacio.
              >
              >
              

  • 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

  • Multiple durable subscribers and message redelivery

    I am using WLS 8.1 SP1. I have a topic that has several durable MDB subscribers. In the case one of the MDB rolled back the TX, upon redelivery of the message, do all durable subscribers receive the message again, or just the one that rolled back the TX gets the redelivered message?
              Thanks.

    Hi Eric!
              Each durable subscription gets its own copy of each published message, and only one MDB deployment can attach to a particular durable subscription at a time. So when an MDB durable subscriber rolls back the receive of a message, the rolled back message will be redelivered to the same MDB deployment only.
              The same reasoning applies to non-durable subscriptions as well.
              Tom, BEA

  • 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

  • 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?
              

  • 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?

  • MDB Message redelivery

    Hi all,
    I am using WLS6.1 sp2 running on solaris. I would like to know how I could configure
    my MDB and the message sender(JMSConnectionFactory) so that messages will only be
    reloaded after the server startup class has completed its execution?
    Thanks!

    Check if there is any other MDB registered to testweb.queue.AsyncDispatcher_error. I get a feeling that another MDB picks up your errored message which doesn't match the expected message type it requires.
              -Kirupa

  • Message Redelivery and specifying a maximum retry count

    I am using JMS calls to receive messages from a queue. When I want to rollback, I can call the queueSession.rollback() function and the message is redelivered to the queue.
    Right now it will try to process the message again and again and keep on rolling it back. I would like to specify to only retry processing the message 3 times and then do something else.
    I noticed when I do a System.out.println(jms.Message) it displays all the message properties including JMSXDeliveryCount. There is however, no get method to retreive that value.
    Does anyone have any idea of how to control message retries?
    -Isaac

    I am using JMS calls to receive messages from a queue. When I want to rollback, I can call the queueSession.rollback() function and the message is redelivered to the queue.
    Right now it will try to process the message again and again and keep on rolling it back. I would like to specify to only retry processing the message 3 times and then do something else.
    I noticed when I do a System.out.println(jms.Message) it displays all the message properties including JMSXDeliveryCount. There is however, no get method to retreive that value.
    Does anyone have any idea of how to control message retries?
    -Isaac

  • 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">

  • 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

  • Ordering of rollback messages redelivery

    I have two transacted message consumers, which are receiving messages repeatedly. If one of the consumer (i.e. ConsumerA) is rollback, would the other consumer (Consumer B) receive the rollback messages?
    I found that the method to handle these rollback messages is different across the vendors.
    e.g. SwiftMQ, the consumer B will receive the rollback messages, but it may receive the (rollback) message that is older than it's latest messages.
    e.g. SonicMQ, the consumer B will not receive the rollback messages, even I have created a new consumer (Consumer C), the messages cannot be received neither, that could cause MESSAGE LOST, if the consumer A doesn't receive message after rollback.
    That's really frustrated, does JMS Spec. defined any standard way to handle this senario...?
    Thanks a lot
    Germen

    e.g. SwiftMQ, the consumer B will receive the rollback
    messages, but it may receive the (rollback) message
    that is older than it's latest messages.That's ok. ;-)
    e.g. SonicMQ, the consumer B will not receive the
    rollback messages, even I have created a new consumer
    (Consumer C), the messages cannot be received neither,
    that could cause MESSAGE LOST, if the consumer A
    doesn't receive message after rollback.Well, that's bad.
    That's really frustrated, does JMS Spec. defined any
    standard way to handle this senario...?Nope. The JMS spec doesn't define the behavior of multiple consumers per queue, so this is vendor specific. However, if a JMS product supports multiple consumers, rollbacks shouldn't lead to a message lost but to a re-queue of the message so that other consumers can pick it up.
    -- Andreas

  • JMS messages not being redelivered correctly ..

    Hi Folks
    I am having this weird problem with JMS using workshop/weblogic 8.1 SP2. I am
    using a JMS control from within my pageflow to post a JMS message to a predefined
    JMS queue (created by workshop for every web project . Mine is called testweb.queue.AsyncDispatcher
    as my web project is called testweb). Since pageflows cannot receive asysnchronus
    callbacks , I have not implemented the callback handler for teh JMS control as
    I just need to be able to post from my Pageflow . So far so good.
    I have an MDB listening to testweb.queue.AsyncDispatcher and that basically tries
    to open a URL connection to a thirdparty web site and if connect is not successful
    it should keep trying after every 10 seconds. I have the MDB throw an EJBException
    (to simulate message redelivery) . The problem is that the message is redelivered
    exactly 8 times and then I get the below message on the console :-
    <May 24, 2004 10:18:00 AM EDT> <Error> <WLW> <F1234PiyushK> <cgServer> <ExecuteThread:
    '14' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-001D75CA6E6EB041A149>
    <000000> <onMessageException: java.lang.Exception: Unexpected message format>
    I also have an MDB listening to the error queue testweb.queue.AsyncDispatcher_error
    but its onMessage is never executed .
    I am stuck on this for the last efw days so appreciate any help. Should I post
    a message to the JMS queue directly from a session bean insetad of from a page
    flow ?
    my JMS queue config parameters are mentioned below :-
    Time To Deliver Delivery 5000
    Delivery Mode Override - No Override
    Expiration Policy - Redirect
    Redelivery Delay Override - 5000
    Redelivery Delay Override - 10
    Error Destination - testweb.queue.AsyncDispatcher_error
    The other parameter values are the default values and I have not changed them

    I am having the same problem with a simple WLI timer channel that posts a string message called myMessage every 20 seconds (what I defined in the WLI console).
    This works like a charm.
    In my process.jpd file, the timer subscription is followed by a JMS control, with a sendTextMessage(myMessage) which sends the message to a queue
    @jc:jms
    send-type="queue" send-jndi-name="JmsTimerProcessWeb.queue.AsyncDispatcher"
    receive-type="queue" receive-jndi-name="NightlySiteProcess.queue.AsyncDispatcher"
    connection-factory-jndi-name="weblogic.jws.jms.QueueConnectionFactory"
    All goes well while sending but the messages tell otherwise:
    === Timer sent message = This is the WLI message
    === JMS sent message = This is the WLI message
    <Aug 24, 2005 1:19:30 PM MDT> <Error> <WLW> <000000> <onMessageException: java.lang.Exception: Unexpected message format>
    What does this mean?
    I tried to add a project with a Message-bean, I cannot get the string message. I tried with an ObjectMessage, the same scenario everytime.
    Any suggestions?

Maybe you are looking for

  • How to get the source file name and transform into database

    Hi, We need to load data from source file abc.csv into oracle table. during loading, we need to keep the file name abc.csv and write into the database table as one field. Is there anyone who did the similar task? and how to make it? Pls help!

  • Macbook pro runs hot

    My early 2008 MacBook Pro runs very hot and can't tell if the fan is running. Any suggestions?

  • Macs and AVCHD

    I've currently subject to the growing pains of using tape to hard drive. My camera is a Sony HDR-CX350V and shoots in AVCHD format. Sure it means good quality video but its a real nightmare when it comes to editing. I currently edit on Premiere CS5 b

  • Help me in scripts

    Hi miz,           I had copied standard script(medruck) into my own script,but I am getting problem in some areas like stndard attributes.after coping script every thing is in changeble mode expect sdandard attributes for changing the size of windows

  • PM Order Confirmation list

    Dear all, I have a (PM) Work order against which a number of Internal Activities allocations have been created. All the respective confirmations for work carried out show up on the Work Order confirmation list. The problem is, some of the Activities