Nucleus is Oracle ATG Web Commerce’s component model for building applications from JavaBeans. Nucleus lets you assemble applications through simple configuration files that specify what components are used by the application, what parameters are used to initialize those components, and how those components hook up to each other.

Nucleus by itself provides no application-specific functions. The JavaBean components implement all of an application’s functionality. Nucleus is the mechanism that gives those components a place to live, and a way for those components to find each other.

Nucleus organizes application components into a hierarchy, and assigns a name to each component, based on its position in the hierarchy. For example, a component named /services/logs/FileLogger represents a component called FileLogger, contained by the container component called logs, which is itself contained by the container component called services. The services component is contained by the root component of the hierarchy, which is Nucleus. Components in the hierarchy can refer to each other by name. This includes both absolute names, such as /services/logs/FileLogger, and relative names such as ../servers/HttpServer.

Nucleus also takes on the task of creating and initializing components. An application does not need to contain the code that creates a component and adds it to the Nucleus namespace. Instead, you can write a configuration file that specifies the class of the component and the initial values of the component’s properties. The first time that component is referenced by name, Nucleus finds the component’s configuration file, creates the component based on the values in that configuration file, and adds the component to the Nucleus namespace.

Nucleus provides a simple path for writing new components. Any Java object with an empty constructor can act as a component in Nucleus, so writing a new Nucleus component is as easy as writing a Java class. By adhering to JavaBeans standards for defining properties and events, a Java class can take advantage of Nucleus’s automatic creation and configuration mechanism. By implementing various interfaces, a Nucleus component can also take advantage of Nucleus services and notifications.

In this chapter

The sections of this chapter help you understand and use Nucleus as a framework for application components:

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices