!--a11y-->
Portal Registry 
The portal registry is the entry point for inspection of almost all PRT information. In particular, this includes the running services and the portal configuration. The portal registry is implemented as a hierarchical JNDI context that allows binding of any kind of object.
The portal registry is used as follows:
· As a global place for an application to store and retrieve objects. The portal registry is a singleton offering methods to create sub-contexts, bind, and lookup objects
· The PRT uses a set of predefined contexts to store objects that are invoked at a certain point in time during the portal execution
The following table gives the list of contexts in which the PRT will look for objects to customize its execution:
Registry Sub Context |
Description |
runtime/hooks/node |
The list of node hooks |
runtime/hooks/component |
The list of component hooks |
runtime/hooks/document |
The document hooks list |
runtime/hooks/response |
All response hooks known by the runtime |
runtime/hooks/deployment |
The context in which deployment hooks bind themselves in order to be notified when a portal application is deployed in the portal |
runtime/hooks/cache |
The cache hooks list |
runtime/hooks/event |
The list of event hooks installed in the runtime |
runtime/hooks/event/request.listeners |
The list of request event listeners |
runtime/hooks/mode |
The list of mode hooks |
runtime/connections |
The connections known by the portal runtime |
runtime/prt.modes |
The modes known and handled by the PRT |
The portal registry also provides access to a JNDI context, which can be used to read/write any kind of data to the repository. This feature can be used by any portal application to store additional configuration files or resources that have to be shared by all PRT nodes on the cluster.
A sub context dedicated to the application exists by default. Components and services can access to the context of the application the belongs to by calling the lookup method on the root context
import javax.naming.Context; ...Context context = PortalRegistry.getCentralConfigurationContext(); Context applicationContext = context.lookup("MyAppName"); |
The central configuration context relies on the JNDI API plus the IStreamSource interface. This interface is used to read and write the data.
