Which three can be used to create valid Nucleus components?

Which three can be used to create valid Nucleus components?

Which three can be used to create valid Nucleus components?

A.
any java class

B.
any Java class with a public constructor

C.
any JavaBean

D.
a Java class implementing GenericService

E.
a singleton with a private constructor and a getinstance() public method

Explanation:

C:Nucleus: Organizing JavaBean Components
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.
Note:Event Sources
Your class can be a source for JavaBeans events by following the patterns outlined in the
JavaBeans specifications (see Events and Event Listeners in the Core ATG Services chapter). If
your class fires events, Nucleus properties files can be used to configure the listeners for those
events.
D: However, these classes should implement certain interfaces that give components access to a
number of Nucleus capabilities, such as automatic creation, configuration, and notifications.
The easiest way to implement these interfaces is to subclass atg.nucleus.GenericService, which
implements all interfaces described in the following sections. However, your class might
alreadyextend some other class, thereby preventing you from extending GenericService. In this
case, your class must implement the necessary interfaces.
Note: Your class does not need to implement all interfaces that GenericService implements, only
the ones with the functionality required.
E:Any Java object with an empty constructor can act as a component in Nucleus.
Note:Java has several design patterns Singleton Pattern being the most commonly used. Java
Singleton pattern belongs to the family of design patterns, that govern the instantiation process.
This design pattern proposes that at any time there can only be one instance of a singleton
(object) created by the JVM.
The class’s default constructor is made private, which prevents the direct instantiation of the object
by others (Other Classes). A static modifier is applied to the instance method that returns the
object as it then makes this method a class level method that can be accessed without creating an
object.



Leave a Reply 0

Your email address will not be published. Required fields are marked *