By default EJBs are not accessible to remote clients.  You have to configure
them to be available remotely.  I can never remember the name of the
property between the times when people ask this question but I know that
Scott from Macromedia knows. You should be able to find instructions in the
support knowledge base.

-----Original Message-----
From: Raymond Blum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 11:21 AM
To: JRun-Talk
Subject: Remote clients


Hi
  I am trying to access my EJBs on my application server from a remote
machine. The client code tries to get a Context on the application
server with the following code (which works when running on the same
machine as the Appl server)

> final Properties properties = new Properties();
> properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"allaire.ejipt.ContextFactory");
> properties.setProperty(Context.PROVIDER_URL, "ejipt://" + server +
":2323");
> properties.setProperty(Context.SECURITY_PRINCIPAL, user);
> properties.setProperty(Context.SECURITY_CREDENTIALS, password);
>
> try
> {
>    context = new InitialContext(properties);
> }

But when it runs on a remote machine, the following Exception is
generated:

> Failed to connect to server: Failed to communicate with
questions.askit.com:2323
> javax.naming.CommunicationException: Failed to communicate with
questions.askit.co
> m:2323.  Root exception is java.rmi.ConnectException: Connection refused
to host:
> localhost; nested exception is:
>     java.net.ConnectException: Connection refused
> java.net.ConnectException: Connection refused
>     at java.net.PlainSocketImpl.socketConnect(Native Method)
>     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
>     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
>     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
>     at java.net.Socket.<init>(Socket.java:273)
>     at java.net.Socket.<init>(Socket.java:100)
>     at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSo
> cketFactory.java:25)

 I have checked and my firewall definitely allows port 2323 through.
Can anyone help me out with this?

Thanks In Advance
---Raymond
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to