How JMS and MDB works?

Hi,
I am writing a portion of a J2EE application and would like to perform asynchronous processing. Im new to JMS. Following are some questions i have:
- How does JMS process message, queue and MDB? I mean when a message is send to a queue, how does it know which MDB should be receiving the message?
- Im using JBoss which has JMS support. Under normal circumtances, is it all right to use the default queue that comes with the JMSProvider (i.e. the application server in this case)? Or should we write some other codes for create queue?
- In terms of design, should one MDB only performs a single function? The reason for this is that a MDB seems to only have a single 'onMessage' method?
- The following is what my application tries to achieve: Servlet will call a method in a StatelessSessionBean. SessionBean perform first some processing. And since part of the process does not require to be done at the same time, i would like it to happen asynchronously. I actually intend to have that part of the processing happens in an MDB. Is that the correct way to use JMS & MDB? How else could i perform asynchronous processing?
Thanks much.
Veny

- how does it know which MDB should be receiving the message?
The MDB is configured to consume messages from a specific queue in one of the J2EE xml files (Haven't written them in a while so can't be sure which one).
- is it all right to use the default queue that comes with the JMSProvider
I wouldn't, because your queue names won't reflect the job they are doing.
Create some new queues by updating your jms providers config files.
- In terms of design, should one MDB only performs a single function
This is a reasonable approach to take, although it's sometimes OK to have an MDB act like a controller and delegate to handler classes (possibly session beans) based on the message type. The latter approach is suitable only for small apps as it's far less configurable / scalable (e.g. you can't say I want 10 MDB instances to processing message X and 50 MDB instances to process message Y).
- Is that the correct way to use JMS & MDB
Yes, that's pretty much it, although I would still delegate the work to a handler class. It will make if easier to test and more portable.

Similar Messages

  • How OPA and OPM works

    Hello Guys,
    It's me again! :) I already deployed and installed OPA and OPM and was able to access the sample rulebases. I just have some questions / clarifications on how OPA and OPM works.
    1. When you build and run project via OPM, the web-determinations page only opens locally. It will not be directly loaded / deployed to the web server unless the compiled project (rulebase) is copied to the *.war file. I think OPM is really for developers’ use only. Once the project is tested, developer will request to deploy it to the web server. Please confirm if my understanding is correct.
    2. Is there a technical architecture diagram that will show how the OPA components work? Or how are they connected with each other? When I access the sample rulebase, the only URL I see is the web-determinations. Not sure what's the purpose of the other components or if they work independently.
    3. Should the contents of web-determinations and determination-servers directories the same? For instance, if we deploy a new rulebase/plugin to web-determinations, should we also copy those files to determination-servers?
    4. For the interview portlet, will it work with 'Oracle WebCenter Portal 11g Patch Set 5 (11.1.1.6.0)'? In the OPA install guide, it is stated that the 'Consume the Interview Portlet on WebCenter can be done on any instance of WebCenter and will require you to have a working portal application', what does the portal application mean? If we'll integrate OPA with PeopleSoft, do we need to install PeopleSoft Portal application? For now, we only planned to use OPA with PeopleSoft HRMS, Financials and CRM applications. Please confirm if we need to install PS Portal application as well.
    This is all I have for now... Thanks in advance for your assistance. :)
    Regards,
    Ann M.

    1. Generally, OPM is for business users not developers. (i.e. Policy or Business Analysts who communicate with and understand business terminology and express business policies using that terminology). Developers play a role in integrating the policy model to another systems data model - but that should primarily be a data mapping exercise and design and implementation of integration when necessary.
    2. There is a good bit of information on architecture, components, etc. covered in both the developer documentation on OTN ( http://docs.oracle.com/html/E38272_01/toc.htm ) and high level overviews on the OPA YouTube Channel: http://www.youtube.com/user/OraclePAVideos
    3. You only need both is you plan on using both (i.e. Oracle Web Determinations is for running interviews to collect data to be used in making a determination, Oracle Determinations Server is for SOA - i.e. SOAP endpoint which publishes WSDLs that define the request/response formats for integration via web services with other apps.
    4. Portal apps / infrastructure is only required if you are deploying the OPM project within a portal (i.e. as an interview running within a portal app).
    (3 and 4 above are related, you didn't ask but a fourth option for deployment integration is via an API so basically an OPM project can be deployed as one or more of the following: an interview app (Web Determinations), an interview within a portal, a web services endpoint (Determinations Server) or integrated via an API. The YouTube content on architecture overview and integration will explain in a bit more detail and the OTN content will go into much more detail on each of the options.

  • How SDA and DDA works in Java Card?

    Hi Friends,
    I want to know how exactly SDA and DDA works in Java Card technology..
    Yes, i know that SDA (Static Data Authentication) is valid for every transactions, but the key used is always same for every transaction made..
    and DDA (Dynamic Data Authentication) uses dynamic key for every transactions, it means that one key is valid for one transaction..
    But, i'm a little bit confused how this is implemented in Java Card..
    Is it related with SCP01 and SCP02?..
    Please help me regarding this..
    Thanks in advance

    Hi,
    I want to know how exactly SDA and DDA works in Java Card technology..This is an EMV concept and as such is not implemented in Java Card as such. You would have to create an implementation to be able to use SDA and DDA.
    But, i'm a little bit confused how this is implemented in Java Card..
    Is it related with SCP01 and SCP02?..It is not implemented natively in Java Card and are not related to SCP. SDA and DDA are for the EMV card application (card application data updates) and SCP is for the card manager (card content updates). While they could be considered similar concepts, they are not related in a Java Card sense.
    Cheers,
    Shane

  • How installing and browsing works on default memor...

    E52 Internal memory is only 60mb and default if im not mistaken is 57mb after installing some file before using,but i was thinking why my default memory C drive is still decrease the memory even though i install all my application in my E drive except theres no option to choose from hows that works?how to maintain the default memory of my C drive without anything coming there?
    NOKIA E52-1
    034.001
    RM-469

    You're looking for a way to prevent any writing to the C: drive?  Sorry, but I don't think that's possible...any more than it's possible to do with a Windows computer.   Here are some thing that I believe are always written to C:
    1) browser cache/bookmarks/cookies
    2) contacts/calendar/notes
    3) call log
    4) any "Visual Voicemail" (mp3 based) services
    5) system settings like WiFi hotspots, recognized Bluetooth devices, etc.
    In any Unix system, it should be possibly to make system directories read only, but this is generally not true for other OS's.  I am curious how much space you would reclaim by clearing all the web browser data, but I wouldn't worry about it too much.  57 MB is a LOT of space.  Just back up your data regularly and hopefully you will never need to do a hard reset.

  • How parentSandboxBridge and childSandboxBridge works?

    Hello,
    I am new to as3 and air development. I have created one app in adobe air for Android (using Flash CS 5.5). I am loading externally stored pages (swf) into my app. The last page which is assessment needs to send the score to the main app when user click "Submit Score" button from the page. It also needs to access the main app function which will restart the app from the beginning. I have not used the class based approach, simple time line coding. I have placed one blank movie clip on stage and then loading external swfs with the help of loader. I have read that we can do the communication using parentSandboxBridge and childSandboxBridge. But, I have not found the suitable example for the same. Can anybody explain me how to do it? Or give me some sample code.

    1. Generally, OPM is for business users not developers. (i.e. Policy or Business Analysts who communicate with and understand business terminology and express business policies using that terminology). Developers play a role in integrating the policy model to another systems data model - but that should primarily be a data mapping exercise and design and implementation of integration when necessary.
    2. There is a good bit of information on architecture, components, etc. covered in both the developer documentation on OTN ( http://docs.oracle.com/html/E38272_01/toc.htm ) and high level overviews on the OPA YouTube Channel: http://www.youtube.com/user/OraclePAVideos
    3. You only need both is you plan on using both (i.e. Oracle Web Determinations is for running interviews to collect data to be used in making a determination, Oracle Determinations Server is for SOA - i.e. SOAP endpoint which publishes WSDLs that define the request/response formats for integration via web services with other apps.
    4. Portal apps / infrastructure is only required if you are deploying the OPM project within a portal (i.e. as an interview running within a portal app).
    (3 and 4 above are related, you didn't ask but a fourth option for deployment integration is via an API so basically an OPM project can be deployed as one or more of the following: an interview app (Web Determinations), an interview within a portal, a web services endpoint (Determinations Server) or integrated via an API. The YouTube content on architecture overview and integration will explain in a bit more detail and the OTN content will go into much more detail on each of the options.

  • Could someone explain to me how categories and keywords work?

    I have some questions with regard to iTunes U categories and keywords and would be grateful for any advice.
    1. Is our RSS code (below)correct?
    2. Does the category and sub category of each feed item have to match the category stated at channel level? This is quite important since we have items with different categories and sub categories within a single collection.
    3. Is it compulsory to state a category at channel level and item level?
    4. Is it worth adding a keywords element for each item and if so how do the keywords improve discoverability in iTunes U?
    RSS Code -
    In the channel element of our RSS feeds (collections) we’re stating the iTunes U category element like this (we can add a subcategory if required) –
    <itunesu:category code="110" text="Social Science"/>
    Within the item element we’re stating the category and sub category for each item, as per the example here - http://www.apple.com/itunes/podcasts/specs.html#category but with the addition of the itunesu code attribute - like this -
    <itunesu:category code="101" text="Engineering">
    <itunesu:category code="101101" text="Civil"/>
    </itunesu:category>
    Message was edited by: Tom_Williams
    Message was edited by: Tom_Williams

    Choose Store from the very top of the computer's screen, and then click on Authorize Computer.
    (73343)

  • How authentication and authorization works in webdynpro for abap and portal

    Hi Experts,
    I have to create an webdynpro abap application for portal which will update the user information in the backend HR standard table.
    The SSO  (certificate)setup is already doen between portal and backend sap system . Do I need to pass the portal userID to the webDynpro ABAP application, via IView created to update the table. OR SSO will take care itself.
    Thanks and regards,
    Ajay

    Dear Ajay
    If SSO is configured as you have mentioned, then all is ok and you don't need do pass the user ID.
    It will be done automatically.
    Just try for yourself - create a simple WD ABAP and put it inside an iView.
    Then have this WD to write the SY-UNAME on the screen.
    That way you will confirm what I'm saying
    Kind Regards
    /Ricardo Quintas

  • How paragraphSpaceBefore and paragraphSpaceAfter works?

    I have set paragraphSpaceBefore and paragraphSpaceAfter property for paragraphElement but it showing which property value is grater in both.
    please guide me.
    Thank you.

    7.4.6. paragraphSpaceBefore attribute Specifies the space before a paragraph. Adjacent vertical space collapses. For two adjoining paragraphs (A and B), where A has paragraphSpaceAfter 12 and B has paragraphSpaceBefore 24, the total space between the paragraphs will be 24, the maximum of the two, and not 36, the sum. If the paragraph comes at the top of the column, no extra space is left before it. Valid values range from 0 to 8000.
    7.4.7. paragraphSpaceAfter attribute Specifies the space after a paragraph. Adjacent vertical space collapses. For example, for two adjacent paragraphs one having a space after and the other having a space before, the space will be the maximum of the two spaces, not the sum. No “space after” is necessary if the paragraph falls at the bottom of the  element. Valid values range from 0 to 8000.
    If you think it does not act the same way as the description above, please show me your sample code. Thanks!

  • Don't understand how iCloud and Photo work

    I make photos with my iPhone... I get 4 different folders on the iPhone (film, streaming, panoramics, video) + recently deleted + other app specific.
    Only STREAMING is copied in my Photo app on my MacMini
    Also they stay on iCloud (again.. only the STREAMING ones).
    Is it possible to set it this way ?
    EVERY PHOTO/VIDEO I shoot PASSES on iCloud to my Photo folder on MacMini and then is DELETED from iPhone and iCloud?
    Second questionWhere are the photos in Photo? I mean.. is there a folder I can open, copy, archive, etc...? Or is it all compacted in a single file?
    Thanks,
    M

    Well, you said it yourself in the explanation of IMAP
    The first image has the "Archive" folder under iCloud, because that is indeed coming from the IMAP folder from iCloud, as you can see the Archived folder in the 2nd and 3rd screenshot, that folder is just there with the icon. So again, you can see that iCloud IMAP'd folder of Archive appearing.
    The structure is the same across all devices, just named differently. The only difference is "drafts" appears as "outbox" in mac mail when sending messages, or typing them up.
    Those extra folders on your iPhone is local data. You can verify this by going to Settings > iCloud > Account > Advanced/Mail > Mailbox Behaviors. You'll notice "On my iPhone" and "on the server" - things that are under On My iPhone, will not be represented anywhere else but the phone.

  • Flickr:  Is there a reference on how IPhoto and Flickr work w/ each other?

    I have a pro Flickr account that I want to use as a backup for IPhoto (a basic auto-sync).  Do I have to share my events to Flickr?  Is there a way to automate this?  I am at around 65GB of photos, so I want to get this right the first time...
    Thanks!

    Don't use the iPhoto uploader. This is a syncing relationship, so if the photos are deleted from iPhoto the next time you link to Flickr they'll be deleted there too.
    Check out Flickr Export: http://connectedflow.com/flickrexport/
    Regards
    TD

  • How does decode and case works?

    Hi,
    I want to know how decode and case works? How they process the arguements. Please explain me with some examples.
    Thanks,
    Sarav
    Edited by: 943941 on Jul 3, 2012 1:42 AM

    welcome
    check this link
    https://forums.oracle.com/forums/ann.jspa?annID=1535
    you will find everything you need
    DECODE compares expr to each search value one by one. If expr is equal to a search, then Oracle Database returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.
    This example decodes the value warehouse_id. If warehouse_id is 1, then the function returns 'Southlake'; if warehouse_id is 2, then it returns 'San Francisco'; and so forth. If warehouse_id is not 1, 2, 3, or 4, then the function returns 'Non domestic'.
    SELECT product_id,
           DECODE (warehouse_id, 1, 'Southlake',
                                 2, 'San Francisco',
                                 3, 'New Jersey',
                                 4, 'Seattle',
                                    'Non domestic')
           "Location of inventory" FROM inventories
           WHERE product_id < 1775;Edited by: user 007 on Jul 3, 2012 2:40 PM

  • How to configure global transaction wthin Oracle AS JMS and Oracle JMS

    How to configure global transaction if I take a message from Oracle JMS(AQ) and send it to the Oracle JMS?

    Which version of OC4J are you working on?
    In OC4J 10.1.3.x, presume your OC4J JMS listens messages via MDB which uses a resource adapter as a message listener. The resouce adaper could be the generic JMS adapter deployed in OC4J as the default.
    Resource adapter configuration to support MDBs is included in the standard ra.xml file, which lists the message listener types that the resource adapter supports.
    The MDB developer or deployer configures the MDB in the ejb-jar.xml file, through a <message-driven> element.
    In addition to above, configuration in the ejb-jar.xml file specifies whether an MDB uses transactions.
    1) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, and the <trans-attribute> subelement of <container-transaction> (under the <assembly-descriptor> element) has a value of Required. In this circumstance, if there is an imported transaction, then message delivery and related work are performed within that transaction. If there is no imported transaction, OC4J creates a transaction, and message delivery and related work are performed within that transaction.
    2) The <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Bean. In this circumstance, the MDB manages the transaction. If a transaction is imported, OC4J will suspend it before the message delivery method call to the MDB, in order to avoid conflict.
    Message delivery is not transacted if the <transaction-type> subelement of <message-driven> in ejb-jar.xml has a value of Container, but the <trans-attribute> element has a value of NotSupported. If there is an imported transaction in this circumstance, OC4J will suspend the transaction before the message delivery method call to the MDB.
    Details could be found from OC4J Resource Adapter Guide.

  • JMS and advanced Queues - how to dequeue?

    Hi,
    I've recently built a MDB that listens to an Oracle Queue (9.0.4) via JMS . Everything works fine, the only thing is that the rows that have been enqueued are not deleted (dequeued) from the queue table once the MDB has picked them up.
    This only causes a problem when the database re-starts as the MDB picks up all the messages again. And also is a problem as the table will keep growing with all the messages.
    Can you tell me what I should do to dequeue the messages? Should this be a trigger of some sort or is there something I can do from within the bean to dequeue the message once it has been consumed? Or is there another way of handling this?
    Appreciate your help.
    Cheers.

    Hello,
    Great! I need that solution :)
    Can you point out how you connected the MDB to the AQ? What software or adapter did you use?
    I have the vice versa problem.
    The MDB always deletes the message in the queue table, but a rollback never works.
    Did you enable transactions by the following settings in ejb-jar.xml:
    <container-transaction >
    <method >
    <ejb-name>MyMdb</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    I use BEA to deploy the MDB and Dips xa-compliant StartupClass package to register the AQ Connection Factory to in the JNDI tree.
    Regards
    Thomas

  • My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    http://support.apple.com/kb/TS2005
    http://support.apple.com/kb/HT1861
    https://ssl.apple.com/support/proapps/serialnumbers/

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

