The PROVIDER_URL from within a bean should always be null.
PROVIDER_URL is only set in non-server clients. JBoss JNDI use "null" to
signify "look in the local JVM".
/Rickard
Andrew Branch wrote:
>
> Thanks,
>
> I ended up getting the machine name using:
> java.net.InetAddress.getLocalHost().getHostAddress()
>
> And appending on the port, which is specified in the
> jnp.port environment variable:
> System.getProperty("jnp.port");
>
> --- Tom Cook <[EMAIL PROTECTED]> wrote:
> > On Fri, 16 Feb 2001, you wrote:
> > > I want to get the value of the PROVIDER_URL (for
> > > example "localhost:1099") from within a running EJB.
> >
> > Well, I guess you could always:
> >
> > URL u = this.class.getResource( "jndi.properties" );
> > InputStream is = u.openStream();
> > Properties p = new Properties;
> > p.load( is );
> > String providerURL = p.getProperty( "java.naming.provider.url" );
> >
> > but it seems a bit inefficient to me.
> >
> > Tom
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > List Help?: [EMAIL PROTECTED]
> >
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
--
Rickard Öberg
Email: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]