Hi!
Indigo Blue wrote:
> When I try to run a client application for my bean, I cannot get the
> InitialContext at all. I keep getting the following:
> javax.naming.NoInitialContextException: Cannot instantiate class:
> org.jnp.interfaces.NamingContextFactory. Root exception is
> java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
> Can anyone tell me do I need to add something to the classpath?
(assuming JDK1.3)
Security manager not installed in client:
Yes, you need to add lib/ext/jboss-client.jar and lib/ext/jnpserver.jar
(note to self: add client version of JNP to jBoss CVS) to your classpath
Security manager installed:
No, your client may use RMI's dynamic classloading to download classes
directly from the server. The extreme case is to bootstrap the JNDI
provider as well by making a javax.naming.Reference that points to jBoss
and which includes a factory location that is the jBoss server. By doing
this all you have to do is resolve the reference through the JNDI
NamingManager (this is a power-user trick though). The somewhat easier
way (for mere mortals) is to put the jnpserver.jar library in your
classpath and create a jndi.properties file in classpath that uses this
(see /conf/jndi.properties for an example). this way you will be able to
do new InitialContext() in your code and find all EJB's from there.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.ejboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]