public static PackageTypeServerPluginContainer getPackageTypePluginContainer() throws Exception {
PackageTypeServerPluginContainer pc = null;
try {
ServerPluginServiceMBean mbean = LookupUtil.getServerPluginService();
if (!mbean.isMasterPluginContainerStarted()) {
throw new IllegalStateException("The master plugin container is not started!");
}
MasterServerPluginContainer master = mbean.getMasterPluginContainer();
pc = master.getPluginContainerByClass(PackageTypeServerPluginContainer.class);
} catch (IllegalStateException ise) {
throw ise;
} catch (Exception e) {
throw new Exception("Cannot obtain the package type plugin container", e);