Author: chris.laprun(a)jboss.com
Date: 2009-05-06 13:25:19 -0400 (Wed, 06 May 2009)
New Revision: 13312
Removed:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/WSRPPortletManagement.java
Modified:
modules/jopr-plugin/trunk/build/pom.xml
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/PortletDiscoveryService.java
Log:
- Use 1.1.2.GA version of RHQ for now...
- Improved naming of plugin and server.
- Improved error handling if a portlet couldn't be registered.
- Removed WSRPPortletManagement as it wasn't useful (and was causing issues,
actually).
Modified: modules/jopr-plugin/trunk/build/pom.xml
===================================================================
--- modules/jopr-plugin/trunk/build/pom.xml 2009-05-06 16:34:43 UTC (rev 13311)
+++ modules/jopr-plugin/trunk/build/pom.xml 2009-05-06 17:25:19 UTC (rev 13312)
@@ -1,4 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
<!--
This pom functions as a default configuration. The subproject
poms each inherit configuration from this one.
@@ -26,7 +49,7 @@
<!--All artifacts versions should be defined here-->
<properties>
<version.commons.logging>1.1</version.commons.logging>
- <version.rhq>1.2.0.Beta1</version.rhq>
+ <version.rhq>1.1.2.GA</version.rhq>
<version.portal>2.7.1.GA</version.portal>
<version.portlet>trunk-SNAPSHOT</version.portlet>
<version.jboss>4.2.3.GA</version.jboss>
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-05-06
16:34:43 UTC (rev 13311)
+++ modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-05-06
17:25:19 UTC (rev 13312)
@@ -22,15 +22,15 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<plugin name="portal-jopr-plugin"
- displayName="JBossPortalPlugin"
+<plugin name="JBossPortal"
+ displayName="JBoss Portal Plugin"
package="org.jboss.portal.jopr"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
- <server name="portal-jopr-plugin"
+ <server name="JBoss Portal"
discovery="PortalDiscovery"
class="PortalComponent"
singleton="true">
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-05-06
16:34:43 UTC (rev 13311)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-05-06
17:25:19 UTC (rev 13312)
@@ -130,7 +130,8 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ log.info("Couldn't register " + (wsrp ? "WSRP " :
"") + portletId + " portlet. Cause: " + e.getLocalizedMessage());
+ log.debug(e);
}
}
}
@@ -139,14 +140,7 @@
private ObjectName registerPortlet(Portlet portlet, boolean wsrp) throws Exception
{
LocalPortletManagementMBean management;
- if (wsrp)
- {
- management = new WSRPPortletManagement(portlet, interceptor);
- }
- else
- {
- management = new LocalPortletManagement(portlet, interceptor);
- }
+ management = new LocalPortletManagement(portlet, interceptor);
String id = portlet.getContext().getId();
ObjectName objectName = new ObjectName(getMBeanName(id, wsrp));
getServer().registerMBean(management, objectName);
Deleted:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/WSRPPortletManagement.java
===================================================================
---
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/WSRPPortletManagement.java 2009-05-06
16:34:43 UTC (rev 13311)
+++
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/WSRPPortletManagement.java 2009-05-06
17:25:19 UTC (rev 13312)
@@ -1,88 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.management;
-
-import org.jboss.portal.portlet.Portlet;
-import org.jboss.portal.portlet.management.PortletContainerManagementInterceptor;
-
-/**
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- * @version $Revision: 8784 $
- */
-public class WSRPPortletManagement implements
org.jboss.portal.portlet.management.LocalPortletManagementMBean
-{
- private Portlet portlet;
-
- private PortletContainerManagementInterceptor interceptor;
-
- public WSRPPortletManagement(Portlet portlet, PortletContainerManagementInterceptor
interceptor)
- {
- this.portlet = portlet;
- this.interceptor = interceptor;
- }
-
- public String getId()
- {
- return portlet.getContext().getId();
- }
-
- public float getAverageRenderTime()
- {
- return interceptor.getPortletInfo(getId()).getAverageRenderTime();
- }
-
- public float getAverageActionTime()
- {
- return interceptor.getPortletInfo(getId()).getAverageActionTime();
- }
-
- public long getMaxRenderTime()
- {
- return interceptor.getPortletInfo(getId()).getMaxRenderTime();
- }
-
- public long getMaxActionTime()
- {
- return interceptor.getPortletInfo(getId()).getMaxActionTime();
- }
-
- public long getRenderRequestCount()
- {
- return interceptor.getPortletInfo(getId()).getRenderRequestCount();
- }
-
- public long getActionRequestCount()
- {
- return interceptor.getPortletInfo(getId()).getActionRequestCount();
- }
-
- public long getActionErrorCount()
- {
- return interceptor.getPortletInfo(getId()).getActionErrorCount();
- }
-
- public long getRenderErrorCount()
- {
- return interceptor.getPortletInfo(getId()).getRenderErrorCount();
- }
-}