[jboss-cvs] JBossAS SVN: r90385 - in branches/Branch_5_x: testsuite/imports/sections and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 18 03:14:33 EDT 2009
Author: ALRubinger
Date: 2009-06-18 03:14:33 -0400 (Thu, 18 Jun 2009)
New Revision: 90385
Added:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ejb3/TestLoggingMDB.java
branches/Branch_5_x/testsuite/src/resources/profileservice/testEjb3MetricsQueue-service.xml
Modified:
branches/Branch_5_x/component-matrix/pom.xml
branches/Branch_5_x/testsuite/imports/sections/profileservice.xml
branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/Ejb3MetricsUnitTestCase.java
Log:
[JBAS-6624] Upgraded to most recent EJB3 metrics-deployer alpha, added MDB metrics tests, removed entity metrics tests
Modified: branches/Branch_5_x/component-matrix/pom.xml
===================================================================
--- branches/Branch_5_x/component-matrix/pom.xml 2009-06-18 07:07:29 UTC (rev 90384)
+++ branches/Branch_5_x/component-matrix/pom.xml 2009-06-18 07:14:33 UTC (rev 90385)
@@ -76,7 +76,7 @@
<version.org.jboss.ejb3.proxy.spi.client>1.0.0</version.org.jboss.ejb3.proxy.spi.client>
<version.org.jboss.ejb3.proxy.clustered.client>1.0.1</version.org.jboss.ejb3.proxy.clustered.client>
<version.org.jboss.ejb3.security.client>1.0.0</version.org.jboss.ejb3.security.client>
- <version.org.jboss.ejb3>1.1.8-alpha-2</version.org.jboss.ejb3>
+ <version.org.jboss.ejb3>1.1.8-alpha-3</version.org.jboss.ejb3>
<version.org.jboss.ejb3.endpoint.deployer>0.1.4</version.org.jboss.ejb3.endpoint.deployer>
<version.org.jboss.integration>5.1.0.SP1</version.org.jboss.integration>
<version.org.jboss.jbossxb>2.0.1.GA</version.org.jboss.jbossxb>
Modified: branches/Branch_5_x/testsuite/imports/sections/profileservice.xml
===================================================================
--- branches/Branch_5_x/testsuite/imports/sections/profileservice.xml 2009-06-18 07:07:29 UTC (rev 90384)
+++ branches/Branch_5_x/testsuite/imports/sections/profileservice.xml 2009-06-18 07:14:33 UTC (rev 90385)
@@ -32,6 +32,9 @@
<fileset dir="${build.classes}">
<include name="org/jboss/test/profileservice/test/ejb3/**"/>
</fileset>
+ <fileset dir="${build.resources}/profileservice/">
+ <include name="testEjb3MetricsQueue-service.xml"/>
+ </fileset>
</jar>
<!-- build testSarDeployment.sar -->
<jar destfile="${build.lib}/testSarDeployment.sar">
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/Ejb3MetricsUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/Ejb3MetricsUnitTestCase.java 2009-06-18 07:07:29 UTC (rev 90384)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/Ejb3MetricsUnitTestCase.java 2009-06-18 07:14:33 UTC (rev 90385)
@@ -38,6 +38,7 @@
import org.jboss.managed.api.ManagedProperty;
import org.jboss.metatype.api.values.CompositeValue;
import org.jboss.metatype.api.values.SimpleValue;
+import org.jboss.test.profileservice.test.ejb3.TestLoggingMDB;
import org.jboss.test.profileservice.test.ejb3.TestStatefulBean;
import org.jboss.test.profileservice.test.ejb3.TestStatelessBean;
@@ -78,11 +79,6 @@
* Component subtype for Message-Driven Beans
*/
private static final String COMPONENT_SUBTYPE_MESSAGE_DRIVEN = "MessageDriven";
-
- /**
- * Component subtype for Entity Beans
- */
- private static final String COMPONENT_SUBTYPE_ENTITY = "Entity";
/**
* Properties which should be exposed by SLSB MOs.
@@ -120,17 +116,6 @@
};
/**
- * Properties which should be exposed by Entity Bean MOs.
- */
- private static final String[] PROPERTY_NAMES_ENTITY = new String[]
- {
- // general EJB metrics
- "name", "invocationStats",
- // entity bean specific metrics
- "availableCount", "createCount", "currentSize", "removeCount", "maxSize"
- };
-
- /**
* Operations which should be exposed by SLSB MOs
*/
private static final String[] OPERATION_NAMES_SLSB = new String[]
@@ -149,12 +134,6 @@
{"resetInvocationStats", "startDelivery", "stopDelivery"};
/**
- * Operations which should be exposed by Entity Bean MOs
- */
- private static final String[] OPERATION_NAMES_ENTITY = new String[]
- {"resetInvocationStats"};
-
- /**
* The name of the test JAR to deploy
*/
private static final String NAME_TEST_JAR = "testEjb3xMetrics.jar";
@@ -312,7 +291,7 @@
this.getLog().info("testMdb");
// Ensure component exists.
- final String ejbName = "FooBarMDB";
+ final String ejbName = TestLoggingMDB.class.getSimpleName();
final String componentName = ejbName;
final ManagedComponent component = this.getManagedComponent(COMPONENT_SUBTYPE_MESSAGE_DRIVEN, componentName);
@@ -322,28 +301,6 @@
validateInvocationStats(component);
}
-
- /**
- * Ensures that MOs with the correct metrics and operations are exposed for Entity Beans.
- *
- * @throws Exception
- */
- public void testEntityBean() throws Exception
- {
- // Log
- this.getLog().info("testEntityBean");
-
- // Ensure component exists.
- final String ejbName = "FooBarEntityBean";
- final String componentName = ejbName;
- final ManagedComponent component = this.getManagedComponent(COMPONENT_SUBTYPE_ENTITY, componentName);
-
- // Check component has expected props and ops.
- this.ensureManagementPropertiesExposed(component, PROPERTY_NAMES_ENTITY);
- this.ensureManagementOperationsExposed(component, OPERATION_NAMES_ENTITY);
-
- validateInvocationStats(component);
- }
// ---------------------------------------------------------------------------------------||
// Internal Helper Methods ---------------------------------------------------------------||
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ejb3/TestLoggingMDB.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ejb3/TestLoggingMDB.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ejb3/TestLoggingMDB.java 2009-06-18 07:14:33 UTC (rev 90385)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.profileservice.test.ejb3;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import org.jboss.ejb3.annotation.Depends;
+import org.jboss.logging.Logger;
+
+/**
+ * TestLoggingMDB
+ *
+ * Message-Driven Bean used in testing of the EJB3 Metrics exposure
+ * via the Profile Service @ManagementObjects
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at MessageDriven(activationConfig =
+{@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ejb3MetricsTestQueue")})
+ at Depends("jboss.mq.destination:service=Queue,name=ejb3MetricsTestQueue")
+public class TestLoggingMDB implements MessageListener
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(TestLoggingMDB.class);
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
+ */
+ public void onMessage(final Message message)
+ {
+ // Just log
+ log.info("Received message: " + message);
+ }
+
+}
Added: branches/Branch_5_x/testsuite/src/resources/profileservice/testEjb3MetricsQueue-service.xml
===================================================================
--- branches/Branch_5_x/testsuite/src/resources/profileservice/testEjb3MetricsQueue-service.xml (rev 0)
+++ branches/Branch_5_x/testsuite/src/resources/profileservice/testEjb3MetricsQueue-service.xml 2009-06-18 07:14:33 UTC (rev 90385)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=ejb3MetricsTestQueue">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+
+</server>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list