Application References

The J2EE Engine provides a way of fully integrating applications running on it with the existing J2EE Engine components, by defining a reliable and comprehensible mechanism for defining dependencies between them. Using this mechanism, an application can reuse the resources of existing components.

Purpose of Application References

The purpose of this mechanism is to hide the complexity from application developers having to explicitly define references between the application class loader and other system class loaders, and register them in the J2EE Engine’s Class Loading System. The Deploy Service has a built-in mechanism that performs all these tasks using the references that the application developer has defined.

Application References Appliance

The mechanism is based on defining references from an application to another component. An application can set references to:

·        Other applications that are deployed on the J2EE Engine

·        J2EE Engine components (services, libraries, and interfaces)

·        A standalone web module (a WAR file)

·        A standalone EJB module (a JAR file)

·        A standalone resource adapter module (an RAR file)

There are two types of application references – weak and strong.

Semantics of Weak Application References

An application sets a weak reference to another component or application if it needs to use its classes. If the referenced component or application is not started (or not loaded for libraries), the application will be started but will not be able to use classes of those components.

Semantics of Strong Application References

An application sets a strong reference to another component or application if it needs its classes and runtime objects. If the referenced component or application is not started (or not loaded for libraries), the application will not be started at all.

Default Application References

For the purpose of simplifying the work of the application deployer, the J2EE Engine provides a set of default references. If you want to see a list of the default references, see the default value of the StandardApplicationReferences property of the Deploy Service.

If you need to set additional references, you must set them at application deployment time.

Do not remove any of these references or change the order in which they are loaded.

Even if you remove some of the references at runtime, they will be loaded again at startup, that is, you cannot permanently remove these references.