In addition to specifying a class name, the $class
property in a properties file can be used to define an instance of a serialized JavaBean. A serialized JavaBean may be obtained from an IDE tool or you can create one in Java using the ObjectOutputStream
class. These files should have a .ser
suffix and should be stored in the CLASSPATH like .class
files.
The value of the $class
attribute should be a name of the form x.y
. This will first look for a file x/y.ser
in your CLASSPATH. If that file does not exist, Nucleus loads the class x.y
. Nucleus uses the standard JavaBean utility method Beans.instantiate
to implement this feature.
If you don’t use any serialized JavaBeans, you can improve performance by disabling checking for .ser
files. To disable this checking, set the checkForSerFiles
property of the top-level Nucleus component to false
. For example, you can create a <ATG2007.3dir>/home/localconfig/Nucleus.properties
file that includes this line:
checkForSerFiles=false