[jboss-svn-commits] JBL Code SVN: r22509 - in labs/jbossesb/workspace/skeagh: commons and 14 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 8 04:38:53 EDT 2008
Author: tfennelly
Date: 2008-09-08 04:38:53 -0400 (Mon, 08 Sep 2008)
New Revision: 22509
Added:
labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/jms/MockMessageListener.java
labs/jbossesb/workspace/skeagh/testutil/
labs/jbossesb/workspace/skeagh/testutil/pom.xml
labs/jbossesb/workspace/skeagh/testutil/src/
labs/jbossesb/workspace/skeagh/testutil/src/main/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/JMSTestRunner.java
labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/package.html
labs/jbossesb/workspace/skeagh/testutil/src/main/java/overview.html
labs/jbossesb/workspace/skeagh/testutil/src/main/resources/
labs/jbossesb/workspace/skeagh/testutil/src/test/
labs/jbossesb/workspace/skeagh/testutil/src/test/java/
labs/jbossesb/workspace/skeagh/testutil/src/test/java/org/
labs/jbossesb/workspace/skeagh/testutil/src/test/java/org/jboss/
labs/jbossesb/workspace/skeagh/testutil/src/test/java/org/jboss/esb/
labs/jbossesb/workspace/skeagh/testutil/src/test/resources/
Removed:
labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/JMSTestRunner.java
labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/MockMessageListener.java
Modified:
labs/jbossesb/workspace/skeagh/commons/pom.xml
labs/jbossesb/workspace/skeagh/pom.xml
Log:
Added the testutil module. Moved the JMSTestRunnder into it
Modified: labs/jbossesb/workspace/skeagh/commons/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/pom.xml 2008-09-08 08:01:54 UTC (rev 22508)
+++ labs/jbossesb/workspace/skeagh/commons/pom.xml 2008-09-08 08:38:53 UTC (rev 22509)
@@ -22,21 +22,13 @@
<scope>provided</scope>
</dependency>
- <!-- Test Dependencies - can we embed JBM for testing ?? -->
<dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>4.1.2</version>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-testutil</artifactId>
+ <version>${jboss.esb.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.1.1.0</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
<repositories>
Added: labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/jms/MockMessageListener.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/jms/MockMessageListener.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/jms/MockMessageListener.java 2008-09-08 08:38:53 UTC (rev 22509)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.jms;
+
+import javax.jms.TextMessage;
+import javax.jms.Message;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Properties;
+
+/**
+ * Mock MessageListener implementation.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+*/
+class MockMessageListener extends AbstractMessageListener {
+
+ public final List<TextMessage> messagesReceived = new ArrayList<TextMessage>();
+
+ protected MockMessageListener(final String destinationName, final Properties jndiProperties, final String messageSelector)
+ {
+ super(destinationName, addMessageSelector(jndiProperties, messageSelector));
+ }
+
+ public void onMessage(Message message)
+ {
+ messagesReceived.add((TextMessage) message);
+ }
+
+ private static Properties addMessageSelector(Properties jndiProperties, String selector)
+ {
+ if(selector != null) {
+ jndiProperties = (Properties) jndiProperties.clone();
+ jndiProperties.setProperty(AbstractMessageListener.MESSAGE_SELECTOR, selector);
+ }
+ return jndiProperties;
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/jms/MockMessageListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/JMSTestRunner.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/JMSTestRunner.java 2008-09-08 08:01:54 UTC (rev 22508)
+++ labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/JMSTestRunner.java 2008-09-08 08:38:53 UTC (rev 22509)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2008, JBoss Inc.
- */
-package org.jboss.esb.jms;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-
-import javax.naming.Context;
-import java.io.File;
-import java.util.Properties;
-
-/**
- * Starts a JMS broker and makes sure it gets shutdown.
- * <p/>
- * Search for usages.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class JMSTestRunner
-{
- private Properties jndiProperties;
- private String providerUrl;
-
- public JMSTestRunner(String providerUrl)
- {
- jndiProperties = new Properties();
- jndiProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getName());
- jndiProperties.setProperty(Context.PROVIDER_URL, providerUrl);
- this.providerUrl = providerUrl;
- }
-
- public Properties getJndiProperties()
- {
- return (Properties) jndiProperties.clone();
- }
-
- public void run() throws Exception
- {
- BrokerService broker = new BrokerService();
-
- // configure the broker
- broker.setDataDirectory(new File("./target/activeMQData"));
- broker.addConnector(providerUrl);
-
- broker.start();
-
- try {
- test();
- } finally {
- broker.stop();
- }
- }
-
- public abstract void test() throws Exception;
-}
Deleted: labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/MockMessageListener.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/MockMessageListener.java 2008-09-08 08:01:54 UTC (rev 22508)
+++ labs/jbossesb/workspace/skeagh/commons/src/test/java/org/jboss/esb/jms/MockMessageListener.java 2008-09-08 08:38:53 UTC (rev 22509)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2008, JBoss Inc.
- */
-package org.jboss.esb.jms;
-
-import javax.jms.TextMessage;
-import javax.jms.Message;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Properties;
-
-/**
- * Mock MessageListener implementation.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-*/
-class MockMessageListener extends AbstractMessageListener {
-
- public final List<TextMessage> messagesReceived = new ArrayList<TextMessage>();
-
- protected MockMessageListener(final String destinationName, final Properties jndiProperties, final String selector)
- {
- super(destinationName, addSelector(jndiProperties, selector));
- }
-
- public void onMessage(Message message)
- {
- messagesReceived.add((TextMessage) message);
- }
-
- private static Properties addSelector(Properties jndiProperties, String selector)
- {
- if(selector != null) {
- jndiProperties = (Properties) jndiProperties.clone();
- jndiProperties.setProperty(AbstractMessageListener.MESSAGE_SELECTOR, selector);
- }
- return jndiProperties;
- }
-}
Modified: labs/jbossesb/workspace/skeagh/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/pom.xml 2008-09-08 08:01:54 UTC (rev 22508)
+++ labs/jbossesb/workspace/skeagh/pom.xml 2008-09-08 08:38:53 UTC (rev 22509)
@@ -18,6 +18,7 @@
</properties>
<modules>
+ <module>testutil</module>
<module>commons</module>
<module>api</module>
<module>runtime</module>
Added: labs/jbossesb/workspace/skeagh/testutil/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/testutil/pom.xml (rev 0)
+++ labs/jbossesb/workspace/skeagh/testutil/pom.xml 2008-09-08 08:38:53 UTC (rev 22509)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>5.0-SNAPSHOT</version>
+ </parent>
+ <name>JBoss ESB Test Utilities</name>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-testutil</artifactId>
+ <version>${jboss.esb.version}</version>
+ <url>http://www.jboss.org/jbossesb/</url>
+
+ <dependencies>
+
+ <!-- Test Dependencies - can we embed JBM for testing ?? -->
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>4.1.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.1.0</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/testutil/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/JMSTestRunner.java
===================================================================
--- labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/JMSTestRunner.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/JMSTestRunner.java 2008-09-08 08:38:53 UTC (rev 22509)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.jms;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
+
+import javax.naming.Context;
+import java.io.File;
+import java.util.Properties;
+
+/**
+ * Starts a JMS broker and makes sure it gets shutdown.
+ * <p/>
+ * Search for usages.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class JMSTestRunner
+{
+ private Properties jndiProperties;
+ private String providerUrl;
+
+ public JMSTestRunner(String providerUrl)
+ {
+ jndiProperties = new Properties();
+ jndiProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getName());
+ jndiProperties.setProperty(Context.PROVIDER_URL, providerUrl);
+ this.providerUrl = providerUrl;
+ }
+
+ public Properties getJndiProperties()
+ {
+ return (Properties) jndiProperties.clone();
+ }
+
+ public void run() throws Exception
+ {
+ BrokerService broker = new BrokerService();
+
+ // configure the broker
+ broker.setDataDirectory(new File("./target/activeMQData"));
+ broker.addConnector(providerUrl);
+
+ broker.start();
+
+ try {
+ test();
+ } finally {
+ broker.stop();
+ }
+ }
+
+ public abstract void test() throws Exception;
+}
Property changes on: labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/JMSTestRunner.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/testutil/src/main/java/org/jboss/esb/jms/package.html 2008-09-08 08:38:53 UTC (rev 22509)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JMS test utilities.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Added: labs/jbossesb/workspace/skeagh/testutil/src/main/java/overview.html
===================================================================
--- labs/jbossesb/workspace/skeagh/testutil/src/main/java/overview.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/testutil/src/main/java/overview.html 2008-09-08 08:38:53 UTC (rev 22509)
@@ -0,0 +1,9 @@
+<html>
+<head></head>
+<body>
+JBoss ESB test utilities.
+
+<h1>Overview</h1>
+Commonss code used across many ESB modules - utility code etc.
+</body>
+</html>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list