ISV applications that interoperate with WebLogic Server typically need to have specific information about the BEA software, for example, the current software version number or custom startup requirements. As BEA releases new versions and service packs of WebLogic Server, and as customers extend and modify their WebLogic Server installations, ISV software needs to detect changes in a way that results in minimal or no impact on the usage of that software.
The BEA Registry API is a mechanism that provides a uniform access method to information about BEA software installations that is contained in the BEA Registry file,
registry.xml. The BEA Registry API gives ISV applications a manageable, predictable means of interoperating with BEA software as customer environments change.
This chapter contains the following topics:
|WARNING:||Do not modify the contents of the BEA Registry file,
A BEA Registry file is created in each BEA Home directory on each machine where a BEA product has been installed, and it stores context data about the software installed on that machine, including:
Using the BEA Registry API to obtain this information is much more reliable and stable than other methods, such as examining the
weblogic.Admin file and run-time MBeans. Regardless of how the volume and format of the information kept in the BEA Registry may change across successive releases of BEA software, the BEA Registry API returns data in a standard format.
The Registry API package contains the classes and interfaces summarized in Table 5-1. Click the name of a class or interface listed in this table to view the Javadoc for it.
To create an application that uses the Registry API, complete steps similar to the following:
String, which is set to the absolute path of the BEA Home directory
RegistryInfo, which is a Java object for storing information obtained from the BEA Registry
Note that as an alternative to creating a variable in which you set the absolute path of the BEA Home directory, you can invoke the
RegistryInfoImpl.getBEAHomes method. This method returns an array of
String objects that represent each BEA Home directory detected on the current machine.
RegistryInfoobject, which accepts the BEA Home directory as an input parameter. For example:
RegistryInfoobject to obtain the desired information. For example, you can obtain a list of existing Java home directories, which are returned in an array of
Stringobjects. You can also return the names of installed BEA products in an array of
Javadoc for the Registry API is available at the following URL: