N A M I N G
java.naming.factory.url.pkgs (or Context.URL_PKG_PREFIXES), The name of
the environment property for specifying the list of package prefixes to use when
loading in URL context factories. For JBossNS this must be
org.jboss.naming:org.jnp.interfaces. This property is essential for locating the jnp: and
java: URL context factories bundled with the JBossNS provider.
jnp.socketFactory, The fully qualified class name of the javax.net.SocketFactory
implementation to use to create the bootstrap socket. The default value is
org.jnp.interfaces.TimedSocketFactory. The TimedSocketFactory is a simple
SocketFactory implementation that supports the specification of a connection and
read timeout. These two properties are specified by:
jnp.timeout, The connection timeout in milliseconds. The default value is 0
which means the connection will block until the VM TCP/IP layer times out.
jnp.sotimeout, The connected socket read timeout in milliseconds. The default
value is 0 which means reads will block. This is the value passed to the
Socket.setSoTimeout on the newly connected socket.
A sample jndi.properties file for connecting to a JBoss server running on appserver.dot.com
on port 9901 is showing in Listing 4 2.
Listing 4 2, A sample jndi.properties file for connecting to a remote JBoss server
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://appserver.dot.com:9901/
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
# The jnp protocol socket factory class
jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
# The TimedSocketFactory connection timeout in milliseconds(0 == blocking)
jnp.timeout=0
# The TimedSocketFactory read timeout in milliseconds(0 == blocking)
jnp.sotimeout=0
In order for a client to connect to a JBossNS server, the client must include the
jndi.properties file along with the jnp client.jar and jnet.jar if you are using a JDK release
prior to 1.4.
Customizing ejb jar.xml and web.xml ENC Elements
A number of the J2EE enterprise naming context (ENC) elements require deployment
environment configuration, or may support deployment environment configuration. In this
section you will see how the ENC elements may be customized using the jboss.xml and
jboss web.xml descriptors. Listing 4 3 illustrates an ejb jar.xml descriptor using the various
36
footer
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