Author: thomas.diesler(a)jboss.com
Date: 2007-08-08 08:02:42 -0400 (Wed, 08 Aug 2007)
New Revision: 4250
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointMetricsFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java
Modified:
container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml
Log:
Add EndpointMetricsFactory
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml 2007-08-08
11:12:46 UTC (rev 4249)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml 2007-08-08
12:02:42 UTC (rev 4250)
@@ -151,7 +151,7 @@
</bean>
<bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
- <property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
+ <property name="provides">EndpointMetrics</property>
</bean>
<bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
@@ -199,7 +199,6 @@
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss40.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss40.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter"
class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
@@ -219,7 +218,10 @@
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
@@ -232,10 +234,7 @@
<property name="sortAspectsOnCreate">false</property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
- <inject bean="WSEndpointMetricsDeploymentAspect"/>
- <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSRuntimeLoaderDeploymentAspect"/>
</set>
Modified: container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml 2007-08-08
11:12:46 UTC (rev 4249)
+++ container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml 2007-08-08
12:02:42 UTC (rev 4250)
@@ -163,7 +163,7 @@
</bean>
<bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
- <property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
+ <property name="provides">EndpointMetrics</property>
</bean>
<bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
@@ -211,7 +211,6 @@
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.container.jboss42.DefaultWebAppDesciptorModifierImpl"/>
@@ -229,7 +228,10 @@
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
@@ -242,10 +244,7 @@
<property name="sortAspectsOnCreate">false</property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
- <inject bean="WSEndpointMetricsDeploymentAspect"/>
- <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSRuntimeLoaderDeploymentAspect"/>
</set>
Modified:
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-08-08
11:12:46 UTC (rev 4249)
+++
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-08-08
12:02:42 UTC (rev 4250)
@@ -229,7 +229,7 @@
</bean>
<bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
- <property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
+ <property name="provides">EndpointMetrics</property>
</bean>
<bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
@@ -270,7 +270,6 @@
</bean>
<!-- Deployment aspect helper beans -->
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.container.jboss50.DefaultWebAppDesciptorModifierImpl"/>
@@ -288,7 +287,10 @@
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
@@ -301,10 +303,7 @@
<property name="sortAspectsOnCreate">false</property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
- <inject bean="WSEndpointMetricsDeploymentAspect"/>
- <inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSRuntimeLoaderDeploymentAspect"/>
</set>
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-08
11:12:46 UTC (rev 4249)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-08
12:02:42 UTC (rev 4250)
@@ -28,6 +28,7 @@
import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
+import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
import org.jboss.wsf.spi.SPIProvider;
@@ -43,6 +44,7 @@
import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
@@ -87,6 +89,10 @@
{
returnType = (T)loadService(spiType,
DefaultDeploymentModelFactory.class.getName());
}
+ else if (EndpointMetricsFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType,
DefaultEndpointMetricsFactory.class.getName());
+ }
else if (HttpContextFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType,
DefaultHttpContextFactory.class.getName());
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java 2007-08-08
11:12:46 UTC (rev 4249)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java 2007-08-08
12:02:42 UTC (rev 4250)
@@ -23,7 +23,10 @@
//$Id$
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -36,18 +39,14 @@
*/
public class EndpointMetricsDeploymentAspect extends DeploymentAspect
{
- private EndpointMetrics metrics;
-
- public void setEndpointMetrics(EndpointMetrics metrics)
- {
- this.metrics = metrics;
- }
-
@Override
public void create(Deployment dep)
{
+ SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
+ EndpointMetricsFactory factory = provider.getSPI(EndpointMetricsFactory.class);
for (Endpoint ep : dep.getService().getEndpoints())
{
+ EndpointMetrics metrics = factory.newEndpointMetrics();
ep.setEndpointMetrics(metrics);
}
}
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointMetricsFactory.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointMetricsFactory.java
(rev 0)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointMetricsFactory.java 2007-08-08
12:02:42 UTC (rev 4250)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.wsf.framework.management;
+
+// $Id: EndpointMetricsImpl.java 4023 2007-07-28 07:14:06Z thomas.diesler(a)jboss.com $
+
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
+
+/**
+ * Endpoint Metrics factory
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-Aug-2007
+ */
+public class DefaultEndpointMetricsFactory extends EndpointMetricsFactory
+{
+ @Override
+ public EndpointMetrics newEndpointMetrics()
+ {
+ return new EndpointMetricsImpl();
+ }
+}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2007-08-08
11:12:46 UTC (rev 4249)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2007-08-08
12:02:42 UTC (rev 4250)
@@ -1,5 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.wsf.spi.management;
+//$Id: EndpointMetricsDeploymentAspect.java 3959 2007-07-20 14:44:19Z
heiko.braun(a)jboss.com $
+
import java.util.Date;
import org.jboss.wsf.spi.deployment.Endpoint;
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java
(rev 0)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java 2007-08-08
12:02:42 UTC (rev 4250)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.wsf.spi.management;
+
+//$Id: EndpointMetricsDeploymentAspect.java 3959 2007-07-20 14:44:19Z
heiko.braun(a)jboss.com $
+
+public abstract class EndpointMetricsFactory
+{
+ public abstract EndpointMetrics newEndpointMetrics();
+}
\ No newline at end of file
Modified: stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml
===================================================================
--- stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml 2007-08-08 11:12:46 UTC
(rev 4249)
+++ stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml 2007-08-08 12:02:42 UTC
(rev 4250)
@@ -41,11 +41,6 @@
</property>
</bean>
- <bean name="WSCXFEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
- <property name="requires">ContainerEndpointHandler</property>
- <property name="provides">StackEndpointHandler</property>
- </bean>
-
<bean name="WSCXFDescriptorDeploymentAspect"
class="org.jboss.wsf.stack.xfire.DescriptorDeploymentAspect">
<property name="requires">EndpointAddress</property>
<property name="provides">StackDescriptor</property>
@@ -53,6 +48,11 @@
<property
name="invokerJSE">org.jboss.wsf.stack.xfire.InvokerJSE</property>
</bean>
+ <bean name="WSCXFEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerEndpointHandler</property>
+ <property name="provides">StackEndpointHandler</property>
+ </bean>
+
<!-- Deployment aspect installers -->
<!-- Phase 2 -->