1

I have seen a lot of places define the JNDI naming context like this (Websphere for example):

java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
java.naming.factory.url.pkgs=com.ibm.ws.naming
java.naming.provider.url=iiop://localhost:2809

and in JBoss it is

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

But I have no idea where these value come from or anywhere in the application server I CAN LOOKUP and MAKE A CHANGE, especially to the url. Any hint is appreciated.

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
Dreamer
  • 7,333
  • 24
  • 99
  • 179
  • What do you want to change ? You want to change the provider URL ? These settings doesn't belong to the server configuration but to the application. Then the server is configured to run the application. Usually I set the context and the provider with a configuration bean using spring. If i remember correctly. – Marcs Dec 01 '14 at 21:42
  • @Marcs Well like to see if the port number is configurable or something like that and where those naming class/interface is defined. Basically I was trying to find some document about where those String are defined and why, instead of read it from online tutorial(looking for more official docs) :) – Dreamer Dec 01 '14 at 22:12
  • As far as I can remember, there is no standard for this, it's left to the container implementer, which is why it's completely different on every different app server. Some app servers may allow you to change this configuration, some may not. You wind up having to read the documentation for the particular app server vendor and version that is hosting the naming context. – GreyBeardedGeek Dec 01 '14 at 22:17
  • @GreyBeardedGeek thanks, I understand there won't be a lot handy guidelines for those commercial product. I am taking notes and will answer this question by myself later if I find answers to all those app servers :D – Dreamer Dec 01 '14 at 22:21
  • Check this page for [WebSphere](http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/rnam_example_prop2.html?cp=SSAW57_8.5.5&lang=en) it should give you some more details. You usually don't need these properties (only for client external to the container), and you can only change host and port as factory is server specific. – Gas Dec 02 '14 at 06:45

0 Answers0