Author: chris.laprun(a)jboss.com
Date: 2009-04-27 15:01:13 -0400 (Mon, 27 Apr 2009)
New Revision: 13276
Added:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java
Modified:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
Log:
- Added support for displaying portlet information.
- Extracted Portal management proxy creation to PortalServer.
Modified:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
===================================================================
---
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -25,7 +25,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.portal.jems.as.JMX;
import org.jboss.portal.management.Portal;
import org.jboss.portal.management.PortalServer;
import org.rhq.core.domain.configuration.Configuration;
@@ -60,10 +59,8 @@
EventContext eventContext;
- private static final String PORTAL_MANAGEMENT_SERVICE =
"portal.management:service=Management,type=Portal,name=Default";
private Portal portal;
-
/**
* Return availability of this resource
*
@@ -85,18 +82,11 @@
Configuration conf = context.getPluginConfiguration();
- try
- {
- portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
- }
- catch (Exception e)
- {
- log.info("Failed to start PortalComponent: " +
e.getLocalizedMessage(), e);
- }
+ portal = PortalServer.getPortalManagement();
/*eventContext = context.getEventContext();
- PortalEventPoller eventPoller = new PortalEventPoller();
- eventContext.registerEventPoller(eventPoller, 60);*/
+ PortalEventPoller eventPoller = new PortalEventPoller();
+ eventContext.registerEventPoller(eventPoller, 60);*/
}
Added:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java
===================================================================
---
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java
(rev 0)
+++
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.jopr;
+
+import org.jboss.portal.management.Portal;
+import org.jboss.portal.management.PortalServer;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class PortletComponent implements ResourceComponent, MeasurementFacet
+{
+ private LocalPortletManagementMBean portlet;
+ private final static Portal portal;
+
+ static
+ {
+ portal = PortalServer.getPortalManagement();
+ }
+
+ public void start(ResourceContext resourceContext) throws
InvalidPluginConfigurationException, Exception
+ {
+ portlet =
portal.getRegisteredPortletManagements().get(resourceContext.getResourceKey());
+ }
+
+ public void stop()
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public AvailabilityType getAvailability()
+ {
+ return AvailabilityType.UP;
+ }
+
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest>
metrics) throws Exception
+ {
+ for (MeasurementScheduleRequest req : metrics)
+ {
+ if (req.getName().equals("actionErrorCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getActionErrorCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("actionRequestCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getActionRequestCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("averageActionTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getAverageActionTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("averageRenderTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getAverageRenderTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("maxActionTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getMaxActionTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("maxRenderTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getMaxRenderTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("renderErrorCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getRenderErrorCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("renderRequestCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req,
(double)portlet.getRenderRequestCount());
+ report.addData(res);
+ }
+ }
+ }
+}
Added:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java
===================================================================
---
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java
(rev 0)
+++
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.jopr;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.portal.management.PortalServer;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class PortletDiscovery implements ResourceDiscoveryComponent
+{
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ public Set discoverResources(ResourceDiscoveryContext discoveryContext) throws
InvalidPluginConfigurationException, Exception
+ {
+ if (PortalServer.isRunning())
+ {
+
+ Map<String, LocalPortletManagementMBean> portlets =
PortalServer.getPortalManagement().getRegisteredPortletManagements();
+
+
+ if (portlets.isEmpty())
+ {
+ return Collections.emptySet();
+ }
+
+ Set<DiscoveredResourceDetails> discoveredResources = new
HashSet<DiscoveredResourceDetails>(portlets.size());
+
+ for (String portletName : portlets.keySet())
+ {
+
+ DiscoveredResourceDetails detail = new
DiscoveredResourceDetails(discoveryContext.getResourceType(), portletName,
+ portletName, "N/A", "Monitoring of Portlet " +
portletName, null, null);
+
+
+ // Add to return values
+ discoveredResources.add(detail);
+ log.info("Discovered new portlet: " + portletName);
+ }
+
+ return discoveredResources;
+ }
+
+ return Collections.emptySet();
+ }
+}
Modified: modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27
15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27
19:01:13 UTC (rev 13276)
@@ -1,24 +1,24 @@
<?xml version="1.0"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
- ~ contributors as indicated by the @authors tag. See the
- ~ copyright.txt in the distribution for a full listing of
- ~ individual contributors.
- ~
- ~ This is free software; you can redistribute it and/or modify it
- ~ under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ This software is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public
- ~ License along with this software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -33,9 +33,7 @@
<server name="portal-jopr-plugin"
discovery="PortalDiscovery"
class="PortalComponent"
- singleton="true"
- supportsManualAdd="true"
- createDeletePolicy="both">
+ singleton="true">
<!--<plugin-configuration>
--><!-- TODO add your own here --><!--
@@ -46,14 +44,26 @@
<metric property="portletNumber" displayName="Display the number
of currently deployed portlets"/>
+ <service name="Portlet" class="PortletComponent"
discovery="PortletDiscovery">
+ <metric property="averageRenderTime" displayName="Average
render time" units="milliseconds"/>
+ <metric property="averageActionTime" displayName="Average
action time" units="milliseconds"/>
+ <metric property="maxRenderTime" displayName="Maximum render
time" units="milliseconds"/>
+ <metric property="maxActionTime" displayName="Maximum action
time" units="milliseconds"/>
+ <metric property="renderRequestCount" displayName="Number of
render requests" measurementType="trendsup"
+ units="none"/>
+ <metric property="actionRequestCount" displayName="Number of
action requests" measurementType="trendsup"
+ units="none"/>
+ <metric property="renderErrorCount" displayName="Number of
render errors" measurementType="trendsup"
+ units="none"/>
+ <metric property="actionErrorCount" displayName="Number of
action errors" measurementType="trendsup"
+ units="none"/>
+ </service>
+
+
<!--<event name="portal-jopr-pluginDummyEvent"/>-->
<!--<resource-configuration>
--><!-- TODO supply your configuration parameters --><!--
</resource-configuration>-->
-
-
</server>
-
-
</plugin>
\ No newline at end of file
Modified:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,7 +22,8 @@
******************************************************************************/
package org.jboss.portal.management;
-import javax.management.ObjectName;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+
import java.util.Map;
/**
@@ -34,5 +35,5 @@
public int getNbInstances();
- Map<String, ObjectName> getRegisteredPortletMappings();
+ Map<String, LocalPortletManagementMBean> getRegisteredPortletManagements();
}
Modified:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -20,12 +20,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.management;
import org.jboss.portal.core.impl.model.instance.InstanceContainerContext;
import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
-import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.transaction.UserTransaction;
import java.util.Map;
@@ -60,8 +61,17 @@
return nbInstances;
}
- public Map<String, ObjectName> getRegisteredPortletMappings()
+ public Map<String, LocalPortletManagementMBean>
getRegisteredPortletManagements()
{
+ try
+ {
+ discoveryService.processPortletDiscovery();
+ }
+ catch (Exception e)
+ {
+ log.debug(e);
+ log.info("Could not refresh list of portlets: " +
e.getLocalizedMessage());
+ }
return discoveryService.getRegisteredPortlets();
}
Modified:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -23,6 +23,8 @@
package org.jboss.portal.management;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.jems.as.JMX;
import org.jboss.portal.server.Server;
@@ -37,6 +39,11 @@
*/
public class PortalServer
{
+ private static final Log log = LogFactory.getLog(PortalServer.class);
+
+ private static final String PORTAL_MANAGEMENT_SERVICE =
"portal.management:service=Management,type=Portal,name=Default";
+ private static Portal portal;
+
private static final String PORTAL_SERVICE_SERVER =
"portal:service=Server";
private static Server portalServer;
@@ -46,7 +53,15 @@
static
{
- portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ try
+ {
+ portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
+ }
+ catch (Exception e)
+ {
+ log.info("Failed to start PortalComponent: " +
e.getLocalizedMessage(), e);
+ }
}
public static boolean isRunning()
@@ -83,4 +98,9 @@
return portalServer.getVersion().toString();
}
+
+ public static Portal getPortalManagement()
+ {
+ return portal;
+ }
}
Modified:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -23,7 +23,8 @@
package org.jboss.portal.management;
-import javax.management.ObjectName;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+
import java.util.Map;
/**
@@ -34,5 +35,5 @@
{
void processPortletDiscovery() throws Exception;
- Map<String, ObjectName> getRegisteredPortlets();
+ Map<String, LocalPortletManagementMBean> getRegisteredPortlets();
}
Modified:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-27
15:51:21 UTC (rev 13275)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-27
19:01:13 UTC (rev 13276)
@@ -27,6 +27,7 @@
import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.portlet.management.LocalPortletManagement;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
import org.jboss.portal.portlet.management.PortletContainerManagementInterceptor;
import org.jboss.system.ServiceMBeanSupport;
@@ -45,7 +46,8 @@
private FederatingPortletInvoker federatingPortletInvoker;
- private Map<String, ObjectName> registeredPortlets = new HashMap<String,
ObjectName>();
+ private Map<String, ObjectName> registeredPortletsNames = new HashMap<String,
ObjectName>();
+ private Map<String, LocalPortletManagementMBean> registeredPortlets = new
HashMap<String, LocalPortletManagementMBean>();
public void start()
{
@@ -61,7 +63,7 @@
public void stop()
{
- for (ObjectName objectName : registeredPortlets.values())
+ for (ObjectName objectName : registeredPortletsNames.values())
{
try
{
@@ -72,7 +74,7 @@
e.printStackTrace();
}
}
- if (registeredPortlets.size() != 0)
+ if (registeredPortletsNames.size() != 0)
{
log.error("Unable to remove all the Portlet management MBeans");
}
@@ -109,7 +111,7 @@
}
}
- public Map<String, ObjectName> getRegisteredPortlets()
+ public Map<String, LocalPortletManagementMBean> getRegisteredPortlets()
{
return Collections.unmodifiableMap(registeredPortlets);
}
@@ -120,13 +122,11 @@
{
String portletId = portlet.getContext().getId();
- boolean used = interceptor.getPortletInfo(portletId).isUsed();
- if ((!registeredPortlets.containsKey(portletId)) && (used))
+ if (!registeredPortletsNames.containsKey(portletId))
{
try
{
- ObjectName objectName = createManagementMBean(portlet, wsrp);
- registeredPortlets.put(portletId, objectName);
+ registerPortlet(portlet, wsrp);
}
catch (Exception e)
{
@@ -136,9 +136,9 @@
}
}
- private ObjectName createManagementMBean(Portlet portlet, boolean wsrp) throws
Exception
+ private ObjectName registerPortlet(Portlet portlet, boolean wsrp) throws Exception
{
- Object management;
+ LocalPortletManagementMBean management;
if (wsrp)
{
management = new WSRPPortletManagement(portlet, interceptor);
@@ -150,6 +150,10 @@
String id = portlet.getContext().getId();
ObjectName objectName = new ObjectName(getMBeanName(id, wsrp));
getServer().registerMBean(management, objectName);
+
+ registeredPortletsNames.put(id, objectName);
+ registeredPortlets.put(id, management);
+
log.debug("Registered Management MBean for: " + id);
return objectName;
}