N A M I N G  
Since JNDI is a core J2EE service is its MBeans are configured server/default/conf/jboss 
service.xml configuration file. The default configuration for the NamingService only specifies 
the bootstrap listening port value to be 1099. The service configuration fragment is given in 
Listing 4 1. 
Listing 4 1, The default configuration for the JNDI service 
  
    name="jboss:service=Naming"> 
    1099 
   
JNDI Client Configuration 
When you use the JNDI API within the same VM that the JBoss server is running do not 
have to perform any special configuration to create a JNDI InitialContext. You simply create 
an InitialContext without any arguments. When you use the JBoss naming service to remote 
JBoss server you need to specify the appropriate InitialContext environment either by 
passing a Hashtable containing the desired properties or by having a jndi.properties file 
available on the classpath. The properties required for the InitialContext to work with the 
JBossNS JNDI provider are as follows: 
    
java.naming.factory.initial (or Context.INITIAL_CONTEXT_FACTORY), The 
name of the environment property for specifying the initial context factory to use. 
This must be the org.jnp.interfaces.NamingContextFactory class for JBossNS. 
    
java.naming.provider.url (or Context.PROVIDER_URL), The name of the 
environment property for specifying the location of the JBossNS service provider the 
client will use. The NamingContextFactory class uses this information to know which 
JBossNS server to connect to. The value of the property should be a URL string. For 
JBossNS the URL format is jnp://host:port/[jndi_path]. The jnp: portion of the URL is 
the protocol and refers to the socket/RMI based protocol used by JBossNS. The 
jndi_path portion of the URL is an option JNDI name relative to the root context, for 
example, "apps" or "apps/tmp". Everything but the host component is optional. The 
following examples are equivalent because the default port value is 1099: 
    
jnp://www.jboss.org:1099/ 
    
www.jboss.org:1099 
    
www.jboss.org 
35






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

best web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved