| Sun Java System Application Server |
This sample application demonstrates:
The JNDI custom factory described here creates samples.jndi.custom.share.CustomBean
beans. This sample application also provides an application client component
that illustrates how to use the custom factory to obtain a CustomBean.
Relative to install_dir/samples/jndi/apps/custom/, the
directory structure of this sample application is:
custom-client/src/conf - Contains the application client deployment
descriptors required for deployment on the application server
custom-client/src/java/samples/jndi/custom/client - Contains
the source code for the application client
custom-share/src/java/samples/jndi/custom/share - Contains
the source code for the custom bean (CustomBean) object and the
class implementing the Custom JNDI Resource Factory (MyJndiCustomFactory)
The general instructions for building, deploying, and running sample applications are provided in Building, Deploying, and Running Sample Applications. In reading this document, use the following application-specific variables for this application:
install_dir is the directory where Application Server
is installed.
app_dir is the application base directory: install_dir/samples/jndi/apps/custom.
jndi-custom.ear.
Follow this general procedure:
build.xml, is in the app_dir
directory, specifically, install_dir/samples/jndi/apps/custom.
install_dir/samples/jndi/apps/custom/jndi-custom.ear.
Note:
When you deploy this application, an application
server custom resource associated with the Custom JNDI Resource Factory
is also created. This custom resource will be looked up by the application
components when they need to obtain objects created by the custom JNDI
Factory (CustomBean objects). See the create-custom-resource
target in the main build.xml file for more details.
To run the application, execute the following commands:
cd install_dir/samples/jndi/apps/custom asant runThis command invokes the application client for this sample application. The application client looks up the JNDI name of the resource associated with the custom JNDI resource factory (created during deployment) and displays the values of the bean properties.
Copyright © 2006 Sun Microsystems, Inc. All rights reserved.