I am trying to disable the "Users and Groups" portlet by stopping the corresponding AdminConsoleExtensionGBean extension GBean. I am able to stop the GBean programatically using the following code:
AbstractNameQuery query = new AbstractNameQuery(" org.apache.geronimo.pluto.AdminConsoleExtensionGBean"); Set gbeans = kernel.listGBeans(query); for(Object obj: gbeans) { if(!obj.toString().endsWith("UsersGroups")) continue; try { kernel.stopGBean((AbstractName)obj); } catch (Exception e) { e.printStackTrace(); } } The gbean query is giving me an abstract name "org.apache.geronimo.plugins /console-tomcat/2.1/car?J2EEApplication=org.apache.geronimo.plugins /console-tomcat/2.1/car,WebModule=base-portlets.war,j2eeType=GBean,name=UsersGroups" for this gbean. However, adding <gbean load="false" > with this abstract name under "org.apache.geronimo.plugins/console-tomcat/2.1/car" module in config.xml does not seem to be stopping the gbean. EditableKernelConfigurationManager.removeGBeanFromConfiguration() is resulting in GBeanNotFoundException. I am noticing that the GBean in question is not directly in the EAR's configuration, but in one of the web applications inside the EAR. How to prevent loading of this gbean in this case.