Hi,

I have my EJB application deployed on JBoss 4.0.2. Now, for looking up the EJB, 
I need to create the InitialContext object. However, I would like that in my 
code, I should not specify the URL to which the InitialContext should connect 
to. That's because the entire application is deployed in the same JVM and I'd 
like my application to get whatever InitialContext it can. Hence I coded my 
application like:


  | InitialContext ctx = new InitialContext();
  | ctx.lookup(...);
  | 

As you can see, I have not specified any environment properties in the 
constructor of InitialContext. 

Now, for the configuration file, I modified the /conf/jndi.properties file to 
include the following line:


  | java.naming.provider.url=localhost:1099
  | 

I would expect that during the construction of InitialContext, it will use this 
jndi.properties file (as this is already available on classpath) and will 
return me the correct InitialContext. 

The code actually works fine except that I notice the following warning on 
Jboss Console:


  | 11:46:11,269 WARN  [NamingService] Context.PROVIDER_URL in server 
jndi.properties, url=localhost:1099
  | 

Can someone explain the reason to me or am I missing something here? BTW, when 
I saw the source code of org.jboss.naming.NamingService class (the one which 
throws this warning), it had the following comments on top of the code where 
warning is being logged.

anonymous wrote : 
  | Create a default InitialContext and dump out its env to show what 
properties were used in its creation. If we find a Context.PROVIDER_URL 
property issue a warning as this means JNDI lookups are going through RMI.
  | 

I wonder why it is so. Any clues?

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3942397#3942397

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3942397


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to