In your jms.xml you need to explicitly set the host IP, so you will have
something like:
<jms-server host="192.168.1.100" port="9127>
... whatever
</jms-server>

Otherwise the factory will return the default IP (localhost) as the location
of the factory.

jason


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> LuTai-Hsin (E-mail)
> Sent: Tuesday, February 13, 2001 5:46 AM
> To: Orion-Interest
> Subject: cannot connect JMS server on other machine
>
>
>
> I am trying to access a orion server on other machine.
> While I think supplied the correct information, the
> QueueConnections seems to still connecting on localhost.
> Here is my code:
>       Hashtable htEnv = new Hashtable();
>       htEnv.put("java.naming.factory.initial",
> "com.evermind.server.ApplicationClientInitialContextFactory");
>       htEnv.put("java.naming.provider.url", "ormi://192.168.0.4");
>       htEnv.put("java.naming.security.principal", "admin");
>       htEnv.put("java.naming.security.credentials", "1234");
>       InitialContext objContext = new InitialContext(htEnv);
>       QueueConnectionFactory objFactory =
> (QueueConnectionFactory)objContext.lookup("java:comp/env/jms/theQu
> eueConnectionFactory");
>       QueueConnection objConnection = objFactory.createQueueConnection();
>       Queue objQueue =
> (Queue)objContext.lookup("java:comp/env/jms/" + strQueueName);
>       objConnection.start();
>
> and here is the error message(which is triggered by
> objConnection.start()):
>     javax.jms.JMSException: Unable to connect to JMSServer
> (127.0.0.1/127.0.0.1:9127)
>            at com.evermind.server.jms.EvermindQueueConnection.start(JAX)
>            at com.ufoasia.emidway.stub.Receiver.<init>(Receiver.java:36)
>            at com.ufoasia.emidway.stub.Receiver.main(Receiver.java:100)
>
> Can any body tell me if this is a bug or I need to config
> elsewhere in order to connect to orion server on other machine.
> Thx so much for the information.


Reply via email to