I have 2 EJB. The first one is an IIOP enabled EJB deployed on server/all/deploy. The second one is an RMI EJB deployed on server/default/deploy. The first one uses a BusinessDelegate to call a method on the second EJB.
The protocol used is RMI.
Concretly, the BusinessDelegate get the InitialContext using the following:
Context.PROVIDER_URL = "jnp://localhost:1099"
The problem is that when the BusinessDelegate tries to get the InitialContext I got the following exception:
Caused by: javax.naming.CommunicationException [Root
exception is java.rmi.ConnectException: Connection refused to host: 10.204.11.107; nested exception is:
java.net.ConnectException: Connection refused: connect]
15:47:25,290 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
Does anyone have an idea how this problem could be fixed??
In general, how an IIOP enabled EJB could communicate (via helper classes) with a RMI EJB ???
I do not want to make my second EJB IIOP enabled.
I start the server using run -c all --host=localhost.
Thank you very much.
I think I found the solution.
I seems to me that the server has to be started using
run -c all
and not run -c all --host=localhost
in order that an IIOP enabled EJB could get a connection to
an RMI EJB.
This must be useful to someone.