How to use remote JMS in websphere5?

I want to use JMS in another server to send message so that I config required jndi in server. When I lookup local JMS jndi(connection factory, queue) it works correctly. But when I lookup remote connectionfactory, it throws 'javax.naming.CommunicationException'. BTW, local configuration is same as JMS server. And I use WSAD 5.1.1 to develop it.
The first question is if I need use JMS server on another server, I should lookup remote queue and JMS connection factory on that server, right?
The second question : If yes, how to obtain remote JMS connection factory? I use WSAD 5.1.1 trail, I don't know is it possible to obtain remote jndi.
The third question : do I need change any configuration for supporting remote JMS client instead of local(same compute, different jvm) environment?
The following is my client code to obtain remote queue:
public class Test {
     public static void main(String[] args) {
          Properties env = new Properties();
          env.put(Context.INITIAL_CONTEXT_FACTORY,
                "com.ibm.websphere.naming.WsnInitialContextFactory");
          env.put(Context.PROVIDER_URL, "corbaloc:iiop:10.240.4.203:2809");
          try {
               Context initialContext = new InitialContext(env);
               Object obj = initialContext.lookup("jms/IPharmQueue1");
          } catch (NamingException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
}It works ok when ip is localhost. But it can obtain remote queue or connectionfactory. I tried to lookup other EJB, it also failed.

Actually, I have application in one server and four same server as cluster. But only one server provides JMS service. So my application need to use remote JMS server instead of local server. But in my development environment I can not simulate cluster environment as customer environment. So I try to let my application access remote JMS server in different computer. When two server start up I found my application will get local JMS connection factory and queue instead of remote factory. Even I put IP of another computer in PROVIDER_URL.
I did a application client to test it. The code is above. But it can not lookup remote jndi.
I use WAS5 as server and WSAD 5.1.1 as development IDE.
Is any idea about it?

Similar Messages

  • How to use remote JMS in websphere6?

    Hi,
    I have 2 different systems on which i have installed WebSpher application server v6.0.2.11. On one system, i have deployed the MDB and done the setup required for JMSConnectionFactory as well as JMS Queue.
    Now i want to post the message to these queue from another system. I have tried using JNDI which i have given to ConnectionFactory as well as to Queue but not able to connect.
    Can you please let me the setup required for accessing JMS Queue from another application server?
    Regards,
    Sandip Desale
    Following is the error message which i have received...
    [4/17/07 9:52:55:219 IST] 00000039 ConnectorRunt W J2CA0112E: Factory or provider name for jms/TheConnectionFactory1 was null. The ObjectNames factory :<null> provider :<null> cannot be used by PMI to link the PMI statistics with the MBeans.
    [4/17/07 9:52:58:547 IST] 00000039 FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jms/TheConnectionFactory1, throwing ResourceAllocationException. Original exception: javax.resource.ResourceException: CWSJR1028E: An internal error has occurred. The exception com.ibm.websphere.sib.exception.SIResourceException: CWSIT0019E: No suitable messaging engine is available in bus TheBus was received in method createManagedConnection.
    ------------------------------------------------------------------------------------------------------

    Actually, I have application in one server and four same server as cluster. But only one server provides JMS service. So my application need to use remote JMS server instead of local server. But in my development environment I can not simulate cluster environment as customer environment. So I try to let my application access remote JMS server in different computer. When two server start up I found my application will get local JMS connection factory and queue instead of remote factory. Even I put IP of another computer in PROVIDER_URL.
    I did a application client to test it. The code is above. But it can not lookup remote jndi.
    I use WAS5 as server and WSAD 5.1.1 as development IDE.
    Is any idea about it?

  • How to use remote desktop client in mountain lion

    How to use remote desktop client in mountain lion.
    I want to connect my other system(ubuntu) using mac remote desktop client, But i could not locate remote desktop client in moutain lion.

    In Ubuntu 12.xx use Dash to find "Desktop Sharing" and set the preferences, including requiring a password.
    Then in Ubu use System Settings > Network to determine your Ubu machine's IP address, such as 192.168.1.13.
    On the Mountain Lion Mac do Finder > Go > Connect to Server   and enter:  vnc://192.168.1.13  or whatever your IP is.  Enter the password that you used in the Ubu Desktop Sharing setup, when asked.
    On the Ubu machine answer the question that pops up asking for permission to connect.  Your Ubu screen will now show up on the Mac, and you can remote control it.   Here I am running "Octave" (a math program) on the Ubu machine, remotely.
    Works great!  BTW, you can do this from an iPad too, using a VNC client such as Mocha VNC Lite.  You can even run both remotes simultaneously.
    Good luck.

  • How to use Remote key for linking two repository

    Hi,
    I have a challenge like not to repeate common tables like Company_code,Currency,Vendor name,customer name across all repositories.
    Is there any way I can use 'Remote key' to link different repository.
    I can create a Main table with all common attributes required across the repository but want to know how I can connect it to different repository.
    For example to get company-code in Vendor table , how can I link Company-code main table(customized) in another repository may be thru 'Remote key'.
    Going thru java api route is not prefffered for the sake of simple solution.
    Appreciate your help in providing any idea and detail steps for the process.
    -regards, Reo

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • How to use Remote Debugging in JDeveloper 3.1 ?

    I am trying to use the Remote Debugging option with EJBs in JDeveloper 3.1 with Oracle8i 8.1.6.
    I checking all steps the online walkthrough for Remote Debugging EJB in 8i and it didn't work.
    I'm using Oracle8i EJB/CORBA debug option in project properties, but it does not stop in my EJB's break points.
    I tried deploying the EJB again ( with break points) and again it didn't work.
    The error message I got in the trace file is:
    Errors in file D:\Oracle\admin\SCT\udump\sctS000.TRC:
    ORA-29516: Aurora assertion failure: Java thread deadlock detected
    Could someone please tell me how to use it?
    null

    Which platform is the database running on ??
    Other things you should check -
    when debugging the EJB, JDev
    3.1 looks through your IIOP connections to find the one to use.
    Make sure that the IIOP connection that JDev is using for the debugging matches the IIOP connection that the EJB client application is using.
    raghu
    null

  • FMS 3.5 - How to use remoting Server Side

    I am very interested in using Remoting in order to connect to a Drupal AMFPHP service module.  On the client side this is easily done and I have had limited success on the Server side, but a good guide on how to do this properly and be able to get the data being returned would be great.
    Thanks,
    Chris
    ChrisMcIntoshDesigns.com

    I don't know if Drupal's AMFPHP implementation is any different than a straight install of AMFPHP, but this article should help to get you started:
    http://www.sephiroth.it/tutorials/flashPHP/flashcomm_AMFPHP/index.php

  • How can a remote jms receiver detect loss of connection to Messaging server

    Plan:
    Messaging server (like JbossMQ /SonicMQ) is hosted on one machine.
    A JMS receiver (MDB/core java program) on another machine receives messages from the messaging server.
    Secnario:
    The JMS receiver is now continuously listening or occasionally reading messages from a certain queue of the server using a JMS connection.
    Now the messaging server has this receiver in its list of receivers for that particular queue.
    For some reason the messaging server is down and then restarted.
    The JMS connection of the receiver is now invalid.
    When the messaging servers comes up again its list of receivers is empty.
    Required Solution:
    Can you please help me on how the JMS receiver can detect the above scenario and re-establish the connetion to the messaging server, the next time the server is up.
    Observations:
    When I create a message consumer or queue receiver in a j2se program, and take messages from JbossMQ I have some additional threads running on my JVM. These threads are not directly created by the program and servers only for receiving messages. One of these threads is catching an exception and printing a stack trace when it detects that the connection is lost. This will also result in the closing of JMS connection. The problem is that the exception is not thrown for the programmer to catch and handle it at some level. I also tried ExceptionListener and waited for ping interval. Is there a concept of receiver listening to the periodic heart beat of the server. Please give me guidance, solutions or corrections.
    For comments on this, Thanks in advance

    Hi Leendert,
    do you want to use the JMS API directly? In this case you have to create the connection factory on system X. From system Y, you access the JNDI on system X and look up the connection factory. Since you are accessing the JNDI on system X from outside, you need to set some properties to create the InitialContext:
        Properties env = new Properties();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
        env.put(Context.PROVIDER_URL, <system X>:<p4 port>); // replace with your settings
        env.put(Context.SECURITY_PRINCIPAL, <user name>); // replace with your settings
        env.put(Context.SECURITY_CREDENTIALS, <password>); // replace with your settings
        naming = new InitialContext(env);
    Hope that helps.
    Regards,
    Sabine

  • How to use remote directory for external table

    Hi Folks,
    I have 2 Oracle 11GR2 64 bit database installed on Win 2008 server as prod1 and prod2.
    I have one directory created on prod1 server as EXT_TAB_DIR using the path as D:\OrsDWtest_dir .
    I want to use this directory in Prod2 server and use external table using this remote directory.
    I am able to access the Prod1 directory from Prod2 machine and also i have created Network map drive as Z drive pointing to that prod1 D:\OrsDWtest_dir directory. Also i checked read and Write permissions are there . I am able to create the external table but when i try to fetch the data i m getting below error ..
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file IOMM_20121213_060736.csv in EXT_TAB_DIR not found
    now my doubt is this possible ? Can we use remote directory for External table ? or is there is there any alternative way to achieve same ?
    Thanks & Regards,
    Vikash Jain(DBA)

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • How to use Remoting on web & CD-ROM?

    Would like to use Remoting for delivering multilingual text
    via the web, but client also wants a CD-ROM version of it. What be
    best approach to achive both approaches with miniamal recoding, is
    XML the way to go?

    You don't.  JS files can exist in three places.
    1.  In the PDF file
    2.  In the User Profile
    3.  In the Application folders
    * Note while you can execute some browser based JS to the embedded viewer in a web browser all of the API calls are non-editing.

  • How to use Remote listeners

    I've been using RMI a lot recently and have found a pretty slick way to deal with listeners via Remote calls and I figured I would share this information with everyone as it might help someone or someone may have a better idea how to do this.
    Anyway, lets say you have a single server and multiple clients and those clients need to be notified whenever a certain event occurs. A simple chat server is a good example, whenever a new String message comes into the chat server, it needs to disseminate that String to all of its clients. To do this two Remote interfaces are needed, the first is the server and the second is for the clients remote listener.
    public interface IChatServer extends java.rmi.Remote {
        // Called by a client on the server when it wants to generate a new message
        public void sendMessage(String message) throws java.rmi.RemoteException;
        // Called by a client to add a new IChatServerListener to the server
        public void addChatServerListener(IChatServerListener listener) throws java.rmi.RemoteException;
        // Called by a client to remove a IChatServerListener from the server
        public void removeChatServerListener(IChatServerListener listener) throws java.rmi.RemoteException;
    public interface IChatServerListener extends java.rmi.Remote {
        // Called by the server whenever a new message is generated.
        public void newMessage(String message) throws java.rmi.RemoteException;
    }Ok, that sets up your two Remote interfaces, pretty simple. The next step is to implement the ChatServer object.
    public class ChatServer implements IChatServer {
        private Registry m_reg;
        private java.util.Vector m_listeners;
        public static final int REG_PORT = 4000;
        public static final String SERVER_NAME = "ChatServer";
        public ChatServer() {
            // This is where we will store all of the IChatServerListener objects
            m_listeners = new java.util.Vector();
        // Exports the server object, creates the RMI Registry and then binds the server into that Registry
        private void startServer() throws java.rmi.RemoteException {
            java.rmi.server.UnicastRemoteObject.exportObject(this);
            m_reg = java.rmi.registry.LocateRegistry.createRegistry(REG_PORT);
            m_reg.rebind(SERVER_NAME, this);
        public static void main(String[] args) {
            try {
                new ChatServer().startServer();
            // startServer() throws a RemoteException if something goes wrong so we need to deal with that
            catch(java.rmi.RemoteException re) {
                System.out.println("Failed to start server.");
                re.printStackTrace();
        // Implementation of the sendMessage(String) method from the IChatServer interface
        public void sendMessage(String message) {
            // Call our helper method that actually calls newMessage() on each of the listeners
            fireNewMessage(message);
        // Implementation of the addChatServerListener() method from the IChatServer interface
        public void addChatServerListener(IChatServerListener listener) {
            // Simply add the new listener to our Vector of listeners
            m_listeners.add(listener);
        // Implementation of the removeChatServerListener() method from the IChatServer interface
        public void removeChatServerListener(IChatServerListener listener) {
            // Simply remove the new listener to our Vector of listeners
            m_listeners.remove(listener);
        // Iterate over the Vector of listeners calling newMessage() on each one
        private void fireNewMessage(String message) {
            java.util.Iterator iter = m_listeners.iterator();
            while(iter.hasNext()) {
                IChatServerListener listener = (IChatServerListener)iter.next();
                try {
                    listener.newMessage(message);
                catch(java.rmi.ConnectException ce) {
                    System.out.println("Unable to Connect to Listener, removing it.");
                    iter.remove();
                catch(java.rmi.RemoteException re) {
                    re.printStackTrace();
    }Ok, most of that class is pretty straighforward, the only real complex stuff is in the startServer() method where the RMI Registry is created, and in the fireNewMessage() method. First an Iterator is generated from the Vector storing the IChatServerListener objects. Then we go into a while loop and pull out the next available IChatServerListener and try to call newMessage() on it. Note that this is a Remote call as it is calling the newMessage() method that is implemented within the clients so we must catch java.rmi.RemoteException. An explicit catch for java.rmi.ConnectException is used because it is not uncommon for clients to exit inappropriately or die unexpectedly. If this happens then we need to remove the IChatServerListener from our Vector so we dont get an exception every time a new message is generated. Note that you must use iter.remove() to remove the object while using an Iterator.
    Ok, now for the ChatClient class.
    public class ChatClient {
        private IChatServer m_chatServer;
        private IChatServerListener m_chatServerListener;
        public ChatClient() {
            m_chatServerListener = new IChatServerListener() {
                public void newMessage(String message) {
                    System.out.println("New message: " + message);
        private void connectToChatServer() throws java.rmi.RemoteException, javax.naming.NamingException {
            String connectString = new String("rmi://localhost:" + ChatServer.REG_PORT + "/");
            System.out.println("Attempting to connect to Chat Server on: " + connectString);
            InitialContext ic = new InitialContext();
            NamingEnumeration bindings = ic.listBindings(connectString);
            while (bindings.hasMore()) {
                Binding bd = (Binding)bindings.next();
                if(bd.getObject() instanceof IChatServer) {
                    m_chatServer = (IChatServer)bd.getObject();
            if(m_chatServer != null) {
                m_chatServer.addChatServerListener(m_chatServerListener);
                m_chatServer.sendMessage("HELLO!");
        public static void main(String[] args) {
            try {
                new ChatClient().connectToChatServer();
            catch(Exception e) {
                System.out.println("Failed to connect to Chat Server.");
                e.printStackTrace();
    }Ok, now two things are going on here. First, in the ChatClient constructor a new anonymous instance of IChatServerListener is created. It implements the single method newMessage() and simply does a System.out.println() to print out the incoming message. This is the actual object that is actually sent to the ChatServer (well, more appropriately, it's _Stub class is what's sent) and as such the newMessage() method will be called whenever the server receives a call to sendMessage().
    The real meat of this class comes in the connectToChatServer() method. The first thing the client must do is lookup the IChatServer instance in an RMI Registry somewhere. In this example I just use localhost for a ChatServer running on the same machine, but that is easy enough to change. A new InitialContext object is created to facilitate JNDI calls, then a list of all the bindings is retrieved. A binding is a String, Object pair where the String is the name the Object was bound under and the Object is a Remote Stub class.  In this case we are looking for an instance of IChatServer so as we are iterating over the list of bindings we check each bound object as an instanceof IChatServer and when one is found we assign it to our mchatServer member variable. Once a reference to the ChatServer has been obtained we must add our listener to it and then we send a message to all clients "HELLO!" which because it was called after we added our own listener we should receive that very same message.
    I know some of this can seem a bit complex and daunting, but it's very doable once you break it down piece by piece. If you have any problems or questions feel free to ask them here and I'll do my best to respond.

    I genuinely respect anyone who posts code to help others, so please do not interpret my responses as criticism, rather some things to think about; advice from an old-timer, if you will.
    Your current approach will get into trouble very easily. However with a little thought, it is fixable.
    In the online gaming vernacular, there is an attrocious misnomer, which unfortunately stuck, so I will use it here:
    - How can your design accomodate varying 'ping' times?
    For example, let's suppose a client connects to your chat server by dial-up, and yes these accounts still exist, those machines can be several orders of magnitude slower than your other clients. Your whole system will only go as fast as its slowest member. This was a big problem in early online games, so you are in very good company.
    - Calling a dead client will take several minutes or more!
    This is because a Sun's RMI implementation cannot easily distinguish between a disconnected client vs. a very slow one. Again, each one will delay your chat relays.
    Overall you have a very good initial design. If you think these issues through, and post your code here, I think you'll get some excellent help. Best of all, as you must have been thinking when you made this post, everyone reading along will also benefit.
    Highest regards!
    John

  • How to use Remote Desktop Service in Windows Azure

    Good day
    Hi! im kinda newbie when it comes to windows azure, I would like to ask if how can we use the RDS CAL in windows azure?

    Hi,
    Please visit the URL below for detailed instructions on using/configuring RDS CAL.
    http://blogs.technet.com/b/keithmayer/archive/2013/09/04/step-by-step-remote-desktop-services-on-windows-azure-a-cost-effective-alternative-to-desktop-as-a-service-part-2.aspx
    Regards

  • How to use remote managed bean and JPA in JSF

    Hi All,
    I am familiar with referencing backing-beans and JPA properties where Glassfish and MySQL is running locally. However, is it possible to lookup these same properties using JNDI if they reside on remote servers? If so, what change is needed?
    I would like to distribute the J2EE 5 application load including database by running Glassfish, MySQL on separate servers. This will put on the JSF (presentation-tier) components on it's own server while a secondary system will handle the middle tier processing and leaving the database activities to be carried out on another server. Not sure whether this is the right approach though. These hardware would run on both Solaris and Windows platforms.
    Unfortunately, buying faster hardware is not an option.
    Any assistance would be appreciated,
    Jack

    Hi Faissal,
    Is your suggestion below:
    //Lookup an EJB and use it
       YourRemoteBean bean = (YourRemoteBean ) ServiceLocator.findRemoteObject(jndiName); // ServiceLocator is a class that lookup
                                                                                                                                           //  the remote objectis equivalent to the following lines:
    Properties props = new Properties();
        props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
                props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
                props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
                // optional.  Defaults to localhost.  Only needed if web server is running
                // on a different host than the appserver   
                // props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
                props.setProperty("org.omg.CORBA.ORBInitialHost", "remoteServer");
                // optional.  Defaults to 3700.  Only needed if target orb port is not 3700.
                // props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
                InitialContext jndiContext = new InitialContext(props);     
                InitialContext jndiContext = new InitialContext();
                YourRemoteBean bean =  (YourRemoteBean) jndiContext.lookup("ejb.YourRemoteBean");Thanks,
    Jack

  • Mac without CD reader: How to use remote Mac to transfer music to my library?

    My mac does not have a CD reader, but my husband's mac does. How can I use his computer to process our music CDs and get them into my music library?

    LRicci wrote:
    Thanks for the attempt, but this is fruitless.... 
    There must be a better way.
    Have you actually tried any of my suggestions?
    I am really not following your comments.  AAC files can definitely be retained.  What were these files your AAC files needed that you had to buy from Apple???
    You could create a dozen differnt libraries on your husband's computer if you need to.  Make a temporary one to rip your CDs, then delete it afterward.  You make it by holding down the option key while starting iTunes.  He switches back to his by doing the same.  iTunes presents you with options to create a new library or select a different one.
    I know next to nothing about AppleTV and that wasn't part of your original question.  My suggestion for Home Sharing is it is a way to transfer music files from computer to computer without using a flash drive.  If you have more files than will fit on a flash drive (or no flash drive) it is handy.

  • How to Use Remote Printer's FAX and Scanner on Win 7

    HP LaserJet 3050 hosted by an XP computer. I've been able to install it for printing from a Win 7 machine but I can't find a way to install its fax or scanner functions. I tried using the printer driver to print to the fax and it corrupted the XP's spool program requiring an entire C:\ drive restore from backup!
    I have the HP 64 bit driver for the printer, and I can see in the list of .inf files one that seems to be for fax, but I can't make it install.

    Hello colinobj,
    I have looked at the link that you have provided that gives the steps to resolve the installation issue. 
    Just so you are aware, this is the solution to the issue at hand.  Seeing that XP is on its way of being not supported, this is the best solution that Bob_Headrick has provided.
    Thank you.
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • How to use external JMS server.

    Hi,
    I am working with JMS adapter. we have installed BPEL 10.1.3 .1 in one system and in another system we have installed Oracle Application server. Please provide the configuration steps to connect to this external JMS server.

    Hi,
    take a look at
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_jms.htm#BABJCCHI
    You have to specify ormi://remotehost.domain.com:23795

Maybe you are looking for

  • Store a document as AchivLink

    Hi all, i have uploaded a Document via WD , all i have are a filename , mimetype and the document-content, i want to store it in SAP Conetent repository, but not hard coded, i dont know how to get the SAP_OBJECT and AR_OBJECT ( NOT HARD CODED). if so

  • Bootcamp Anti Virus Software

    Hi - I've searched to find some info on which Anti Virus to get for use with XP using Bootcamp. My first MAC should arrive in the next few days I know now not to install Norton and also what "free" program to use on the MAC side. I'm sorry if I've po

  • Debugging mode stopped automatically when using xml file load

    Dear Sir, I am trying to develop a new add-on using xml files for creating new forms. In fact I was using the sample code delivered with the SDK ( WorkingWithXml - under VB.NET). The Problem is that when I am in the debuging mode and after the form l

  • Bulk courses and students via api

    Hi all, We are using Adobe Connect Pro v 7 at our organization. We have courses that registered users can watch, and connect tracks whether they watched it or not. Simple enough. Then we have a web site that uses the api to generate reports on usage.

  • Help! My PSE8 Editor will not work!

    When I try to open it, the editor will not load and I get an error message when I attempt to open a previously saved document I did in photoshop. the message says that the editor will not work. I already tried the ctrl+alt+shift keys at startup.