user manual
224 BES Developer’s Guide
Disabling and Enabling a JNDI Definitions Module
Select the JNDI Definitions tab and select JNDI Definitions Archive to create
the new DAR. Click OK. You may now add JDBC datasources or add JMS
resources, or you can do this later. When you are finished save the module by
choosing "File|Save..." .
After saving the archive, use the J2EE Deployment Wizard to deploy the
module. The Wizard reads the datasource properties from the DAR,
instantiates the datasource objects, and binds all of them into the JNDI
service. To do this, open the Console and select "Wizards|Deployment
Wizard." Follow the on-screen instructions. Detailed information on using this
Wizard is found in the User's Guide.
Disabling and Enabling a JNDI Definitions Module
If you need to undeploy a set of datasources but still retain their definitions for
future redeployment, right-click the module in the Management Console and
choose "Disable." In addition, if you want to delete a set of deployed
datasources permanently from your application, choose "Delete."
Packaging JNDI Definitions Modules in an application EAR
Sometimes it is useful to package all archives that make up a complete
application into a single deployable unit. The common scenario is that you
have some EJBs in an EJB Archive, some servlets and JSPs in a Web Archive
and they both depend on some datasources defined in a JNDI Definitions
Archive. Using the Assembly Tools in the Console it is easy to package the
whole set of individual archives into a single EAR Module.
For example, if you have a set of EJBs that need access to a set of
datasources then first create an EAR containing the EJB Jar archive and "Add
-> JndiDefinitions to Application". Typically you would need to open up the
EJB Jar in a DDEditor session to retarget the Resource References to point to
the appropriate datasources defined in the JNDI Definitions.
Note Because DARs are not a part of the J2EE specification, you must include at
least one other valid J2EE module along with your DAR within the EAR. An
EAR containing only a DAR file is not a valid J2EE archive.
JNDI service provider for hosting resource factories
Plain Java objects like JDBC datasources and other J2EE resource
connection factory objects need to be looked up from JNDI. Any JNDI provider
that can store Java serializable and referenceable objects is supported, such
as an LDAP directory external to the enterprise server. The Borland Enterprise
Server's Naming Service provides a means to store the datasource objects
into a Serial Context instead of the default CosNaming namespace supporting
only CORBA references. The Serial Context URL begins with serial:// and is










