Using Custom Resources; Using External Jndi Repositories And Resources - Sun Microsystems GlassFish Enterprise Server 2.1 Administration Manual

Hide thumbs Also See for GlassFish Enterprise Server 2.1:
Table of Contents

Advertisement

TABLE 6–1
JNDI Lookup Name
java:comp/env
java:comp/env/jdbc
java:comp/env/ejb
java:comp/UserTransaction
java:comp/env/mail
java:comp/env/url
java:comp/env/jms
java:comp/ORB

Using Custom Resources

A custom resource accesses a local JNDI repository and an external resource accesses an
external JNDI repository. Both types of resources need user-specified factory class elements,
JNDI name attributes, etc. In this section, we will discuss how to configure JNDI connection
factory resources, for J2EE resources, and how to access these resources.
Within the Enterprise Server, you can create, delete, and list resources, as well as
list-jndi-entities.

Using External JNDI Repositories and Resources

Often applications running on the Enterprise Server require access to resources stored in an
external JNDI repository. For example, generic Java objects could be stored in an LDAP server
as per the Java schema. External JNDI resource elements let users configure such external
resource repositories. The external JNDI factory must implement
javax.naming.spi.InitialContextFactory interface.
An example of the use of an external JNDI resource is:
<resources>
<!-- external-jndi-resource element specifies how to access J2EE resources
-- stored in an external JNDI repository. The following example
-- illustrates how to access a java object stored in LDAP.
-- factory-class element specifies the JNDI InitialContext factory that
-- needs to be used to access the resource factory. property element
-- corresponds to the environment applicable to the external JNDI context
Chapter 6 • JNDI Resources
JNDI Lookups and Their Associated References
Using External JNDI Repositories and Resources
Associated Reference
Application environment entries
JDBC DataSource resource manager connection factories
EJB References
UserTransaction references
JavaMail Session Connection Factories
URL Connection Factories
JMS Connection Factories and Destinations
ORB instance shared across application components
79

Advertisement

Table of Contents
loading

Table of Contents