SetTimeToDeliver

          I'm using the setTimeToDeliver() method to delay delivery of a message to a JMS
          queue. If my Weblogic 7 Server goes down before the message is delivered to the
          queue, is that message lost?
          

Ronan Gill wrote:
          > I'm using the setTimeToDeliver() method to delay delivery of a message to a JMS
          > queue. If my Weblogic 7 Server goes down before the message is delivered to the
          > queue, is that message lost?
          Hi Ronan,
          The timed message's QOS is no different than message's without
          a time-to-deliver. If the message is persistent, it will be
          recovered on reboot, otherwise it will be lost.
          Tom
          

Similar Messages

  • Scheduled delivery of individual messages

    I've ready through the forum and have found a way to deliver a JMS message at some point in time by setting the producer:
              ((weblogic.jms.extensions.WLMessageProducer) qsender).setTimeToDeliver(cal.getTime().getTime());
              However, I do NOT want to affect every message sent by the producer, as this method seems to do.
              I want to be able to set a time of delivery for individual messages. Is this the purpose of the DeliveryTime header? How do I set this properly; will this work:
              objectMessage.setLongProperty("DeliveryTime", deliverDate.getTime())
              thanks!

    This is how I've solved the problem of setting a delivery time for individual messages. My unit tests confirm it works as expected, it just feels like a hack.
              public void publish(Message message, Date absDeliveryTime) {
              // reset the timeToDeliver for the publisher
              // as the previous call may have set this
              ((WLMessageProducer) publisher).setTimeToDeliver(-1);
              if (absDeliveryTime != null) {
              Date timeNow = new Date();
              ((WLMessageProducer) publisher).setTimeToDeliver(
              absDeliveryTime - timeNow.getTime());
              }

  • ***URGENT*** Time Based Work Flow ERROR/PROBLEM

    Knowing that the PRE() function doesn't work smoothly with the wait function. We went ahead and added it in the conditions statement and disabled the reeval check box, but the problem is it appears that it is still checking the condition. Anyone have this problem or possible solution?
    Edited by: 783027 on Jul 26, 2010 3:49 PM

    See answer to your previous post.
              Jai wrote:
              > Hi ,, I am trying to use time based delivery of message in WLServer7.0. After going
              > through the various posts I figured this is the snippet required to send time-based
              > messages. But i havent had any luck on it as yet. Can someone please point out
              > where am I going wrong in this or send a snippet of code which does this.
              >
              > here is snippet of code ....
              >
              > /*initialization */
              >
              > qconfactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              > qcon = qconfactory.createQueueConnection();
              > qsession=qcon.createQueueSession (false,Session.AUTO_ACKNOWLEDGE);
              > queue = (Queue) ctx.lookup (QUEUE);
              > qsender = qsession.createSender(queue);
              > msg = qsession.createTextMessage();
              > qcon.start();
              >
              > /* actual bit which does sending */
              > Date later = new Date();
              > long now = System.currentTimeMillis();
              > GregorianCalendar cal = new GregorianCalendar();
              > cal.getTime().toLocaleString();
              > System.out.println("The current time is: " + cal.getTime().toLocaleString());
              > now += 10*1000; later.setTime(now); cal.setTime(later);
              >
              > msg.setText(message);
              > ((WLMessage)msg).setJMSDeliveryTime(cal.getTime().getTime()); ((weblogic.jms.extensions.WLMessageProducer)
              > qsender).setTimeToDeliver(cal.getTime().getTime());
              > qsender.send(msg);
              >
              > Many Many thanks for your swift response ...
              

  • WLS 6.1 JMS - JCOM

    Hi Folks,
    I have successfully connected to a JCOMBridge running in a separate
    process on another machine from a Visual Foxpro 7 client.
    I'm having difficulty accessing my MDB running in the WLS 6.1 server.
    When my VFP client accesses the the JCOMBridge, a new instance of my MDB
    is created in the JCOM jvm.
    I've attempted to run the JCOMBridge within the WLS server. The thought
    here is that the bridge running in the same JVM as WLS would have access
    to my MDB methods and variables. I registered my JCOMBridge class as a
    startup class on my WLS server. And the class starts fine like it
    should. However, my object reference moniker on my client does not
    access the bridge anymore (using same bridge port JCOM_DCOM_PORT=7050).
    Has anyone successfully accessed an MDB from a JCOM client? Would like
    to know how to do that.
    Thanks.
    Bob Gontarz

    Chad Stansbury wrote:
              > A couple of questions:
              >
              > I'm using a user txn on a servlet to insert into a JMS queue, and update a field
              > in the database. I'm using a Message-driven Bean (with container managed txn)
              > to service said queue...
              > When I rollback the txn in the MDB, it looks like it
              > actually rolls back the servlet's txn as well! I was expecting this to result
              > in the message being put back onto the queue only... Can I correct this behaviour?
              You are right, this is odd and incorrect behavior, but I can't imagine
              how it happening. Contact customer support.
              >
              > Is there a way for me (in the MDB) to take the message and place it back onto
              > the queue for processing later (e.g., 5 minutes)?
              >
              There are a couple of ways. You can configure a "RedeliveryDelay" on
              the destination via the console, this delays redelivery of rolled back
              messages. Or you can commit() the transaction, and resend the message
              to its originating queue using a
              ((weblogic.jms.extensions.WLMessageProducer)producer).setTimeToDeliver(5000);
              > Thanks in advance, Chad
              Your welcome,
              Tom
              

  • WLS 6.1 JMS Questions

              A couple of questions:
              I'm using a user txn on a servlet to insert into a JMS queue, and update a field
              in the database. I'm using a Message-driven Bean (with container managed txn)
              to service said queue... When I rollback the txn in the MDB, it looks like it
              actually rolls back the servlet's txn as well! I was expecting this to result
              in the message being put back onto the queue only... Can I correct this behaviour?
              Is there a way for me (in the MDB) to take the message and place it back onto
              the queue for processing later (e.g., 5 minutes)?
              Thanks in advance, Chad
              

    Chad Stansbury wrote:
              > A couple of questions:
              >
              > I'm using a user txn on a servlet to insert into a JMS queue, and update a field
              > in the database. I'm using a Message-driven Bean (with container managed txn)
              > to service said queue...
              > When I rollback the txn in the MDB, it looks like it
              > actually rolls back the servlet's txn as well! I was expecting this to result
              > in the message being put back onto the queue only... Can I correct this behaviour?
              You are right, this is odd and incorrect behavior, but I can't imagine
              how it happening. Contact customer support.
              >
              > Is there a way for me (in the MDB) to take the message and place it back onto
              > the queue for processing later (e.g., 5 minutes)?
              >
              There are a couple of ways. You can configure a "RedeliveryDelay" on
              the destination via the console, this delays redelivery of rolled back
              messages. Or you can commit() the transaction, and resend the message
              to its originating queue using a
              ((weblogic.jms.extensions.WLMessageProducer)producer).setTimeToDeliver(5000);
              > Thanks in advance, Chad
              Your welcome,
              Tom
              

  • JMS Timer Message ClassCastException

              Hi,
              we're using Weblogic's JMS extension of setting a send delay, e.g.:
              ((WLMessageProducer) publisher).setTimeToDeliver(new Long(notification.getDelayMinutes()
              * 60 * 1000).longValue());
              This works quite well. But it seems that the server is unable to delete messages
              once they're triggered.
              In the logs we periodically see something like:
              ####<10.12.2003 15.01 Uhr IRT> <Error> <Kernel> <DP03W01> <PostServer>
              <ExecuteThread: '3' for queue: 'JMS.TimerClientPool'> <<WLS Kernel>> <>
              <BEA-000802> <ExecuteRequest failed
              java.lang.ClassCastException.
              java.lang.ClassCastException
              at weblogic.jms.backend.BETopic._addMessageToConsumers(BETopic.java:409)
              at weblogic.jms.backend.BETopic.access$000(BETopic.java:48)
              at weblogic.jms.backend.BETopic$1.expireTimeout(BETopic.java:343)
              at weblogic.jms.backend.BETimerNode.execute(BETimerNode.java:132)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              So far so good. As long as the server is running the triggered messages won't
              get executed again. But once we restart the server. These messages come back to
              life.
              Does anyone have an idea what could cause such a behaviour?
              Thanks,
              Fabian
              

    Hi Fabian,
              That would be a bug, which I suspect it is already a known one.
              Search the customer support web-site, and/or file
              a case with customer support. Meanwhile, since you don't
              want to timer messages to survive a server crash, you may
              want to make sure that your application publishes them
              with a non-persistent QOS to begin with - that may work
              around the problem.
              Tom
              Fabian Crabus wrote:
              > Hi,
              >
              > we're using Weblogic's JMS extension of setting a send delay, e.g.:
              > ((WLMessageProducer) publisher).setTimeToDeliver(new Long(notification.getDelayMinutes()
              > * 60 * 1000).longValue());
              >
              > This works quite well. But it seems that the server is unable to delete messages
              > once they're triggered.
              > In the logs we periodically see something like:
              > ####<10.12.2003 15.01 Uhr IRT> <Error> <Kernel> <DP03W01> <PostServer>
              > <ExecuteThread: '3' for queue: 'JMS.TimerClientPool'> <<WLS Kernel>> <>
              > <BEA-000802> <ExecuteRequest failed
              > java.lang.ClassCastException.
              > java.lang.ClassCastException
              > at weblogic.jms.backend.BETopic._addMessageToConsumers(BETopic.java:409)
              > at weblogic.jms.backend.BETopic.access$000(BETopic.java:48)
              > at weblogic.jms.backend.BETopic$1.expireTimeout(BETopic.java:343)
              > at weblogic.jms.backend.BETimerNode.execute(BETimerNode.java:132)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              >
              > So far so good. As long as the server is running the triggered messages won't
              > get executed again. But once we restart the server. These messages come back to
              > life.
              >
              > Does anyone have an idea what could cause such a behaviour?
              >
              > Thanks,
              >
              > Fabian
              >
              >
              

  • My JMS 2 wish list - Part 1, send delay

    I attended the JavaOne 2010 session on future JMS evolutions. During the session I described some current limitations or issues I'd like to be solved in a portable way. I've been adviced to share the issues to get feedback from the community. I will post each issue in a dedicated thread.
    Issue 1 - Send delay
    I'd like to be able to specify a delay when a message is sent. This way the message will be available to consumption only after the delay has expired.
    JBoss supports this using the specific 'JMS_JBOSS_SCHEDULED_DELIVERY' message property.
    WebLogic supports this using a specific API, the WLMessageProducer:setTimeToDeliver method.
    Another possible solution would be an extra parameter to the MessageProducer:send method.
    A portable solution would be useful.
    Edited by: 807264 on Nov 3, 2010 6:00 AM

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

  • Absolut time to deliver

              Is there a way to set an absolut time to deliver a Message?
              All I find is WLMessageProducer.setTimeToDeliver() which receives a relative time
              in miliseconds.
              I think I read somewhere that internally the JMS server calculates the corresponding
              absolut time, it seems to me it's 'not clever' to do this twice...
              Thanks,
              Paulo
              

    Paulo Santos wrote:
              > Is there a way to set an absolut time to deliver a Message?
              One can configure a cron-like schedule on the time-to-deliver-override for the
              destination.
              Otherwise, no.
              >
              > All I find is WLMessageProducer.setTimeToDeliver() which receives a relative time
              > in miliseconds.
              > I think I read somewhere that internally the JMS server calculates the corresponding
              > absolut time, it seems to me it's 'not clever' to do this twice...
              I suggest filing an enhancement request.
              Meanwhile, pass in "absoluteTime - System.currentTimeMillis()", which, while 'not
              clever',
              will very likely suffice. :-)
              Tom, BEA
              >
              >
              > Thanks,
              > Paulo
              

  • Delayed JMS Message with MQSeries?

    Hello,
              does anyone know a possibility to delay the delivery of a JMS message
              in a MQSeries queue?
              I know that Weblogic JMS messages can be delayed with the
              setTimeToDeliver method. But this only works with the Weblogic
              JMSServer.
              Any ideas?
              Thanks.
              

    This doesn't work well in that it requires polling with a new selector over
              and over again. This means creating a new consumer with each selector. It
              is very expensive.
              _sjz.
              "Hans-Peter Keilhofer" <[email protected]> wrote in message
              news:[email protected]..
              > I have a solution now: Use a message selector, which compares the
              > time_now with the time set in a property of the message. (as long
              > value).
              > That's it.
              >
              > [email protected] (Hans-Peter Keilhofer) wrote in message
              news:<[email protected]>...
              > > Hello,
              > >
              > > does anyone know a possibility to delay the delivery of a JMS message
              > > in a MQSeries queue?
              > > I know that Weblogic JMS messages can be delayed with the
              > > setTimeToDeliver method. But this only works with the Weblogic
              > > JMSServer.
              > >
              > > Any ideas?
              > >
              > > Thanks.
              

