Help using JMS in a network

Hi everybody :
We are working on the development of a distributed application. The architecture of the system is something like this:
- A dispatcher that receives requests (in a string shape) via http post. This unit has to encapsulate this request in a object and fordward such a petition to the correct service according a parameter of the request string.
- A little number of services (4 or 5) that wait for requests delivered by the dispatcher. When a petition arrives, is attended to, and a response is sent to the client, using the http post that the client has used to send us the initial request. The computation complexity could be severe (access to DB, on-demand compilations, multimedia handling...).
The distribution arises when we wanted to place each service on different machines due a heavy amount of requests.
On a first approach, we are considering to use a servlet to manage the requests and JMS as middleware messaging service, as we want to provide an efficient communication layer between the modules of our application.
Here come my doubts:
- Would be the system more efficient if the service-providers are some kind of Enterprise Java Beans? And servlets?
- I have readed the JMS and de JNDI tutorial. I have performed many tests in local mode, and i want now to do the same in a network mode... could somebody orient me? How do could i bind a connection factory with a specific resource across the network? In coding time or in deploying time?
Help will be very very appreciated!!!!!
Thank you very much for reading this message
Greetings from Maria, Spain (europe)

Maria D'Espana,
Not sure if this will help, but I was having a hard time getting the remote samples (SimpleQueueReceiver and SimpleQueueSender) until I figure out a couple of thing.
1st: The orb settings on each computer have to be updated. Edit the ord.properties file under %J2EE_HOME%\config and change the last param to your computer name (in Windows %COMPUTERNAME%).
2nd: The destination (either Queue or Topic) has to exist in both systems. One of the system has to have the factory, created through the admin prompt and the other one has to have a reference to it, just like the tutorial says (j2eeadmin -addJmsFactory QueueName queue -props url=corbaname:iiop:server2:1050#server2.
Hope this helps!
P

Similar Messages

  • Help using JMS in a network/general architecture

    Hi everybody :
    We are working on the development of a distributed application. The architecture of the system is something like this:
    - A dispatcherthat receives requests (in a string shape) via http post. This unit has to encapsulate this request in a object and fordward such a petition to the correct service according a parameter of the request string.
    - A little number of services (4 or 5) that wait for requests delivered by the dispatcher. When a petition arrives, is attended to, and a response is sent to the client, using the http post that the client has used to send us the initial request. The computation complexity could be severe (access to DB, on-demand compilations, multimedia handling...).
    The distribution arises when we wanted to place each service on different machines due a heavy amount of requests.
    On a first approach, we are considering to use a servlet to manage the requests and JMS as middleware messaging service, as we want to provide an efficient communication layer between the modules of our application.
    Here come my doubts:
    - Would be the system more efficient if the service-providers are some kind of Enterprise Java Beans? And servlets?
    - I have readed the JMS and de JNDI tutorial. I have performed many tests in local mode, and i want now to do the same in a network mode... could somebody orient me? How do could i bind a connection factory with a specific resource across the network? In coding time or in deploying time?
    Help will be very very appreciated!!!!!
    Thank you very much for reading this message
    Greetings from Maria, Spain (europe)

    Hello Maria,
    You mention several things regarding architecture. I'll try to iterate them for you. As always this is just one persons idea/opionion.
    Receive Request from HTTP Posts. (Dispatcher)
    -- Sounds like an XML String morphed into an object via servlet. You could standardize on SOAP if it's not too much overhead.
    Services - High computation...
    Let jms receive and queue these requests. A service delegate can spawn threads to deal with the complex computations. I say Queue so you can cap the active thread count and pause the delegators thread creation due to any memory / cpu constraints...
    As far as JMS is concerned I'm unaware of your transactional requirements. In enterprise systems I have written, everything must be transacted and audited. JMS has a nice model for this. You could move to a pub/sub architecture as well.
    Scalability - (Distribution arises) - Each machine can maintain it's own queue and the servlets can distribute to them. Or you can pub/sub them via a dispatcher, it's own machine if desired - and let each machine act as a listener. A nice model as the amount of services grows.
    - Now that I've only reiterated what you've tried..
    Would be the system more efficient if the service-providers are some kind of Enterprise Java Beans? And servlets?
    -In my opionion for the high volume HTTP requests, servlets can lift the load.
    -You system has a high level of requests and load on your CPU. I'll also assume that transactions and auditing are required. As I'm sure you well know EJB is not the fastest animal in the forest. I would not use Message Driven Beans as you will have a hard time tunning performance within an EJB Container.
    - Now after I've said all that any fallout and persistance requrements from each service can leverage EJB's. Just remember that EJB's lend themselves well to web/commerce apps. I have no idea of your applications context so I'm taking a stab. There are wonderful tools in the EJB architecture, however, just because you've chosen Java doesn't mean you have to use EJB's. If speed in an issue for these services ( persisted or session level ) perhaps a mix is what your desire. ( I find session beans to be much better accessors than there sluggish entity brothers. )
    JNDI - Create a Service Locator that abstract the lookups for your services. Depending on how far you want to go. Our Service Locator can look up a multitude of contexts. Be it Weblogic/Websphere or a file system. There is no magic to it you just have to plug and play the contexts.
    "I have readed the JMS and de JNDI tutorial. I have performed many tests in local mode, and i want now to do the same in a network mode... could somebody orient me? How do could i bind a connection factory with a specific resource across the network? In coding time or in deploying time?"
    --I would take the performance hit on late binding and use caching to try and gain some back.  Below is a small example...
    -- All in all, It would help you to become more familiar with the EJB spec if your planning on that path. You soon come to notice it's features ( and particular quirks ).
    Good Luck,
    Hope this helps
    private String serverInstance;
    private String serverPort;
    /** Creates new ServiceLocator */
    protected ServiceLocator(String host, String port) {
    this.serverInstance = host;
    this.serverPort = port;
    public String getServerPort() {
    return this.serverPort;
    public String getServerInstance() {
    return this.serverInstance;
    private javax.naming.Context getInitialContext() throws javax.naming.NamingException {
    javax.naming.Context ctx = null;
    java.util.Properties prop = new java.util.Properties();
    prop.put("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");
    prop.put("java.naming.provider.url", "rmi://"+serverInstance+":"+serverPort+"");
    prop.put("java.naming.factory.url.pkgs", "org.objectweb.jonas.naming");
    ctx = new javax.naming.InitialContext(prop);
    return ctx;
    public Object getContainerService(String jndiName) throws javax.naming.NamingException {
    javax.naming.Context ctx = getInitialContext();
    java.lang.Object obj = ctx.lookup(jndiName);
    return obj;
    public static ServiceLocator getInstance(String host, String port) {       
    return new ServiceLocator(host, port);

  • Need help: Using JMS to callback a client.

    Hi everyone,
    I'm having a very frustrating problem. I'm just started to use JMS to overcome callback
    problem with EJBs. I simply want my EJB to send something (pub/sub) to my client so it
    can update some display. I first instantiate my Client and TopicConnection etc. etc. then
    create the EJB, invoke it and the EJB sends some TextMessage back. However, the TextMessage
    never seems to arrive at my Client. The TextListener never seems to deliver.
    Here's the snippet:
    EJB:
    private void createPublisher() {
    try {
    Context ctx = new InitialContext();
    System.out.println("Server looking up JMS Service");
    TopicConnectionFactory conFtry = (TopicConnectionFactory) ctx.lookup("java:com
    p/env/jms/MobiDTopicConnectionFactory");
    topic = (Topic) ctx.lookup("java:comp/env/jms/TopicName");
    con = conFtry.createTopicConnection();
    session = con.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    publisher = session.createPublisher(topic);
    TextMessage mesg = session.createTextMessage();
    System.out.println("Server is sending message, see anything?");
    mesg.setText("This is from publisher");
    publisher.publish(mesg);
    // Exception catching stuff snipped.
    public void ejbCreate() { createPublisher(); }
    Client:
    public void createSubscriber() {
    try {
    Context ctx = new InitialContext();
    TopicConnectionFactory conFtry = (TopicConnectionFactory) ctx.lookup("java:com
    p/env/jms/MobiDTopicConnectionFactory");
    Topic topic = (Topic) ctx.lookup("java:comp/env/jms/TopicName");
    con = conFtry.createTopicConnection();
    session = con.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    subscriber = session.createSubscriber(topic);
    subscriber.setMessageListener(new TextListener());
    con.start();
    System.out.println("Connection started");
    // Exception stuff snipped.
    public static void main(String args[]) {
    try {
    ConverterClient cc = new ConverterClient();
    cc.createSubscriber();
    System.out.println("Subscriber is ready");
    Context initial = new InitialContext();
    System.out.println("Looking up the bean...");
    Object ref = initial.lookup("java:comp/env/ejb/SimpleConverter");
    System.out.println("Getting the home interface");
    ConverterHome home = (ConverterHome) PortableRemoteObject.narrow(ref,
    ConverterHome.class);
    Converter conv = home.create();
    double amount = conv.dollarToYen(100.00);
    InputStreamReader inputStreamReader = new InputStreamReader(System.in);
    char answer = '\0';
    while (!((answer == 'q') || (answer == 'Q'))) {
    try {
    answer = (char) inputStreamReader.read();
    } catch (IOException e) {
    System.out.println("I/O exception: "
    + e.toString());
    Can anyone spot what's wrong with the code? I've been trying to get this to work for the
    past two days but to no avail. Please help...
    Thank you in advance.
    -vincent

    Hi, thanks for all your reply.
    The TextListener is the one downloaded from this website in the
    tutorial but I used it in different program. Here's the TextListener:
    public void onMessage(Message message) {
    System.out.println("Receiving message in onMessage()");
    TextMessage msg = null;
    try {
    if (message instanceof TextMessage) {
    msg = (TextMessage) message;
    System.out.println("Reading message: " +
    msg.getText());
    } else {
    System.out.println("Message of wrong type: " +
    message.getClass().getName());
    } catch (JMSException e) {
    System.out.println("JMSException in onMessage(): " +
    e.toString());
    } catch (Throwable t) {
    System.out.println("Exception in onMessage():" +
    t.getMessage());
    Strangely, this does not work as it never print the message. Can't see what's
    wrong from a glance though and I'm not getting any error message whatsoever.
    However, I tried my own listener:
    static class MyListener implements MessageListener {
    public MyListener() { }
    public void onMessage(Message msg) {
    try {
    System.out.println("Message received: " + ((TextMessage) msg).getText())
    catch(JMSException ex) { ex.printStackTrace(); }
    And this works...I just don't get it. MyListener is a static because I used it in my main().
    Anyone can give any comment?
    thanks,
    -vincent

  • Help using torrent client + local network fileserver[SOLVED]

    as the title says i need some help in order to make it possible for either azureus or deluge to be able to see my local network's fileserver as unfortunately neither of the both can "see" the network (arch can see if ofc and i can browse the contents)
    The fileserver is specifically FreeNAS with CIFS/SAMBA,
    The hard disks are in UFS format (need em from time to time when i log into windows xp -rarely)
    I was thinking of a way to mount the fileserver but i cant do it
    Can someone give me an example of how to be able to mount it ? as as many tries i ve made to tamper with fstab in general didn't return any results (using ntfs-3g in order to mount windows partitions/linux partitions)
    Thanks in advance
    Last edited by jedimastermaniac (2008-06-28 15:58:47)

    so something like this should work ?
    //Server IP  or hostname/ share??  i can understand the rest but that's i would like to understand
    would for example... this work
    //200.150.0.0/fileserverpath to hard disks) /mountpoint blah blah work?
    this is the point where i need help basically. the first part

  • I cant install or uninstall my itunes. I get this error 'the feature you are trying to use is on a network resource that is unavilable' Now ive seen the solutions on here but im using windows 8.1. Ive tried all options so please can someone help?

    I cant install or uninstall my itunes. I get this error 'the feature you are trying to use is on a network resource that is unavilable' Now ive seen the solutions on here but im using windows 8.1 and none of them work for me. Ive tried all options so please can someone help?

    That doesnt work for me. I removed itunes through the windows cleaner method as shown in other posts and re-installed itunes. Now im getting this error
    iTunes was not installed correctly. Please reinstall iTunes
    Error 7 (Windows error 126)
    Also my Microsoft office has stopped working after i deleted Itunes which is really strange.
    Can somebody provide me a solution please....

  • Help !!  I am trying to uninstall and then reinstall itunes but when I try to remove itunes it I get error message ~ the feature you are trying to use is on a network resource that is unavailable?????  Any help would be great:) !!

    Help !!  I'm trying to un install and then re-install itunes.  I get erroe message ~ the feature you are trying to use is on a network resource that is unavailable????  Any help would be great!   TXs!

    See if this previous discussion will help.  It is markd as solved:
    I am trying to uninstall itunes as it will not open error 7 (windows 126) so that I can reinstall but keep getting the message.. The feature you are trying to remove is on a network resource that is unavailable itunes.msi... Any suggestions anyone
    It was the one with the green checkmark on the right side of this page.

  • I am trying to uninstall an earlier version of itunes and get the following error, "the feature you are trying to use is on a network resource that is unavailable" can anyone help

    Hi I am trying to uninstall a previous version of itunes or download a newer version and I get the following error message "The feature you are trying to use is on a network resource that is unavailable" can anyone help please?

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page).
    http://majorgeeks.com/download.php?det=4459
    Here's a screenshot showing the particular links on the page that you should be clicking:
    After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
    Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
    When the dialog appears, choose to save the file.
    (2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I am trying to uninstall itunes and keep getting a reject that reads "the feature you are trying to use is on a network resource that is unavailable."  Its windows...help!

    I am trying to uninstall itunes and keep getting an error that reads "the feature you are trying to use is on a network resource that is unavailable."  Itunes on windows.  Help!

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • When i try to update itunes and quicktime, it stops me and says " The feature you are trying to use is on a network resource that is unavailable" please help.

    when i try to update itunes and quicktime, it stops me and says " The feature you are trying to use is on a network resource that is unavailable" please help.

    Before trying the update again, use Microsoft's Fix it solution at http://support.microsoft.com/mats/Program_Install_and_Uninstall. Use it to uninstall iTunes and Quicktime. It bypasses this not uncommon problem. When the solution finishes, the selected program will be uninstalled. It can take several minutes and I have seen as much as half an hour.
    After iTunes & Quicktime are uninstalled, try the update again.

  • When i try to download the newest version of itunes it says "the feature you are trying to use is on a network resource that is unavailable" and then it gives me an alternate path to a folder containing the installation package for itunes64.mis, help

    when i try to download the newest version of itunes it says "the feature you are trying to use is on a network resource that is unavailable" and then it gives me an alternate path to a folder containing the installation package for itunes64.mis, help

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • How to delete old version of itunes and install the latest? When I update an error message pop-up.  "the feature you are trying to use is on a network resource that is unavailable".  Plese help!

    How to delete older version of itunes and installed the new version? When I try to install the new version (update) a message popup.  " The feature you are trying to use is on a network resourse that is unavailable".  Please can someone help? Thanks!

    Which particular .msi file is the message going on to say can't be found? (Several different msi files can be mentioned in this context: itunes.msi, bonjour.msi, AppleSoftwareUpdate.msi, etc.)

  • Help needed in using Facetime over cellular network on Ipad2 3G IOS6

    i updated my Ipad2 3G to IOS6, as they mentioned that i will be able to use facetime over cellular network,
    however everytime i try it over the network, it says i must connect through Wifi. any help!!

    Facetime over 3G is currently only available on the iPad 3, not the iPad 2 - from http://www.apple.com/ios/whats-new/ :
    3. FaceTime video calling requires a FaceTime-enabled device for the caller and recipient and a Wi-Fi connection. FaceTime over a cellular network requires iPhone 4S, iPhone 5, or iPad (3rd generation) with cellular data capability.

  • I can't update my itunes it stops halfway and says the feature you are trying to use is on a network resource that is unavailable! Help!

    I've been trying to update my itunes for AGES now and it just won't seem to do it! Everytime it get's halfway and say the feature you are trying to use is on a network resource that is unavailable. If someone could help me I would really appreciate it.

    Which particular .msi file does the message go on to say can't be found, elle? (Several different .msis could be mentioned in the context: iTunes.msi, Bonjour.msi, AppleSoftwareUpdate.msi, etc.)

  • HELP using Microsoft Windows Network on a BT home ...

    Hi,
    I use to have my own network where we all in the house could share drives, files and printers across the network using the Microsoft windows network using a Netgear router. This was so much easier to setup and use. Now that I have the black BT home hub 2.0 that whole facility has gone. I've gone into the BT home hub and turned off the firewall but still no luck. If I had previous mapped drives and printers, they still work but I can't add any new ones.
    Can someone please tell me how to set up the hub to be able to share drives and printers across the network?
    Thank you.

    you should not need to make any changes to the hub to enable you to share drives/files/printer across your home network.  you may need to go into the sharing centre of each pc/laptop and set up sharing again
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Cuando quiero dar setup,  aparece: The feature you are trying to use is on a network that is unavailable, y: The older version of itunes cannot  be removed. Help!

    Yo des intale itunes en mi laptop. Tiempo despues instale el ultimo itunes alli mismo. Cuando quiero darle el setup,  aparece: The feature you are trying to use is on a network that is unavailable, y: The older version of itunes cannot  be removed. Help!
    The feature you are trying to use is on a network resource that is unavailable
    I give it ok, I get same msg.
    I give it cancel, then: The older version of ITunes cannot be removed. Please contact your tech support group.                 
    Please help I need this ..

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • Importing imovie08 project to imovieHD

    Hi does anyone know how to import an imovie 08 project into imovieHD? I copied my 08 project on to a jump drive but when I put in onto my laptop (which has imovie HD) and try to import it, it shows a folder with a bunch of exe files. Thanks in advanc

  • Need help fixing errors that keep filling up the logs in console

    ***I keep getting error's that are slowing down my imac plz help i know nothing about mac's there all showing up in the conso*l*e** 4/6/09 6:31:13 PM /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[22] Error Login Window Appli

  • How to change the column header name dynamically based on sysdate

    Post Author: senthi_gokul CA Forum: WebIntelligence Reporting Dear All,         i have designed some reports. i would like to change the column header dynamically based on sysdate. up to 24 months. can u help me, which add month function using the un

  • How to map Vending Machine Operations within SAP

    How to oprerate/run Vending Machine operations within SAP. Does SAP has this functionality to manage Vending Machine based business processes, operations and logistics.

  • Password expiration notification workflow

    I need to create a workflow which will send emails to users who's password is about to expire. For reasons I don't want to get into here, I don't want to use a defered task. I know there's got to be a way of grabbing a list of users along the lines o