Why to use JMS????

Hi All,
i am new to JMS, can any body tell me Why to use JMS??
i know it used to send message but for why???
if u answer me with an example it will be useful for me.
thanks in advance.

Hi,
Well one very good reason to use JMS is to keep applications that produce information decoupled from applications that consume information. With this decoupled approach, you can any number of producers and consumers sending and processing information...thus making your solution very scalable.
If you think of an online ordering system. A user plugs in a bunch of information about a product they wish to order. Once the form is completed, they hit the submit button. Now you can take one of two approaches:
1. You can have an Enterprise Java Bean ( EJB ) service the order request. That EJB could then communicate with other EJBs within an inventory system to perform a bunch of checks and eventually hand it off to the appropriate system to fulfill the order. From the user's perspective, they are going to have to wait until all of that processing has completed before they can move on. Not a very nice situation. There is a potential that the user could be sitting on their order screen for mintues!!
2. The other approach is to wrap all of the information supplied on the order form into a JMS message and forward the message to an appropriate Topic or Queue. On the other side of that Topic or Queue an inventory system subscribes for order messages. The nice thing about this approach: as soon as the message is sent off to the Topic or Queue, the user regains control of the screen and can continue browsing. Another benefit, you can have multiple consumers processing orders.
I apologize for the length of the response. These are only two benefits of using a Messaging-based approach....there are many, many more.
Regards,
J.