Maybe you are looking for

  • Creative Audigy 2 NX OLD and undercapable drivers are way below industry standa

    Hello All, I have tried not to push this, for the past year, but I have really reached the end of my patience. The driver support for the Audigy 2 NX (USB-External) sound card is nearly 'non-exsistant'and it is have a major adverse effect on my gamin

  • Printer connected, printer works, but won't print from Mac

    I'm helping someone with a printer problem, and I have a mystery on my hands. The printer is connected (directly), shows up in the printer list, can print a test page, but won't print any document from this computer (it's fine from my laptop). It's a

  • Sharepoint Workspace 2010: Absolute path to workspaces folder

    I am trying to mount the SharePoint Workspace 2010 workspaces folder on another computer so that I can parse the Excel files stored in it for additional processing. But I am unable to find the full file system path to the workspaces folder. Can someo

  • Refinery Manufacturing

    Hi there, I'm working on a project for a downstream company (no upstream production) One of their business units is the refining of crude oil and feedstock into gasoline, asphalt and lube products We got the downstream functions (primary and secondar

  • P2 MXF: Log & Transfer does not react

    Hi people. Log & Transfer no longer works for my P2 MXF folders. When I browse and locate CONTENTS folders, clicking OK results in nothing: the Log&Transfer window remains empty. It all used to be fine, and I have previously imported and used those f