Maybe you are looking for

  • DAC Repository importing issues in DAC 10.1.3.4.1 version.

    Dear All, I had just installed DAC 10.1.3.4.1 and had finished doing the repository import. Now i am facing an error while doing the metadata import. I have OBIA 7.9.6.1 version installed in my system. So, i have used the metadata files from that. I

  • Web gallery error help

    Hello all: I have a friend running PSCS3. on a macbook pro laptop. When he goes to builkd a web gallery and chooses the images, he creates a folder on the desktop and names it (not the same name as the source folder). When h clicks ok he gets an erro

  • KVM suggestions

    I am looking to get a KVM for use with a number of servers including a number of Macs and I want this to be a rackmountable solution. In the past I have used a Belkin Omniview Pro which had support for USB and VGA and this worked fine. However with V

  • Burn CD's in Solaris 10?

    Is there a way to burn CD's in Solaris 10? I've read about mkisofs, but from what I understand, that only makes the iso and doesn't actually burn to a disk. Could it be as simple as dd? Thanks, Andy

  • Some Hyperlinks Non Functional in MS Excel Browser App (Sharepoint 2010)

    I have an Excel File that has Hyperlinks that work 100%  in the Desktop App, but only 50% of  them work in the Excel Web App.   The other 50% go to incorrect locations.   I am looking for clues on this very strange behavior......