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 Application Server. The classes are available to all other MBeans and all deployed applications and modules.
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, but not to all deployed 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 Application Server class loaders, see Chapter 2, Class Loaders.