Suppose I am beating a dead horse, but a little documentation would go a
long way.  This includes changing the examples and tutorials posted on the
website.

Just to clarify (and almost informally document) the client classpath
should:

  Contain the following jars: ejb.jar, jboss-client.jar, jndi.jar,
jnp-client.jar, jta-spec1_0_1.jar
  In a directory on my classpath: jndi.properties

Anything else?

Cheers

-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 21, 2000 9:00 AM
To: jBoss
Subject: Re: [jBoss-User] Still struggling with Monson-Haefel's examples


Hi!

Jay Walters wrote:
> For what it's worth, you guys can get rid of the System.setProperty code
and
> rewrite getInitialContext as follows...
> 
>     public static Context getInitialContext()
>      throws javax.naming.NamingException
>     {
>         Hashtable h = new Properties();
>         h.put(Context.INITIAL_CONTEXT_FACTORY,
>           "org.jnp.interfaces.NamingContextFactory");
>         h.put(Context.PROVIDER_URL,"localhost:1099");
> 
>         //  I don't need the line below in my clients, but I'm
>         //  not sure what you're doing and whether you need it
>         //  or not.
>         h.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
>         //
> 
>         Context ctx = new javax.naming.InitialContext(h);
>         return ctx;
>     }

FWIW, here is my getInitialContext code:
     public static Context getInitialContext()
      throws javax.naming.NamingException
     {
         return new InitialContext()x;
     }
:-) Much simpler isn't it?

All settings are contained in the file jndi.properties which is present
in the classpath. The URL_PKG_PREFIXES settings is only require if you
want to be able to do "jnp://" lookups, i.e. by using URL prefixes
(duh). This is useful if you want to use several servers from different
vendors at once.

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to