• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

JNDI Administration- JBoss

Java Naming and Directory Interface

Core infrastructure (glue) for locating objects or services within an application server

Also allows external clients to locate services

Important for clustering: hides actual location

Divided into API and SPI

Applications code against the API

Application servers provide the SPI

SPIs for accessing remote resources, such as LDAP, DNS, NIS, file systems, RMI registry

JNDI in Java EE

JNDI is to Java EE what DNS is to Internet apps

JNDI maps high-level names to resources like mail sessions, database connection pools, EJBs, and plain environmental properties

JNDI organizes its namespace using Environmental Naming Context (ENC) naming convention:

Starts with java:comp/env

Private to each application

Contexts are delimited with a forward-slash (/)

JNDI ENC naming convention:

java:comp/env/var – Environmental variables

java:comp/env/url – URLs

java:comp/env/mail – JavaMail sessions

java:comp/env/jms – JMS connection factories and destinations

java:comp/env/ejb – EJB home interfaces

java:comp/env/jdbc – JDBC DataSources

These core tutorials will help you to learn the fundamentals of JBOSS.
For an in-depth understanding and practical experience,
explore Online JBOSS Training.

JNDI on JBoss

Supports both local (optimized) and remote (over RMI) access to named objects

Provides a JVM-private app-shared java: context in addition to app-private java:comp

Everything outside java: is public and externally visible

Exposes JNDI operations over JMX invoke operations – allows access over HTTP/S

Supports viewing JNDI Tree remotely

Supports clustering through HA-JNDI

Configured in ${jboss.server.config.url}/jboss-service.xml:

<mbean code=”org.jboss.naming.NamingService”

name=”jboss:service=Naming”

xmbean-dd=”resource:xmdesc/NamingService-xmbean.xml”>

<mbean code=”org.jboss.naming.JNDIView”

name=”jboss:service=JNDIView”

xmbean-dd=”resource:xmdesc/JNDIView-xmbean.xml”>

</mbean>

Client configuration ${jboss.server.config.url}/jndi.properties:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Remote clients would need to add:

java.naming.provider.url=jnp://jbosshost.domain.com:1099

For indepth understanding on JBoss click on:

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on JNDI Administration- JBoss"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.