You can create custom Java classes that extend server features or that perform some task when a server instance starts or shuts down. These startup classes or shutdown classes are loaded by the system class loader and therefore are available to all resources on a server instance even if the resources are managed by different containers. For example, EJBs and JMX clients can access startup or shutdown classes even though their containers use their own, higher level class loaders.
Because these are system-level classes, you must place them on the server's classpath. If want to make custom classes available to multiple applications but do not need the classes to be available at the system level, consider deploying them as application startup classes.
To configure a server instance to use a startup or shutdown class, complete the following tasks: