> Properties env = new Properties();
> env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
> env.setProperty(Context.PROVIDER_URL,
"jnp://localhost:1099");
> env.setProperty(Context.URL_PKG_PREFIXES ,
"org.jboss.naming:org.jnp.interfaces");
> InitialContext ctx = new InitialContext(env);
I left this in jboss.jcml:
<!-- JNDI -->
<mbean code="org.jboss.naming.NamingService"
name="DefaultDomain:service=Naming">
<attribute name="Port">1099</attribute>
</mbean>
and changed jnp.properties to this:
jnp.port=1299
jnp.log=true
My client could connect with this in its jndi.properties file:
java.naming.provider.url=w2k-pro OR
java.naming.provider.url=w2k-pro:1099
but failed when I put this in jndi.properties:
java.naming.provider.url=jnp://w2k-pro:1299
with the following error:
Exception caught: javax.naming.ServiceUnavailableException: jnp [Root
exception
is java.net.UnknownHostException: jnp]
Obviously, I'm confused.
(1) What is the relationship between jnp and jndi?
(2) When is jnp used? In the default configuration, I only see the naming
service specified in the jboss.jcml mbean started, as follows:
[Naming] Starting
[Naming] [Naming] Started on port 1099
[Naming] Naming started on port 1099
[Naming] Started
When does jnp come into play, and when does jnp.properties get used?
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user