Change the port in conf/jboss-service.xml
Both _should_ use the same registry, because the "Tool" has something to do with profiling...
(I don't know so much about RMI Registries, but it seems natural to me that several VM-instances can access it!?
Even under the same port!?)
JBoss's Port 1099 is a straight http socket that hands out the JNDI stub. It is not an RMI registry.
What has profiling got todo with JNDI?
It's about profiling EJBs and accessing them by JNDI (RMI registry).
I will now state some fundamental opinions and please correct me if anything is wrong:
- JNP is the jBoss-Implementation of JNDI
- JNP can be standalone but is a MBean in jBoss
- the InitialContext abstracts always from "Naming and Directory Services"
- JNDI is sucha a "Naming and Directory Service" (as would also be LDAP)
- JRMP is an alternative to IIOP
- saying RMI means "Java-immanent RPC over JRMP"
- saying RMI-IIOP means "Java-immanent RPC over IIOP"
- the term "RMI registry" represents the fundamental stub-recovery principle
- to use JNDI for component-lookup (that is: as a RMI registry) one has to
bind a RMI server to JNDI.
This is done by jBoss, because otherwise I could not access EJBs by JNP
- I get an InitialContext for JNDI that is used for J2EE as RMI registry
normaly with java.naming.provider.url=rmi://server:1099
(according to http://java.sun.com/j2se/1.3/docs/guide/jndi/jndi-rmi.html)
--> an RMI-IIOP server would normaly have the prefix "iiop://"
--> jBoss-JNP uses its own prefix "jnp://"
So now my questions:
- I do not understand "JBoss's Port 1099 is a straight http socket that
hands out the JNDI stub", because: The "JNDI stub" still leads to JNP,
which has a RMI server bound, doesn't it?
So this "JNDI stub" should represent a "JRMP server" (demanded by the
- Is it perhaps a RMI-IIOP server?
Just an addition to the above opinions:
- J2EE and EJBs use normaly RMI and not RMI-IIOP, that means JRMP is
used as Protocol
- RMI-IIOP was introduced to allow communication with CORBA-Obj., that
means non-Java (!) applications, but its optional
I've just dug into this "which RMI is used with EJB" more and I was wrong:
EJBs use RMI-IIOP !!
(according to the book "Mastering Enterprise JavaBeans" by Ed Roman, page 492 and http://info.borland.com/devsupport/appserver/faq/dave-curtis-rmiiiop.html)
It is a little bit confusing because RMI should, as I said, stand for "using JRMP" because it has it's origins in there. But because EJBs use RMI-IIOP some information-sources to J2EE/EJB skip the -IIOP because they think it would be clear RMI-IIOP is meant -- to all the writers out there: it is NOT!
So back to my problem:
Is it correct that JNP works as a RMI(-IIOP) registry?
But the tool I've got the problem with asumes a RMI(-JRMP) registry.
So it can not work - not with EJBs using IIOP.
Hmm, the tool never said explicitly it would work with EJBs. I assume now it does work with distributed applications - not with EJBs but ordinary client/server scenarios using RMI-calls. Damn!
Okay, sorry to have bothered you.
P.S. If anybody likes to give additional informiation (e.g. good Links) about all this - please write.
JNP can be used to store remote objects but it is not
correct to say it is an RMIRegistry.
JNP is not at 1099 that is just the stub that helps you bootstrap
access. It will connect back to a different socket (by default
random - although you can assign a specific port using mbean
config). This socket uses JRMP