Similar Messages

  • SOAP - Why not use JMS as the transport layer?

    I have been looking at the SOAP standard and can't understand
    why something hasn't been done. I wondered if someone could help.
    With the current Apache SOAP implementation there is a SOAP
    Transport interface which is implemented for SMTP and HTTP. The
    format of the messages never changes. Although it is not a
    protocol it seems eminently sensible to me that there should be
    a JMS implementation. Then infrastructure bridging cold be used
    to give a universal message queueing standard.
    Being as the current standard supports asynchronous messaging
    over SMTP. It seems to be a trivial matter to add to the SOAP
    implementation that Oracle supply. Does anyone have any good
    reason why it shouldn't be done and is there any reason Oracle
    and other standards body members couldn't have implemented it
    and agreed it in the standard?

    Am I missing something? I wasn't thinking of embedding JMS
    messages over HTTP, but using JMS itself. This would provide an
    industry standard for message queueing message formats, and
    would allow interaction with any message queueing product
    through bridges (i.e. OMB, with no real work). Aren't you
    talking about something different?

  • Why we use MQ not JMS Queues or AQ ?

    Hi,
    Is there any specific reason most of the companies using MQ for messaging and not using AQ or JMS Queues ?

    Hi,
    AFAIK, the companies that have IBM infrastructure in place prefer using the MQs. Also as MQ is capable of being accessed using JMS as well as MQ, it adds to the usability.
    Following could be helpful.
    How to configure MQ with WLS (JMS MQ vs Native MQ)
    Regards,
    Neeraj Sehgal

  • Problem with Send using JMS Adapter with Websphere MQ

    Hi,
    We have two scenarios using JMS Adapter with MQ:
    1. File->PI->MQ
    This works fine and drop the file in MQ correctly.
    2. MQ->PI->File
    This gives an error reading from the queue: (see highlighted in the log below). It correctly connects to the queue name. But it fails with the message "Could not begin a AF transaction".
    Our PI version is 7.0 SP 13
    Websphere MQ Version 6.0.
    Any idea what could be wrong?
      Cluster Node  Administration Information  Availability Times
    Cluster Node Details for Channel CC_JMS_MQ_Sender
    Short Log 
    In the Last 4 Hours Server 0 15_92786
    _Sucessfully connected to destination 'queue:///MMPP.PLM.FGH41? CCSID=37&targetClient=1'_
       Line 1 / 1
    Processing Details for Cluster Node Server 0 15_92786
    Type 
    Time Stamp 
    Message ID 
    Explanation 
    9/2/08 2:27:28 PM 2e6206f0-7925-11dd-bc02-0003bae50b4d Error while processing message '2e6206f0-7925-11dd-bc02-0003bae50b4d';  _detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Could not begin a AF transaction: TxManagerException: Unable to open transaction: com.sap.engine.services.ts.exceptions.BaseSystemException at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:103) ..._  
    9/2/08 2:27:28 PM 2e6206f0-7925-11dd-bc02-0003bae50b4d XI message ID corresponding to JMS message with ID 'ID:414d512071736431202020202020202047d9462024028b02' will be created as a new GUID with value '2e6206f0-7925-11dd-bc02-0003bae50b4d'
    Amith Dharmasiri

    Checked the drivers installed in :
    /usr/sap/<SID>/DVEBMGS<SYSNO>
    /j2ee/cluster/server0/bin/ext/com.sap
    .aii.af.jmsproviderlib
    They are available and properly added to aii_af_jmsproviderlib.sda.
    The drivers are:
    CL3Export.jar
    CL3Nonexport.jar
    com.ibm.mq.jar
    com.ibm.mqjms.jar
    connector.jar
    dhbcore.jar
    rmm.jar
    These were installed per OSS note 747601.
    Any other suggestions, why retrieving from MQ doesn't work?

  • Should I use JMS?

    I have a new project where I need to send XML messages to a client from a server and vice-versa. However, my clients are embedded 16-bit micros and my server application is written in Java. The clients will be mobile, connected via a wireless network and may be connected or not connected at times to the network.
    I want to be able to queue outgoing messages for each client so when the client becomes availiable on the network the server can send the necessary messages to the client. But the client cannot use JMS API to subscribe...etc to queues, it can only send simple commands using XML to the server via a socket.
    Is JMS something I can use here?
    Any suggestions and information is appreciated.
    Thanks.
    Dave

    Sounds like we are trying to do simillar things :)
    Why cannot your client use JMS ?
    You can embed XML messages inside JMS messages, so you should be able to send messages both ways.
    I curious how you are attaching to the JMS bus without being a JMS client?
    -CG

  • InvocationException when use JMS from RA

    Hi everybody,
    I encountered an interesting thing (I guess a bug).
    The JMS Reference Implementation on the J2EE 1.4 RI works if you use JMS API in your servlets or even in you standalone (not deployed) application.
    But when you use the same coding inside of your Resource Adapter, like
    try{
    Context jndiContext= new InitialContext();
    javax.jms.ConnectionFactory jmsConnectionFactory =
    (javax.jms.ConnectionFactory)jndiContext.lookup
    ("QueueConnectionFactory");
    javax.jms.Connection jmsConnection =
    jmsConnectionFactory.createConnection();
    javax.jms.Session jmsSession =
    jmsConnection.createSession(false,
    Session.AUTO_ACKNOWLEDGE);
    jmsConnection.close();
    }//try
    catch (java.lang.Exception ex){
    ex.printStackTrace();
    }//catch
    the Session cannot be created and following Exception is thrown
    com.sun.enterprise.InvocationException
         at com.sun.enterprise.util.InvocationManagerImpl.getCurrentInvocation(InvocationManagerImpl.java:188)
         at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:96)
         at com.sun.enterprise.resource.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:149)
         at com.sun.enterprise.resource.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:58)
         at com.sun.jms.connector.ra.JMSConnectionAdapter.createSession(JMSConnectionAdapter.java:363)
    The only cause for this Exception I see, is that J2EE RI doesn't handles yet the case, when the JMS API calls are comming from the threads, which are issued specially for resource adapters. And since even the standalone application using default environment properties to creat an InitialContext can create a Session to a JMS queue, I don't see the reason, why the Resource Adapter shouldn't be able to do this. So I guess, that is a bug.
    But anyway, does somebody know a workaround for this case? Or just any ideas?
    Thanks,
    Eugen

    Any luck figuring this out? i'm getting the same exception when appserver 8 does an auto reload of my webapp. For some reason the jdbc connection pools are messed up at that point.

  • Can i use JMS in this scenario

    Hi all,
              I have a doubt .I just want to know wether i can use JMS in this situation.
              By the end of processing in our module, we will have a ServiceRequest.Now we
              have to pass that ServiceRequest related information to other module which
              is residing on another machine.
              So i was thinking of this
              1)our module end point is a servlet.
              2)there i construct the xml string with all the info related to
              ServiceRequest.
              3)after that i create a text message and post it to JMS queue on another
              server(module)
              4)Then there is an MDB which recieves the request using onMessage method
              and then that ServiceRequest related changes r made in the db.
              Is JMS an ideal solution in this scenario.
              I was also just thinking,JMS is for asynchronous communication.
              Now don't u think that i can achieve this kind of asynchronous communication
              by sending(posting using HttpURlConnection) the xml messaage from servlet1
              in server 1 to servlet 2 in other module(server2) and have the jdbc code to
              save the data related to ServiceRequest in the servlet in the other
              module.That way also i acheive kind of asynchronous communication(i.e am not
              getting any response back).Why shud i use JMS then.
              So i just want to know is this the right scenario for going for JMS or we r
              just complicating things.
              Thnx in Advance
              Veena.
              

    JMS is ideal for asynchronous behaviour, why try to build your own
              asynchornous behaviour. If you want to have two processes just for async
              behavior, u have to take into account many other issues, like one process
              going down. How would you scale your application.
              Why can't ur first servlet write directly to the database?
              -Vikas
              "Veena" <[email protected]> wrote in message
              news:[email protected]...
              > Hi all,
              >
              > I have a doubt .I just want to know wether i can use JMS in this
              situation.
              >
              > By the end of processing in our module, we will have a ServiceRequest.Now
              we
              > have to pass that ServiceRequest related information to other module which
              > is residing on another machine.
              >
              > So i was thinking of this
              >
              > 1)our module end point is a servlet.
              > 2)there i construct the xml string with all the info related to
              > ServiceRequest.
              > 3)after that i create a text message and post it to JMS queue on another
              > server(module)
              > 4)Then there is an MDB which recieves the request using onMessage method
              > and then that ServiceRequest related changes r made in the db.
              >
              > Is JMS an ideal solution in this scenario.
              >
              > I was also just thinking,JMS is for asynchronous communication.
              > Now don't u think that i can achieve this kind of asynchronous
              communication
              > by sending(posting using HttpURlConnection) the xml messaage from servlet1
              > in server 1 to servlet 2 in other module(server2) and have the jdbc code
              to
              > save the data related to ServiceRequest in the servlet in the other
              > module.That way also i acheive kind of asynchronous communication(i.e am
              not
              > getting any response back).Why shud i use JMS then.
              >
              > So i just want to know is this the right scenario for going for JMS or we
              r
              > just complicating things.
              >
              > Thnx in Advance
              > Veena.
              >
              >
              >
              

  • Can I use JMS for this?

    User logs into our administrative console, selects a job, clicks run.
    Behind the scenes, the run command actually creates a job and returns XML which provides a long list of commands that need to be executed in order for that "job" the user triggered to be complete. This XML contains everything from shell scripts that need to be triggered to PL/SQL functions and stored procedures that need to be called...and they're listed in this XML file in the order they need to be executed and the next process in the list can only be executed when the process before it is finished. This all needs to go on behind the scenes, uninhibiting the user's experience on the website...so that's why I thought I might be able to use JMS but it seems everything needs to be written in java for this to work, which is a problem being I need to trigger runtime processes on the Linux box to execute shell scripts, which are not written in java...how would those shell scripts communicate with the JMS?
    Anyone doing anything like this? Examples somewhere? It's kind of like a job management console...the jobs are pretty complex and can take up to 45 minutes or more to complete, which is why we need to come up with a way to run them from the app server, but in the background, asynchronously from the user's website utilization. This obviously, because of the time some of these take to complete, can't be a request/response architecture...
    Thoughts? Help? Anything greatly appreciated.
    Thanks!
    rlb

              poorni wrote:
              > Hello everyone,
              > I need to send an alert message from the client to a server(which is
              > remote). Can I use JMS for this?.
              Yes.
              If so can anyone please suggest me
              > an open source JMS provider.
              WebLogic has JMS built-in.
              > Thank you,
              > poornima
              

  • Using JMS from EJB

    Hello,
    In fact I have 2 questions.
    1). Can I use JMS inside my EJBeans (I mean, obtain connections, create sessions, create producers/consumers, send/receive messages)? If I can not, please explain in a couple of words, why?
    2). Can I use static variables inside entity beans?
    Any suggestions will be highly appreciated.
    Thank you,
    densimf.

    1. yah i think there is no issue in this
    2. entity bean object represent a single row in a database. so doesnt understand the significance of having a static field in this. generally it is not used i feel.

  • Why when using Adobe Bridge,  I apply a star rating,  the rating does not show up in Photoshop Elements? [tags]

    Why when using Adobe Bridge,  I apply a star rating,   the rating does not show up in Photoshop Elements.  I use Elements as my organizer and Bridge to view as it is much more user friendly.  Anyone any solutions??

    Most likely you have set the wrong file as the external editor. You don't want the obvious one; that's just a link to the welcome screen. Go back and choose this one, which is hidden away inside the folder Support Files:

  • I want to ask something about firefox. why firefox use very much memory? can you develop to reduce memory comsume? this problem is very distrub in my PC with low memory.

    I want to ask something about firefox.
    why firefox use very much memory?
    can you develop to reduce memory comsume?
    this problem is very distrub in my PC with low memory.
    == This happened ==
    Every time Firefox opened

    How much memory is Firefox using right now?
    # Press '''CTRL+SHIFT+ESC''' to load the Task Manager window
    # Click the Processes tab at the top. (Click once near the top of the window if you don't see tab
    # Find firefox.exe, and see how many kilobytes of memory it's using.
    Showing around 80MB when Firefox first starts is normal. Right now, I have 75 tabs open and it's using 500MB - this varies a lot depending on what you have in the tabs.
    Other than high memory usage, what other problems are you experiencing? (Examples include slowness, high CPU usage, and failure to load certain sites)
    Many of these issues, including high memory usage, can be caused by misbehaving add-ons. To see if this is the case, try the steps at [[Troubleshooting extensions and themes]]. Outdated plugins are another cause of this issue - you can check for this at http://www.mozilla.com/plugincheck

  • Why we use different clearing account for GR/IR and planned cost clearing a

    My client ask for using same account for GR/IR account and all planned cost clearing account.
    i try to convince it should be different accounts but he needs a logical answer.
    Why we use different clearing account for GR/IR and planned cost clearing accounts?

    Dear friend.
    u just tell him while doing GR it will debited n  while doing IR it should get credited.hence we  need to take diff G/L account or same account.
    regds
    nasir

  • HT201343 My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found

    My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found. So cannot use mirroring.
    I have follow trouble shooting , they recommend to go system preference -> display , thus can find out the mirroring icon if no mean it doesnt support. But according to the web, Early 2011 MBP should be able to use, dunno why.

    Just realise I havent updated my OS to mountain lion and this is the reason why I cannot use mirroring before ^^
    Thanks all

  • How can I delete the TemporaryTopic using JMS C API or VC++

    Hello everybody,
    how can I delete the TemporaryTopic after created TemporaryTopic using JMS C API "JmsSessionCreateTemporaryTopic"?
    I checked the document about JMS C API, but I couldn't find any API for delete TemporaryTopic, it's really not existing?
    Or if there's any other way that I can delete TemporaryTopic using VC++? Any comments will be appreciated.
    Thanks for your help!
    Youbing he

    As far as I can tell, there's no C-API option for deleting a temporary topic other than to close the connection used to create the temporary topic. Note that it is inefficient to frequently create and destroy temporary topics.
    You can get pretty much equivalent performance and functionality with a shared regular topic, non-durable subscriptions, and selectors that take advantage of the "indexed subscriber" optimization. (Consumers specify a selector that is unique to them in the exact form of "MyUniqueID NOT NULL", while publishers send to a specific consumer by adding "MyUniqueID" as a message property. The "X NOT NULL" selector format activates the indexed subscriber optimization.)
    Tom
    Edited by: TomB on Apr 27, 2010 10:44 AM

  • How do i develop a chat application using jms over web based

    I want to develop a chat application using jms with mailing,file transfer and audio facilities
    can anyone help me to how to go abt that

    There is a good article from Sun on a simple example of what you want - it could serve as a basis for you.
    http://developer.java.sun.com/developer/technicalArticles/peer/

