After you develop a custom MBean, copy its class files (or JAR file) into the MBean class loader directory, domain-dir/applications/mbeans. You have two choices of where to place any dependent classes:
Common class loader – Copy the classes as JAR files into the domain-dir/lib directory, or copy the classes as .class files into the domain-dir/lib/classes directory. The classes are loaded when you restart the Enterprise Server. The classes are available to all other MBeans, applications, and modules deployed on servers that share the same configuration.
MBean class loader – Copy the classes into the domain-dir/applications/mbeans directory. No restart is required. The classes are available to all other MBeans deployed on servers that share the same configuration, but not to applications and modules.
After copying the classes, register the MBean using the asadmin create-mbean command. See The asadmin create-mbean Command.
For general information about Enterprise Server class loaders, see Chapter 2, Class Loaders.