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

Similar Messages

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

  • JMS adapter transaction. Rollback message to queue.

    Hi all !
    A have question about jms adapter transaction. My composite application has 3 steps : JMS adapter (listener), mediator, WS adapter. JMS adapter listen queue push message to mediator, mediator invoke web service. If ws not available (server down), mediator try recovery 5 times. After 5 times, reject message from queue. I wont rollback message to queue. I saw examples with JMS + BPEL, but it not help me. Anybody can help me.

    Hi,
    You don’t need to catch a mediator fault – you can let it rollback to the JMS Queue and let the Queue do the retries.
    To get the retries working, log in to the weblogic console and navigate to JMS Modules -> Your Module -> Your Queue -> Configuration -> Delivery Failure
    Here you will find options for Redelivery Limit. Set this to the number of retries you need.
    Then navigate to the connection factory you want and set the redelivery delay.
    This should get your desired behaviour, but once the message has failed it will be discarded. If you prefer to put it on an error queue you can create an error queue, and in the original queue’s, goto Delivery Failure, change the expireation policy and set the Error Destination to be your error queue.
    Hope that helps!
    Robert

  • 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
              

  • Change sales orders using ORDCHG Message type

    Hi,
    I am trying to test the changing of quantity on sales order items using message type ORDCHG and process code ORDC. In segment E1EDP01 the action code is set to 002 - item changes. However when the IDoc is posted a new line is created in the order rather than the existing one being changed. The action code in the header is set to 003 - one or more items changed. Does anybody know how to control the change of quantity for an existing item?
    Many Thanks
    Caroline

    Hi,
    Try to populate Logical message code 'CHG' in the EDIDC-MESCOD while you are creating the IDoc.
    If a message code has been entered in the (inbound) partner profiles, the external system must fill the field during IDoc inbound processing.
    Regards,
    Yogesh

  • Process code for 869(EDI ) Order Status Inquiry Message type.

    Hi Gurus,
                       Please can any one help in providing Process Code for 869 Order Status Inquiry Message type.
    Thanks,
    Sudhakar

    Hi Everybody.
    There's no standard process code for LOIPRO Outbound Idocs.
    This Idocs are threated as master data info, and could only be automatically generated by Data Distribution Model.
    BD64.
    Anyway, you can define your own Outbound Process Code in WE41 using CLOI_MASTERIDOC_CREATE_LOIPRO FM.
    You can choose.
    Regards.
    Albert.

  • Posting EDI Order confirmation without message control

    Hi,
    I would like to post a EDI sales order confirmation without message control through z program.
    Please let me know how to do this???
    thanks in advance
    Mukund

    Hi
    This link may be useful
    Re: Re-open EDI - ORDCHG for outbound sales order

  • Planned orders with excesseption messages

    Hello All,
    I want to creates a customised report for the planned orders with exception messages. In which table I get the required information?  User want the selection criteria as WBS, meterial codes  and material groups. Thats why I can not use the MD04,MD05 etc.
    Please suggest the tables.
    Regards,
    Mayur

    Hello Ramagiri,
    Thanks for the quick reply.
    Table MDKP shows X tick in exception group but does not show the message number. In which table I will get these message number?
    Mayur

  • OSB Console - Order by num messages not ordering correctly

    I am a consultant with experience in SOA Suite 11g, but I don't know much about OSB.
    I have a customer who is complaining that in OSB console he cannot sort by the number of messages received. There is a view with a table in the admin console webapp where you can click on the column header to sort by values in the column, the messages column which shows the number of message received seems to do some arbitrary ordering, but it is not in increasing or decreasing order. One theory the customer had is that numbers are displayed in an "American way", i.e. a thousand is written 1,000 instead of 1000. I am not sure if this is the problem, and he has checked the logs to see that the value is in fact stored as 1000. Customer's linux machine has US regional settings but customer is in non-English speaking country.
    Has anybody encountered anything like this, or does anybody have any tips on what we could try to fix this? Customer needs to be able to order by num messages.
    Location of issue is in OSB admin console, "service health" tab. OSB 11g

    I am a consultant with experience in SOA Suite 11g, but I don't know much about OSB.
    I have a customer who is complaining that in OSB console he cannot sort by the number of messages received. There is a view with a table in the admin console webapp where you can click on the column header to sort by values in the column, the messages column which shows the number of message received seems to do some arbitrary ordering, but it is not in increasing or decreasing order. One theory the customer had is that numbers are displayed in an "American way", i.e. a thousand is written 1,000 instead of 1000. I am not sure if this is the problem, and he has checked the logs to see that the value is in fact stored as 1000. Customer's linux machine has US regional settings but customer is in non-English speaking country.
    Has anybody encountered anything like this, or does anybody have any tips on what we could try to fix this? Customer needs to be able to order by num messages.
    Location of issue is in OSB admin console, "service health" tab. OSB 11g

  • No delivery-relevant items in order 0060000120, order type ZNRE, Message no

    Hi Experts
    I am trying to do return delivery( Sales Return) through the transaction code "VL01N" but I am getting the error "No delivery-relevant items in order 0060000120, order type ZNRE, Message no. VL455".
    1) I did Check the Sales Order Document "ZNRE" at Transaction Code VOV8, there Delivery Type "LR" is assigned, both the order and delivery related billing are assigned with "RE-Credit For Returns and Sales Document Category is "H-Returns".
    2) I did check the Item Category "REV" at Transaction Code "VOV7", there both Schedule Line and Returns box are with check and Item Relv f Delv is Uncheck.
    3) I did check Schedule Line Category "ZZ-No MRP" at Transaction Code "VOV6", there Item relv f Del is check and movement type 651-Good Ret. Del Returns.
    4) I did check Copy Control at VTLA, LR is delivery type and ZNRE is order type is maintained properly both the side at header level and item level.
    5) I did check at Return Sales Order Document Flow, it is as follows below
    Document                                                         Quantity     Unit     Ref.Value    Currency    On               Statutus
    Narmada Qtn 0020000043/10                          1               EA       350000         NZD          04.10.2011   Completed
    Narmada Std Order 0000012229/10                1               EA       350000         NZD          04.10.2011   Completed
    Delivery 00815249/10                                      1               EA                                             05.10.2011   Completed
    Invoice (F2) 0090036433/10                            1               EA       350000         NZD          05.10.2011   F1 Document Created
    Narmada Return 0060000120/10                     1               EA       350000         NZD          12.10.2011   Open
    Kindly help me to resolve this error.
    Thanks and Regards
    M.Dheerendar Jain

    Dear DHEERENDAR JAIN ,
    Please check few things.
    whether the immediate delivery switch is clicked for the document type (just to make sure delivery is not actually created in the background). or else check and confirm in the doc.flow.
    Then keep item category as relevant for delivery.
    Now in table VBUK or VBUP , you check whats the delivery relevance . give your sales order no as VBELN .
    I hope you know to use SE11 /SE16N etc
    It will be NOT RELEVANT FOR DELIVERY.
    now comes to va02, make some changes in the qty and save.
    Check whether VBUK/VBUP-delivery relevance field is updated.
    Even if you have made a change in the item category - relevance for delivery , it will not affec the documents which were already created.
    Now if its a DEV or QAS, make a fresh order and test. It should work.
    If its prdn, please let us know. We will have to edit 2 fields in the table VBUK and VBUP.
    Thanks & Regards,
    Hegal K Charles

  • Message Order after Rollback

    Let says I have 100 messages.
    Client 1 pulls message 1 off of the queue. The client encounters an exception and rolls the message transaction back. Also, in that time frame, client 2 processed messages 2 - 10.
    Questions:
    When client 1 reconnects to the queue which message does it get?
    What if client 2 connected first, which message would it get?
    Where did the rolledback message go? The front or end of the line?

    Do you have a redelivery limit set on the producer or the destination? If you do, a message may be discarded once the limit is reached depends on your delivery-failure-params on the destination. You can configure to have the messages put into an error destination once they reach their redelivery limit.

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

  • Transaction Session, Rollback and Redelivery

     

              Well, apparently this is a bug in Weblogic 6.1 up to sp2. (I can not comment if this
              bug either exists or does not exist in 6.0 and below or 7.0 and above.) Bug ID is
              :CR080301 if this is impacting anyone else. I'll post the final outcome and if
              it gets fixed.
              (I would also ask everyone if you post a question and end up going to BEA, customer
              support, if you could post the outcome, that would make everyone's life so much easier.)
              To respond to me via E-mail, simply pull the weeds. =)
              Tom Barnes <[email protected]> wrote:
              >Hi Mike,
              >
              >As far as I know, Zach's response still stands. The behavior you are seeing,
              >given
              >the limited information posted, doesn't ring any bells. Please forward
              >your issue to
              >customer
              >support, with enough information to reproduce along with a SP number and
              >thread-dumps.
              >They will know if your particular problem has been seen before...
              >
              >If you like, post your reproducer code here, with thread-dumps.
              >
              >Tom
              >
              >P.S. Email addresses on this forum tend to be "bogus" because this is not
              >a formal
              >forum. Think of it as a free Anne Landers for JMS. Posters are volunteers,
              >posting
              >on "their own time".
              >
              >Mike Wiles wrote:
              >
              >> Was there ever any outcome to this issue? I am experiencing the same
              >behavior and
              >> since both of these E-mail addresses are pretty much bogus, it is impossible
              >to get
              >> some sort of follow-up.
              >>
              >> Mike
              >>
              >> To send me an E-mail, simply pull the WEEDS.
              >>
              >> "Zach" <[email protected]> wrote:
              >> >Very strange behavior. You should file a support case.
              >> >_sjz.
              >> >
              >> >"Bart Simpson" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> Hi,
              >> >>
              >> >> I am trying to understand, how rollback works with transaction session
              >> >in
              >> >WLS
              >> >> 6.1 sp1. What should happen when session.rollback() is called? After
              >> >calling
              >> >> rollback() couple of times, the server program receiving the messages
              >> >just
              >> >hangs?
              >> >> I have configured redelivery delay to 3000 and redelivery tries to
              >3.
              >> >However,
              >> >> if I restart the server program, then I see the normal redelivery
              >> >happening again.
              >> >> Is this a feature or bug?
              >> >>
              >> >> Here is the client program:
              >> >> package com.malani.jms.client;
              >> >>
              >> >> import java.util.*;
              >> >>
              >> >> import javax.jms.*;
              >> >> import javax.naming.*;
              >> >>
              >> >> import com.malani.jms.resources.*;
              >> >>
              >> >> public class Client {
              >> >>
              >> >> public static void sendMessage(QueueSender aSender, Session aSession,
              >> >int
              >> >> i)
              >> >> throws JMSException
              >> >> {
              >> >> aSender.send(aSession.createTextMessage("" + i));
              >> >> }
              >> >>
              >> >> public static void printUsage() {
              >> >> System.out.println("Usage:");
              >> >> System.out.println(Client.class.getName() + " jndi_queue_name");
              >> >> System.exit(1);
              >> >> }
              >> >>
              >> >> public static void main(String[] args) {
              >> >> if (args.length != 1) {
              >> >> printUsage();
              >> >> }
              >> >>
              >> >> QueueSender aSender = null;
              >> >> QueueSession aSession = null;
              >> >> QueueConnection aConnection = null;
              >> >> try {
              >> >> Properties p = new Properties();
              >> >>
              >> >p.load(JMSProperties.class.getResourceAsStream("jms.properties"));
              >> >> InitialContext aIC = new InitialContext(p);
              >> >> QueueConnectionFactory aFactory = (QueueConnectionFactory)
              >> >aIC.lookup(
              >> >> p.getProperty("queue.connection.factory.name")
              >> >> );
              >> >> aConnection = aFactory.createQueueConnection();
              >> >> aConnection.start();
              >> >> aSession = aConnection.createQueueSession(
              >> >> false,
              >> >> QueueSession.AUTO_ACKNOWLEDGE
              >> >> );
              >> >> Queue aQueue = (Queue) aIC.lookup(args[0].trim());
              >> >> aSender = aSession.createSender(aQueue);
              >> >>
              >> >> int i = 0;
              >> >> for (; i < 20; i++) {
              >> >> sendMessage(aSender, aSession, i);
              >> >> }
              >> >> } catch (Exception e) {
              >> >> e.printStackTrace();
              >> >> } finally {
              >> >> try {
              >> >> if (aSender != null) {
              >> >> aSender.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> try {
              >> >> if (aSession != null) {
              >> >> aSession.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> try {
              >> >> if (aConnection != null) {
              >> >> aConnection.stop();
              >> >> aConnection.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> }
              >> >> }
              >> >> }
              >> >>
              >> >> Here is the server program:
              >> >> package com.malani.jms.transaction;
              >> >>
              >> >> import java.util.*;
              >> >>
              >> >> import javax.jms.*;
              >> >> import javax.naming.*;
              >> >>
              >> >> import com.malani.jms.resources.*;
              >> >>
              >> >> public class Server {
              >> >> public static final String JNDI_QUEUE_NAME =
              >> >"transaction_queue_jndi_name";
              >> >>
              >> >> public static void main(String[] args) {
              >> >> QueueReceiver aReceiver = null;
              >> >> QueueSession aSession = null;
              >> >> QueueConnection aConnection = null;
              >> >> try {
              >> >> Properties p = new Properties();
              >> >>
              >> >p.load(JMSProperties.class.getResourceAsStream("jms.properties"));
              >> >> InitialContext aIC = new InitialContext(p);
              >> >> QueueConnectionFactory aFactory = (QueueConnectionFactory)
              >> >aIC.lookup(
              >> >> p.getProperty("queue.connection.factory.name")
              >> >> );
              >> >> aConnection = aFactory.createQueueConnection();
              >> >> aConnection.start();
              >> >> aSession = aConnection.createQueueSession(
              >> >> true,
              >> >> -1 // doesn't really matter
              >> >> );
              >> >> Queue aQueue = (Queue) aIC.lookup(JNDI_QUEUE_NAME);
              >> >> aReceiver = aSession.createReceiver(aQueue);
              >> >> final QueueSession aQS = aSession;
              >> >> MessageListener aML = new MessageListener() {
              >> >> public void onMessage(Message m) {
              >> >> try {
              >> >> TextMessage aTM = (TextMessage) m;
              >> >> String s = aTM.getText();
              >> >> System.out.println("Text is:\t" + s);
              >> >> int i = Integer.parseInt(s);
              >> >> if (i < 15) {
              >> >> aQS.commit();
              >> >> } else {
              >> >> aQS.rollback();
              >> >> }
              >> >> } catch (JMSException e) {
              >> >> e.printStackTrace();
              >> >> }
              >> >> }
              >> >> };
              >> >> aReceiver.setMessageListener(aML);
              >> >> byte[] b = new byte[1];
              >> >> System.in.read(b);
              >> >> } catch (Exception e) {
              >> >> e.printStackTrace();
              >> >> } finally {
              >> >> try {
              >> >> if (aReceiver != null) {
              >> >> aReceiver.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> try {
              >> >> if (aSession != null) {
              >> >> aSession.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> try {
              >> >> if (aConnection != null) {
              >> >> aConnection.stop();
              >> >> aConnection.close();
              >> >> }
              >> >> } catch (JMSException e) {}
              >> >> }
              >> >> }
              >> >> }
              >> >>
              >> >> Here is the properties file:
              >> >> #
              >> >> java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
              >> >> java.naming.provider.url=t3://localhost:7001
              >> >> queue.connection.factory.name=weblogic.jms.ConnectionFactory
              >> >>
              >> >#queue.connection.factory.name=weblogic.jms.MessageDrivenBeanConnectionFacto
              >> >ry
              >> >> #queue.connection.factory.name=transaction_connection_factory_jndi_name
              >> >>
              >> >> Here is the JMSProperties file:
              >> >> package com.malani.jms.resources;
              >> >>
              >> >> public class JMSProperties {
              >> >> }
              >> >>
              >> >> The first time the server is run, it hangs at 16. Messages 17, 18,
              >and
              >> >19
              >> >are
              >> >> not processed. Is this correct behavior:
              >> >> Text is: 0
              >> >>
              >> >> Text is: 1
              >> >>
              >> >> Text is: 2
              >> >>
              >> >> Text is: 3
              >> >>
              >> >> Text is: 4
              >> >>
              >> >> Text is: 5
              >> >>
              >> >> Text is: 6
              >> >>
              >> >> Text is: 7
              >> >>
              >> >> Text is: 8
              >> >>
              >> >> Text is: 9
              >> >>
              >> >> Text is: 10
              >> >>
              >> >> Text is: 11
              >> >>
              >> >> Text is: 12
              >> >>
              >> >> Text is: 13
              >> >>
              >> >> Text is: 14
              >> >>
              >> >> Text is: 15
              >> >>
              >> >> Text is: 16
              >> >>
              >> >>
              >> >> What happened to message 17, 18, and 19?
              >> >>
              >> >> Now, if I stop the server, and start it again, I see the requequing
              >and
              >> >redelivery
              >> >> of the messages as shown below:
              >> >> Text is: 15
              >> >>
              >> >> Text is: 16
              >> >>
              >> >> Text is: 17
              >> >>
              >> >> Text is: 18
              >> >>
              >> >> Text is: 19
              >> >>
              >> >> Text is: 15
              >> >>
              >> >> Text is: 17
              >> >>
              >> >> Text is: 16
              >> >>
              >> >> Text is: 18
              >> >>
              >> >> Text is: 19
              >> >>
              >> >> Text is: 15
              >> >>
              >> >> Text is: 17
              >> >>
              >> >> Text is: 16
              >> >>
              >> >> Text is: 18
              >> >>
              >> >> Text is: 19
              >> >>
              >> >> Text is: 17
              >> >>
              >> >> Text is: 18
              >> >>
              >> >> Text is: 19
              >> >>
              >> >>
              >> >> Is there some optimization going on?
              >> >>
              >> >> Thank you so much....
              >> >>
              >> >>
              >> >
              >> >
              >
              

  • Change Purchase order gives error message ---- making PO to Hold.

    Hi SRM gurus,
    We are trying to change the PO which is not issued to the vendor or output prepared and getting the following error in the web browser.
    "Complete Purchase order &&&&&&&&&& first or Hold the changes".
    We are trying to add the street name in the vendor address thru. Header Data ---> Partner Overview ---> Vendor -- details tab.
    The "check" gives the following message  Purchase order &&&&&& with document number &&&&&& is correct.
    Only when we "Order" it the above error arises and we cannot make changes anymore.
    Did anybody got this error?
    Can anyone suggest on this?
    Reg.,
    Sridhar.
    [email protected]

    Hi Sridhar,
    Pls Note if you have  clicked on the "Order" Tab then the PO is sent to vendor,In that case you can't change it for sent line item and if want to do that then Pls cancel the sent PO first.
    Pls revert in case of any problem.
    Rewards Points for suitable answer!!

  • How to send IDoc(Sales Order Confirmation) without Message control

    Hi,
    I need to send Sales Order confirmation,Delivery and Invoice through ALE (IDoc's). I am asked not to use MESSAGE CONTROL or CUSTOM IDoc to send confimation.
    I dont need to send a instant confirmation but i can do it at a specified time intervals.
    Do we have any other possiblity other than the both?
    Can you please give the steps to do, if possible?
    Thank you in advance,
    Gangolu.

    Hi
    This link may be useful
    Re: Re-open EDI - ORDCHG for outbound sales order

Maybe you are looking for

  • Why i can´t active my Imessage account...i try everything.

    Hello : I have tried all possible ways to activate iMessage ...Still nothing. Always say : Waiting Activation.

  • Connecting to an oracle database

    Hi! I am a student of Computer Engineering. I was hoping someone could help me out giving me options of could be wrong in my database application. The problem is this: I connect to an oracle database and i have a username, password and an url directi

  • Two iphones one itunes

    There are two iphones in my household. Only one will show up on the itunes list. When either one is pluged in itunes syncs both the same. How do I make it see two different iphones so each can have different folders?

  • Sharing Cable Internet over Airport

    I'm working on some computers for a friend. An iBook (dual USB) and a Dell Latitude D600 with the Intel Centrino. THey have a Snow ABS (dual Ethernet). I don't know what kind of cable modem they have, but i'm assuming that it outputs to Ethernet. How

  • Workshop only supports deploy to admin server

    Multiple servers found in domain configuration config.xml. Are there any plans to support managed servers in the near future ? Edited by: user4047671 on Feb 11, 2010 1:16 PM