Maybe you are looking for

  • Error while Trying to Burn a CD

    PLEASE HELP!! I have been trying to burn CD's from iTunes and it burns half of the songs, gives me an 4251 unknown error code, and aborts the burn. I have followed all of the suggestions on the help page (updating drivers, turning off the screensaver

  • After intalling iOS5, doesn´t display all albuns of the artists

    After intalling iOS5, doesn´t display all albuns of the artists, but all albuns are there when you list "albuns". e.g.: I have 5 Annie Lennox"s albuns. When I list "Artists", Annie Lennox only shows 3 albuns, but when I list "Albuns" I can find all t

  • CASH DESK RECEIPT PRINTING

    hie gurus im getting an error 'Enter at least one business partner' when i try and print a cash desk receipt n transaction FPCJ. this is the upgrade system im testing however i compared it with the previous one and all forms and payment programs seem

  • Hierachical report

    hi , i am not gettiing proper hierachical alv output report for the following report. Plz help me out. *& Report  ZSH_HR_ALV REPORT ZPR_02. TYPE-POOLS: SLIS. TABLES:pa0002,pa0008. data:begin of it_pa0002 occurs 0, checkbox, pernr like pa0002-pernr, b

  • BCS blueprint and design documents

    Hi all, Can anyone provide me BCS blueprint and design documents? Regards, Suneer.