[jboss-svn-commits] JBL Code SVN: r24109 - in labs/jbossesb/workspace/skeagh: api/src/main/java/org/jboss/esb/api/exception and 49 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Nov 26 13:37:08 EST 2008
Author: tfennelly
Date: 2008-11-26 13:37:08 -0500 (Wed, 26 Nov 2008)
New Revision: 24109
Added:
labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusProvider.java
labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/exception/DeploymentException.java
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/pom.xml
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/JmsBusProviderActivator.java
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/package.html
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/jmsbus.properties
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/java/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/java/org/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/java/org/jboss/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/java/org/jboss/esb/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/java/org/jboss/esb/osgi/
labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/test/resources/
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentActivator.java
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/AbstractBusProviderActivator.java
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/package.html
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiConfigUtil.java
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiPropertyTokenReplacer.java
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/package.html
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JMSBus.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsBusProvider.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/util/JmsConstants.java
Removed:
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/EsbServiceDeploymentActivator.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsConstants.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/bus/
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentException.java
Modified:
labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java
labs/jbossesb/workspace/skeagh/container/microcontainer/
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
labs/jbossesb/workspace/skeagh/container/osgi/pom.xml
labs/jbossesb/workspace/skeagh/container/osgi/runtime/pom.xml
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentRegistry.java
labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html
labs/jbossesb/workspace/skeagh/examples/jms-router/esb-jms-router/pom.xml
labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/jbossesb-default.properties
labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileInboundRouterTest.java
labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileOutboundRouterTest.java
labs/jbossesb/workspace/skeagh/routing/jms/pom.xml
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsOutboundRouter.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/EsbMessageComposerImpl.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/JmsMessageComposerImpl.java
labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/package.html
labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsOutboundRouterTest.java
labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/bus/JMSBus_Standalone_Test.java
labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/EsbMessageComposerImplTest.java
labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/JmsMessageComposerImplTest.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/Deployable.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentUtil.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigUtil.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DeploymentUnit.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/PropertiesUtil.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/FilterDecisionTreeBuilder.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/BusMediator.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusFactory.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceRouter.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java
labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/jbossesb-default.properties
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/InboundFilterConfigTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/OutboundFilterConfigTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/digest/ConfigUtilTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/lifecycle/BasicTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/dispatch/LocalDispatcherTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/notify/DeploymentDetailsNotificationTest.java
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/schedule/ScheduleListenerTest.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2182
Modified: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -27,7 +27,7 @@
* JBoss ESB Bus definition.
* <p/>
* Implementations of this interface act as the interface to a specific
- * message aware Bus implementation, for the local deployment.
+ * message aware Bus implementation, for the a single deployment.
* <p/>
* Note the use of the word "interface". A {@link Bus} instance is <u>not</u> an instance of the physical Bus,
* but just an "interface" to a Bus. There would typically be just a single instance of
Added: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusProvider.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusProvider.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusProvider.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.api.bus;
+
+import org.jboss.esb.api.routing.RoutingException;
+
+import java.util.Properties;
+
+/**
+ * {@link Bus} Provider interface.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface BusProvider
+{
+ /**
+ * Get a new {@link Bus} instance to the underlying Bus.
+ * <p/>
+ * <b>Note</b> that the returned instance is just an interface to a physical
+ * bus (e.g. JMS Queue). See the {@link Bus} interface javadocs.
+ *
+ * @return A {@link Bus} interface instance to the underlying Bus.
+ * @throws RoutingException Unable to create instance.
+ */
+ Bus newBusInstance() throws RoutingException;
+
+ /**
+ * Get Bus properties.
+ *
+ * @return Bus properties.
+ */
+ Properties getProperties();
+}
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/exception/DeploymentException.java (from rev 24051, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentException.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/exception/DeploymentException.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/exception/DeploymentException.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.api.exception;
+
+/**
+ * ESB Deployment Exception.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DeploymentException extends JBossESBException
+{
+ /**
+ * Public Constructor.
+ *
+ * @param message Exception message.
+ */
+ public DeploymentException(final String message)
+ {
+ super(message);
+ }
+
+ /**
+ * Public Constructor.
+ *
+ * @param message Exception message.
+ * @param cause Exception cause.
+ */
+ public DeploymentException(final String message, final Throwable cause)
+ {
+ super(message, cause);
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/exception/DeploymentException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: labs/jbossesb/workspace/skeagh/container/microcontainer
___________________________________________________________________
Name: svn:ignore
+ *.iml
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,10 +20,6 @@
*/
package org.jboss.esb.microcontainer.deployers;
-import java.io.IOException;
-import java.net.URL;
-import java.util.concurrent.ConcurrentHashMap;
-
import org.apache.log4j.Logger;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
@@ -33,6 +29,10 @@
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.microcontainer.config.DeploymentUnitResourceLocator;
+import java.io.IOException;
+import java.net.URL;
+import java.util.concurrent.ConcurrentHashMap;
+
/**
* EsbDeployer takes care of the deployment of an esb archive or a single jboss-esb.xml
* configuration file.
@@ -82,7 +82,7 @@
runtime.deploy();
runtimes.putIfAbsent(deploymentName, runtime);
}
- catch (org.jboss.esb.deploy.DeploymentException e)
+ catch (org.jboss.esb.api.exception.DeploymentException e)
{
throw new DeploymentException(e.getMessage(), e);
}
@@ -110,7 +110,7 @@
log.info("Undeploying '" + deploymentName + "'");
runtime.undeploy();
}
- catch (final org.jboss.esb.deploy.DeploymentException e)
+ catch (final org.jboss.esb.api.exception.DeploymentException e)
{
log.error("DeploymentException while trying to undeploy '" + deploymentName + "' : ", e);
}
@@ -121,7 +121,7 @@
}
}
- private DeploymentRuntime createRuntime(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData, final String deploymentName) throws org.jboss.esb.deploy.DeploymentException, IOException
+ private DeploymentRuntime createRuntime(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData, final String deploymentName) throws org.jboss.esb.api.exception.DeploymentException, IOException
{
final ResourceLocator resourceLocator = new DeploymentUnitResourceLocator(deploymentUnit.getClassLoader());
final URL esbConfigURL = esbMetaData.getFileURL();
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus
___________________________________________________________________
Name: svn:ignore
+ *.iml
Added: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/pom.xml (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/pom.xml 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,53 @@
+<?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-osgi</artifactId>
+ <version>5.0-SNAPSHOT</version>
+ </parent>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-osgi-jmsbus</artifactId>
+ <packaging>bundle</packaging>
+ <version>${jboss.esb.version}</version>
+ <name>JBoss ESB OSGi JMS Bus Service</name>
+ <url>http://www.jboss.org/jbossesb/</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-osgi-runtime</artifactId>
+ <version>${jboss.esb.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-routing-jms</artifactId>
+ <version>${jboss.esb.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Private-Package>org.jboss.esb.osgi.jmsbus</Private-Package>
+ <Import-Package>org.jboss.esb.osgi.bus,org.jboss.esb.jms,org.jboss.esb.api.*, *;resolution:=optional</Import-Package> <!-- TODO: Replace global import with explicit package imports? -->
+ <Bundle-Activator>org.jboss.esb.osgi.jmsbus.JmsBusProviderActivator</Bundle-Activator>
+ <Embed-Dependency>jbossesb-commons, commons-logging, log4j</Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/JmsBusProviderActivator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/JmsBusProviderActivator.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/JmsBusProviderActivator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.osgi.jmsbus;
+
+import org.jboss.esb.api.bus.BusProvider;
+import org.jboss.esb.jms.JmsBusProvider;
+import org.jboss.esb.osgi.bus.AbstractBusProviderActivator;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+/**
+ * {@link JmsBusProvider} OSGi Activator.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JmsBusProviderActivator extends AbstractBusProviderActivator
+{
+
+ /**
+ * Start the JMS {@link BusProvider} Service.
+ *
+ * @param bundleContext The bundle context.
+ * @throws Exception
+ */
+ public void start(final BundleContext bundleContext) throws Exception
+ {
+ Properties busProperties = loadBusConfiguration("jmsbus.properties", bundleContext);
+ BusProvider busProvider = new JmsBusProvider(busProperties);
+
+ registerBusProviderService(busProvider, bundleContext);
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/JmsBusProviderActivator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/java/org/jboss/esb/osgi/jmsbus/package.html 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB JMS Bus Service for OSGi.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Added: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/jmsbus.properties
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/jmsbus.properties (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/jmsbus.properties 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,15 @@
+###########################################################################################
+# JMS bus config.
+##########################################################################################
+
+# JNDI Settings...
+java.naming.factory.initial=${env.java.naming.factory.initial}
+java.naming.provider.url=${emv.java.naming.provider.url}
+
+# Bus Queues and Topics...
+deployment.coordintation.topic=jbossesb.deployment.coordintation.topic
+deployment.bus.queue=jbossesb.jms.bus
+
+# ActiveMQ Queue and Topic deployments...
+topic.jbossesb.deployment.coordintation.topic=jbossesb.deployment.coordintation.topic
+queue.jbossesb.jms.bus=jbossesb.jms.bus
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/jmsbus/src/main/resources/META-INF/jbossesb/jmsbus.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: labs/jbossesb/workspace/skeagh/container/osgi/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/pom.xml 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/osgi/pom.xml 2008-11-26 18:37:08 UTC (rev 24109)
@@ -16,6 +16,7 @@
<modules>
<module>runtime</module>
+ <module>jmsbus</module>
</modules>
<dependencies>
Modified: labs/jbossesb/workspace/skeagh/container/osgi/runtime/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/pom.xml 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/pom.xml 2008-11-26 18:37:08 UTC (rev 24109)
@@ -23,11 +23,11 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Export-Package>org.jboss.esb.schedule,org.jboss.esb.invoke</Export-Package>
+ <Export-Package>org.jboss.esb.schedule,org.jboss.esb.invoke,org.jboss.esb.osgi.bus,org.jboss.esb.osgi.config</Export-Package>
<Private-Package>org.jboss.esb.osgi</Private-Package>
<Import-Package>org.jboss.esb.api.*, *;resolution:=optional</Import-Package> <!-- TODO: Replace global import with explicit package imports? -->
- <Bundle-Activator>org.jboss.esb.osgi.EsbServiceDeploymentActivator</Bundle-Activator>
- <Embed-Dependency>quartz, xpp3_min, xstream, freemarker, jbossesb-commons, jbossesb-rt, mvel, milyn-commons, milyn-smooks-core, milyn-smooks-javabean, commons-lang, commons-logging, log4j</Embed-Dependency>
+ <Bundle-Activator>org.jboss.esb.osgi.DeploymentActivator</Bundle-Activator>
+ <Embed-Dependency>quartz, xpp3_min, xstream, freemarker, jbossesb-commons, jbossesb-runtime, mvel, milyn-commons, milyn-smooks-core, milyn-smooks-javabean, commons-lang, commons-logging, log4j</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
Copied: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentActivator.java (from rev 24052, labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/EsbServiceDeploymentActivator.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentActivator.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentActivator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors 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.esb.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * ESB OSGi Deployment Activator.
+ * <p/>
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class DeploymentActivator implements BundleActivator, BundleListener
+{
+ /**
+ * Registry that hold the DeploymentRuntimes.
+ */
+ private DeploymentRegistry registry;
+
+ /**
+ * Bus Provider Service Tracker.
+ */
+ private ServiceTracker serviceTracker;
+
+ /**
+ * Starts the bundle.
+ * Will add this instance as a bundle listener, and register any bundles
+ * containing an esb configuration file.
+ *
+ * @param context The bundle context.
+ * @throws Exception If an exception occurs during startup.
+ */
+ public final void start(final BundleContext context) throws Exception
+ {
+ registry = new DeploymentRegistry(context);
+ context.addBundleListener(this);
+
+ registry.scanForESBBundles();
+
+ // Create the ServiceTracker to tracking BusProvider deployments/registrations...
+ //serviceTracker = new ServiceTracker(context, BusProvider.class.getName(), registry.getServiceTrackerCustomizer());
+ //serviceTracker.open();
+ }
+
+ /**
+ * Activation method that will be called by the Service Component Runtime.
+ *
+ * @param cc The ComponentContext.
+ */
+ public final void activate(final ComponentContext cc)
+ {
+ registry.scanForESBBundles();
+ }
+
+ /**
+ * Called when the OSGi Component Runtime notifies about
+ * changed bundles.
+ *
+ * @param event The event that occured. This method only handles STARTED and STOPPED events.
+ */
+ public final void bundleChanged(final BundleEvent event)
+ {
+ switch (event.getType())
+ {
+ case BundleEvent.STARTED:
+ registry.register(event.getBundle());
+ break;
+
+ case BundleEvent.STOPPED:
+ registry.unregister(event.getBundle());
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Stops this bundle.
+ * Will close the underlying registry of DeploymentRuntime, going
+ * through them and undeploying them.
+ *
+ * @param unused The bundle context.
+ * @throws Exception If an exception occurs during startup.
+ */
+ public final void stop(final BundleContext unused) throws Exception
+ {
+ try
+ {
+ if(serviceTracker != null)
+ {
+ serviceTracker.close();
+ }
+ }
+ finally
+ {
+ registry.close();
+ }
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentActivator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentRegistry.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentRegistry.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/DeploymentRegistry.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,17 +1,32 @@
package org.jboss.esb.osgi;
+import org.apache.log4j.Logger;
+import org.jboss.esb.api.bus.Bus;
+import org.jboss.esb.api.bus.BusProvider;
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.deploy.DeploymentUtil;
+import org.jboss.esb.federate.BusMediator;
+import org.jboss.esb.federate.DeploymentCoordinator;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
import java.net.URL;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Dictionary;
import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
-import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.deploy.DeploymentRuntime;
-import org.jboss.esb.deploy.DeploymentUtil;
-import org.osgi.framework.Bundle;
-
/**
- * DeploymentRegistry keeps tracks of deployed runtimes.
+ * DeploymentRegistry keeps track of deployed runtimes.
* <p/>
*
* @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
@@ -20,6 +35,11 @@
public class DeploymentRegistry
{
/**
+ * Logger.
+ */
+ private static Logger logger = Logger.getLogger(DeploymentRegistry.class);
+
+ /**
* Default name of the config file.
*/
private static final String DEFAULT_CONFIG_FILENAME = "/jboss-esb.xml";
@@ -38,20 +58,63 @@
private static final String DEPLOYMENT_NAME_HEADER = "JBossESB-DeploymentName";
/**
- * Set of activated deployments.
+ * The associated bundle context.
*/
- private HashMap<Bundle,DeploymentRuntime> activated = new HashMap<Bundle,DeploymentRuntime>();
+ private BundleContext context;
/**
- * Unregisters the DeploymentRuntime.
+ * Service Tracker Customizer for deployment {@link BusProvider BusProviders}.
+ */
+ private BusProviderCustomizer serviceTrackerCustomizer;
+
+ /**
+ * Set of active deployments.
+ */
+ private Map<Bundle, DeploymentRuntime> activeDeployments = new HashMap<Bundle, DeploymentRuntime>();
+ /**
+ * A map of BusMediator instances.
+ */
+ private Map<BusProvider, List<BusMediator>> mediatorMap = new HashMap<BusProvider, List<BusMediator>>();
+
+ /**
+ * Create DeploymentRegistry.
+ * @param context The associated bundle context.
+ */
+ public DeploymentRegistry(final BundleContext context)
+ {
+ this.context = context;
+ serviceTrackerCustomizer = new BusProviderCustomizer();
+ }
+
+ /**
+ * Get the Service Tracker Customizer for the registry.
+ * @return The Service Tracker Customizer for the registry.
+ */
+ protected final BusProviderCustomizer getServiceTrackerCustomizer()
+ {
+ return serviceTrackerCustomizer;
+ }
+
+ /**
+ * Get the list of active Deployments.
+ * @return The list of active deployments.
+ */
+ private final Collection<DeploymentRuntime> getActiveDeployments()
+ {
+ return Collections.unmodifiableCollection(activeDeployments.values());
+ }
+
+ /**
+ * Deploy and Register a DeploymentRuntime for the supplied bundle if it's
+ * an ESB bundle and is not already deployed.
*
- * @param bundle The bundle to register.
+ * @param bundle The bundle.
*/
public final void register(final Bundle bundle)
{
- synchronized (activated)
+ synchronized (activeDeployments)
{
- if (activated.containsKey(bundle))
+ if (activeDeployments.containsKey(bundle))
{
// already registered. Don't need to do anything
return;
@@ -59,65 +122,92 @@
}
final URL configUrl = getEsbConfigFile(bundle);
- if (configUrl == null)
+ if (configUrl != null)
{
- return;
- }
+ try
+ {
+ DeploymentRuntime runtime = DeploymentUtil.createRuntime(configUrl.openStream(), new BundleResourceLocator(bundle));
+ runtime.setDeploymentName(getDeploymentName(bundle));
+ runtime.deploy();
- try
- {
- //TODO: Use logging service
- System.out.println("Found config : " + configUrl + " for bundle : " + bundle);
- DeploymentRuntime runtime = DeploymentUtil.createRuntime(configUrl.openStream(), new BundleResourceLocator(bundle));
- runtime.setDeploymentName(getDeploymentName(bundle));
- runtime.deploy();
+ synchronized (activeDeployments)
+ {
+ activeDeployments.put(bundle, runtime);
- synchronized (activated)
+ ServiceReference[] busProviderRefs = context.getServiceReferences(BusProvider.class.getName(), null);
+
+ if(busProviderRefs != null)
+ {
+ for(ServiceReference busProviderRef : busProviderRefs)
+ {
+ addBusMediator((BusProvider) context.getService(busProviderRef), runtime);
+ }
+ }
+ }
+ }
+ catch (final Exception e)
{
- activated.put(bundle, runtime);
+ logger.error("Failed to deploy ESB DeploymentRuntime instance.", e);
}
}
- catch (final Throwable t)
- {
- //TODO: add exception handling.
- t.printStackTrace();
- }
}
/**
- * Unregisters the DeploymentRuntime.
+ * Unregister any DeploymentRuntime instance that may be deployed
+ * for the supplied bundle.
*
- * @param bundle the bundle.
+ * @param bundle The bundle.
*/
public final void unregister(final Bundle bundle)
{
- //TODO: Use logging service
- System.out.println("unregister bundle: " + bundle);
- synchronized (activated)
+ synchronized (activeDeployments)
{
- if (!activated.containsKey(bundle))
+ if (!activeDeployments.containsKey(bundle))
{
return;
}
- final DeploymentRuntime deploymentRuntime = activated.get(bundle);
+ final DeploymentRuntime deploymentRuntime = activeDeployments.get(bundle);
try
{
- deploymentRuntime.undeploy();
+ try
+ {
+ removeBusMediators(deploymentRuntime);
+ }
+ finally
+ {
+ deploymentRuntime.undeploy();
+ }
}
- catch (DeploymentException e)
+ catch (Throwable t)
{
- //TODO: Handle exception.
- e.printStackTrace();
+ logger.error("Failed to undeploy ESB DeploymentRuntime instance.", t);
}
finally
{
- activated.remove(bundle);
+ activeDeployments.remove(bundle);
}
}
}
/**
+ * Scan for and deploy ESB Deployment bundles that have not yet been deployed.
+ */
+ protected synchronized void scanForESBBundles()
+ {
+ // get all the currently installed bundles.
+ final Bundle[] bundles = context.getBundles();
+ for (final Bundle bundle : bundles)
+ {
+ if ((bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0)
+ {
+ // register ESB bundle...
+ register(bundle);
+ }
+ }
+ }
+
+ /**
* Gets the Esb configuration file from the bundle.
*
* @param bundle The Bundle being activated.
@@ -126,7 +216,7 @@
*/
private URL getEsbConfigFile(final Bundle bundle)
{
- String configFileName = (String) getHeader(bundle, CONFIG_FILE_HEADER);
+ String configFileName = getHeader(bundle, CONFIG_FILE_HEADER);
if (configFileName == null)
{
configFileName = DEFAULT_CONFIG_FILENAME;
@@ -143,7 +233,7 @@
*/
private String getDeploymentName(final Bundle bundle)
{
- String deploymentName = (String) getHeader(bundle, DEPLOYMENT_NAME_HEADER);
+ String deploymentName = getHeader(bundle, DEPLOYMENT_NAME_HEADER);
if (deploymentName == null)
{
deploymentName = bundle.getSymbolicName();
@@ -169,12 +259,179 @@
*/
public final void close()
{
- Set<Bundle> keySet = activated.keySet();
+ Set<Bundle> keySet = activeDeployments.keySet();
for (Bundle bundle : keySet)
{
unregister(bundle);
}
}
+
+ /**
+ * Get the current list of {@link BusMediator BusMediators} associated
+ * with the supplied {@link BusProvider}.
+ *
+ * @param busProvider The provider instance.
+ * @return The list of mediators
+ */
+ private List<BusMediator> getMediators(final BusProvider busProvider)
+ {
+ List<BusMediator> mediators = mediatorMap.get(busProvider);
+
+ if(mediators == null)
+ {
+ // Do not change the list type here from CopyOnWriteArrayList or
+ // concurrent mod exceptions will occur on undeploys...
+ mediators = new CopyOnWriteArrayList<BusMediator>();
+ mediatorMap.put(busProvider, mediators);
+ }
+
+ return mediators;
+ }
+
+ /**
+ * Add a {@link BusMediator} for the specified {@link BusProvider} and
+ * {@link DeploymentRuntime} combo.
+ *
+ * @param busProvider The Bus Provider.
+ * @param deploymentRuntime The deployment runtime.
+ * @throws org.jboss.esb.api.routing.RoutingException Unable to add a mediator instance.
+ * @throws DeploymentException
+ */
+ private void addBusMediator(final BusProvider busProvider, final DeploymentRuntime deploymentRuntime) throws RoutingException, DeploymentException
+ {
+ Bus bus = busProvider.newBusInstance();
+ BusMediator busMediator = null;
+ boolean added = false;
+
+ try
+ {
+ busMediator = new BusMediator(bus, deploymentRuntime);
+ bus.connect();
+ deploymentRuntime.getDeploymentCoordinator().addBusMediator(busMediator);
+ getMediators(busProvider).add(busMediator);
+ added = true;
+ }
+ finally
+ {
+ if(!added)
+ {
+ logger.error("Failed to connect JBossESB deployment '" + deploymentRuntime.getDeploymentName() + "' to Bus '" + bus.getClass().getName() + "'.");
+ if(busMediator != null)
+ {
+ busMediator.disconnectBus();
+ }
+ }
+ else
+ {
+ logger.debug("Successfully connected JBossESB deployment '" + deploymentRuntime.getDeploymentName() + "' to Bus '" + bus.getClass().getName() + "'.");
+ }
+ }
+ }
+
+ /**
+ * Remove all the {@link BusMediator BusMediators} associated with the
+ * specified {@link DeploymentRuntime}.
+ *
+ * @param deploymentRuntime The {@link DeploymentRuntime}.
+ */
+ private void removeBusMediators(final DeploymentRuntime deploymentRuntime)
+ {
+ DeploymentCoordinator coordinator = deploymentRuntime.getDeploymentCoordinator();
+ Collection<List<BusMediator>> mediators = mediatorMap.values();
+ Iterator<BusMediator> runtimeMediators = coordinator.getBusMediators();
+
+ while(runtimeMediators.hasNext())
+ {
+ BusMediator mediator = runtimeMediators.next();
+ for (List<BusMediator> mediatorList : mediators)
+ {
+ if(mediatorList.remove(mediator))
+ {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Service Tracker Customizer for Bus Provider Services.
+ */
+ private class BusProviderCustomizer implements ServiceTrackerCustomizer
+ {
+
+ /**
+ * {@link BusProvider} added event handler.
+ *
+ * @param serviceReference Service reference.
+ * @return Track Object. This will be supplied to the
+ * {@link #modifiedService(org.osgi.framework.ServiceReference, Object)} and
+ * {@link #removedService(org.osgi.framework.ServiceReference, Object)} methods.
+ */
+ public final Object addingService(final ServiceReference serviceReference)
+ {
+ try
+ {
+ synchronized (activeDeployments)
+ {
+ BusProvider busProvider = (BusProvider) context.getService(serviceReference);
+ Collection<DeploymentRuntime> activeDeployments = getActiveDeployments();
+
+ for (DeploymentRuntime activeDeployment : activeDeployments)
+ {
+ addBusMediator(busProvider, activeDeployment);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ logger.error("Unexpected exception while processing BusProvider service notification.", e);
+ }
+
+ return null;
+ }
+
+ /**
+ * {@link BusProvider} modified event handler.
+ *
+ * @param serviceReference Service reference.
+ * @param object The Object returned by the {@link #addingService(org.osgi.framework.ServiceReference)}
+ * method for the referenced Service instance.
+ */
+ public final void modifiedService(final ServiceReference serviceReference, final Object object)
+ {
+ // TODO: Do we need to do anything here?
+ }
+
+ /**
+ * {@link BusProvider} removed event handler.
+ *
+ * @param serviceReference Service reference.
+ * @param object The Object returned by the {@link #addingService(org.osgi.framework.ServiceReference)}
+ * method for the referenced Service instance.
+ */
+ public final void removedService(final ServiceReference serviceReference, final Object object)
+ {
+ try
+ {
+ synchronized (activeDeployments)
+ {
+ BusProvider busProvider = (BusProvider) context.getService(serviceReference);
+ List<BusMediator> mediators = getMediators(busProvider);
+
+ for (BusMediator mediator : mediators)
+ {
+ mediator.getRuntime().getDeploymentCoordinator().removeBusMediator(mediator);
+ }
+
+ mediatorMap.remove(busProvider);
+ }
+ }
+ catch (Exception e)
+ {
+ logger.error("Unexpected exception while processing BusProvider service notification.", e);
+ }
+ }
+ }
}
Deleted: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/EsbServiceDeploymentActivator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/EsbServiceDeploymentActivator.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/EsbServiceDeploymentActivator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors 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.esb.osgi;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * EsbServiceDeploymentActivator is an OSGi Activator that takes care
- * registering the EsbServiceDeployer service.
- * <p>
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbServiceDeploymentActivator implements BundleActivator, BundleListener
-{
- /**
- * The BundleContext for this listener.
- */
- private BundleContext bundleContext;
-
- /**
- * Registry that hold the DeploymentRuntimes.
- */
- private DeploymentRegistry registry = new DeploymentRegistry();
-
- /**
- * Activation method that will be called by the Service Component Runtime.
- * @param cc The ComponentContext.
- */
- public final void activate(final ComponentContext cc)
- {
- this.bundleContext = cc.getBundleContext();
-
- bundleContext.addBundleListener(this);
-
- // get all the currently installed bundles.
- final Bundle[] bundles = bundleContext.getBundles();
- for (Bundle bundle : bundles)
- {
- if ((bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0)
- {
- // register the bundles that are esb bundles.
- registry.register(bundle);
- }
- }
- }
-
- /**
- * Called when the OSGi Component Runtime notifies about
- * changed bundles.
- *
- * @param event The event that occured. This method only handles STARTED and STOPPED events.
- */
- public final void bundleChanged(final BundleEvent event)
- {
- switch (event.getType())
- {
- case BundleEvent.STARTED:
- registry.register(event.getBundle());
- break;
-
- case BundleEvent.STOPPED:
- registry.unregister(event.getBundle());
- break;
-
- default:
- break;
- }
- }
-
- /**
- * Starts the bundle.
- * Will add this instance as a bundle listener, and register any bundles
- * containing an esb configuration file.
- *
- * @param context The bundle context.
- * @throws Exception If an exception occurs during startup.
- */
- public final void start(final BundleContext context) throws Exception
- {
- this.bundleContext = context;
-
- context.addBundleListener(this);
-
- // get all the currently installed bundles.
- final Bundle[] bundles = context.getBundles();
- for (final Bundle bundle : bundles)
- {
- if ((bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0)
- {
- // register and deploy the bundles that are esb bundles.
- registry.register(bundle);
- }
- }
- }
-
- /**
- * Stops this bundle.
- * Will close the underlying registry of DeploymentRuntime, going
- * through them and undeploying them.
- *
- * @param unused The bundle context.
- * @throws Exception If an exception occurs during startup.
- */
- public final void stop(final BundleContext unused) throws Exception
- {
- registry.close();
- }
-}
Added: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/AbstractBusProviderActivator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/AbstractBusProviderActivator.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/AbstractBusProviderActivator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.osgi.bus;
+
+import org.jboss.esb.api.bus.BusProvider;
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.osgi.config.OsgiConfigUtil;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+/**
+ * Abstract OSGi activator class for JBoss ESB {@link BusProvider}
+ * Services.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class AbstractBusProviderActivator implements BundleActivator
+{
+ /**
+ * Register the supplied JBoss ESB {@link BusProvider} as an OSGi
+ * Service.
+ *
+ * @param busProvider The JBoss ESB {@link BusProvider}.
+ * @param bundleContext The OSGi bundle context.
+ */
+ protected final void registerBusProviderService(final BusProvider busProvider, final BundleContext bundleContext)
+ {
+ bundleContext.registerService(BusProvider.class.getName(), busProvider, null);
+ }
+
+ /**
+ * Stop the JMS {@link org.jboss.esb.api.bus.BusProvider} Service.
+ *
+ * @param bundleContext The bundle context.
+ */
+ public final void stop(final BundleContext bundleContext)
+ {
+ // Nothing to do here. The OSGi will automatically unregister
+ // the BusProvider Service for the JmsBusProvider.
+ }
+
+ /**
+ * Load the Bus configuration.
+ *
+ * @param configPath Configuration path.
+ * @param bundleContext Bundle context.
+ * @return The Bus configuration properties.
+ * @throws org.jboss.esb.api.exception.DeploymentException
+ * Unable to access the bus configuration.
+ * @throws java.io.IOException Error reading the bus configuration.
+ */
+ protected final Properties loadBusConfiguration(final String configPath, final BundleContext bundleContext) throws DeploymentException
+ {
+ return OsgiConfigUtil.getConfiguration(configPath, bundleContext);
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/AbstractBusProviderActivator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/package.html (from rev 24052, labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html)
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/package.html 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB OSGi Bus Provider Activator.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/bus/package.html
___________________________________________________________________
Name: svn:mergeinfo
+
Added: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiConfigUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiConfigUtil.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiConfigUtil.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.osgi.config;
+
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.deploy.config.PropertiesUtil;
+import org.jboss.esb.deploy.config.ConfigUtil;
+import org.jboss.esb.osgi.BundleResourceLocator;
+import org.jboss.esb.properties.ApplicationProperties;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+/**
+ * OSGi Configuration utility.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public final class OsgiConfigUtil
+{
+ /**
+ * Private constructor.
+ */
+ private OsgiConfigUtil()
+ {
+ }
+
+ /**
+ * Get the named configuration form the specified bundle.
+ * @param configPath The configuration path.
+ * @param bundleContext The bundle context.
+ * @return The Properties instance.
+ * @throws DeploymentException Failed to read the properties file.
+ */
+ public static Properties getConfiguration(final String configPath, final BundleContext bundleContext) throws DeploymentException
+ {
+ ApplicationProperties properties = PropertiesUtil.getConfig(configPath, new BundleResourceLocator(bundleContext.getBundle()));
+
+ if(properties == null)
+ {
+ throw new DeploymentException("Failed to load properties file '" + configPath + "' from filesystem (" + ConfigUtil.getFilePath(configPath) + ") or classpath (" + ConfigUtil.getClassPath(configPath) + ").");
+ }
+
+ // Add a token replacer for getting properties from the bundle context...
+ properties.register(new OsgiPropertyTokenReplacer(bundleContext));
+
+ return properties;
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiConfigUtil.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiPropertyTokenReplacer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiPropertyTokenReplacer.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiPropertyTokenReplacer.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.osgi.config;
+
+import org.jboss.esb.properties.TokenReplacer;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Configuration property {@link TokenReplacer} for an OSGi bundle.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OsgiPropertyTokenReplacer implements TokenReplacer
+{
+
+ /**
+ * OSGi bundle context.
+ */
+ private BundleContext bundleContext;
+
+ /**
+ * Public constructor.
+ * @param bundleContext Bundle context.
+ */
+ public OsgiPropertyTokenReplacer(final BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ /**
+ * Get the identifier for the TokenReplacer.
+ *
+ * @return The TokenReplacer's identifier..
+ */
+ public final String getId()
+ {
+ return "osgi";
+ }
+
+ /**
+ * Get the replacement value for the supplied token.
+ *
+ * @param token The name of the token whose replacement is required.
+ * @return The bundle property of that name, or null if the property doesn't exist.
+ */
+ public final String getReplacement(final String token)
+ {
+ return bundleContext.getProperty(token);
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/OsgiPropertyTokenReplacer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/package.html (from rev 24052, labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html)
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/package.html 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB OSGi Bundle Configuration.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/config/package.html
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/container/osgi/runtime/src/main/java/org/jboss/esb/osgi/package.html 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,7 +1,7 @@
<html>
<head></head>
<body>
-OSGi Handling.
+JBoss ESB OSGi Runtime.
<h2>Package Specification</h2>
</body>
Modified: labs/jbossesb/workspace/skeagh/examples/jms-router/esb-jms-router/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/jms-router/esb-jms-router/pom.xml 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/examples/jms-router/esb-jms-router/pom.xml 2008-11-26 18:37:08 UTC (rev 24109)
@@ -24,24 +24,28 @@
<version>1.2.1</version>
</dependency>
- <!-- JBossESB OSGi bundle -->
<dependency>
<groupId>jboss.jbossesb</groupId>
<artifactId>jbossesb-api</artifactId>
<version>${jboss.esb.version}</version>
</dependency>
+
+ <!-- OSGi bundles -->
<dependency>
<groupId>jboss.jbossesb</groupId>
<artifactId>jbossesb-osgi-runtime</artifactId>
<version>${jboss.esb.version}</version>
</dependency>
-
- <!-- JBossESB JMS Routing bundle -->
<dependency>
<groupId>jboss.jbossesb</groupId>
<artifactId>jbossesb-routing-jms</artifactId>
<version>${jboss.esb.version}</version>
</dependency>
+ <dependency>
+ <groupId>jboss.jbossesb</groupId>
+ <artifactId>jbossesb-osgi-jmsbus</artifactId>
+ <version>${jboss.esb.version}</version>
+ </dependency>
</dependencies>
@@ -64,6 +68,11 @@
<artifactId>maven-pax-plugin</artifactId>
<version>1.3</version>
<extensions>true</extensions>
+ <configuration>
+ <org.ops4j.pax.runner.platform.workingDirectory>target</org.ops4j.pax.runner.platform.workingDirectory>
+ <java.naming.factory.initial>org.apache.activemq.jndi.ActiveMQInitialContextFactory</java.naming.factory.initial>
+ <java.naming.provider.url>tcp://localhost:61717</java.naming.provider.url>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
Modified: labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/jbossesb-default.properties
===================================================================
--- labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/jbossesb-default.properties 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/jbossesb-default.properties 2008-11-26 18:37:08 UTC (rev 24109)
@@ -6,7 +6,7 @@
coordinator.heartbeat.frequency=700
# Buses to be deployed...
-bus.jms=org.jboss.esb.jms.bus.JMSBus
+bus.jms=org.jboss.esb.jms.JmsBus
# Pre-installed deployment units...
unit.deadletter=deadletter.xml
Modified: labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileInboundRouterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileInboundRouterTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileInboundRouterTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -33,7 +33,7 @@
import org.jboss.esb.api.exception.ConfigurationException;
import org.jboss.esb.api.message.Message;
import org.jboss.esb.api.routing.MessageDispatcher;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.deploy.config.InboundRouterConfig;
Modified: labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileOutboundRouterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileOutboundRouterTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/file/src/test/java/org/jboss/esb/file/FileOutboundRouterTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -26,10 +26,10 @@
import java.io.IOException;
import org.jboss.esb.api.context.InvocationContext;
import org.jboss.esb.api.exception.ConfigurationException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.api.message.Message;
import org.jboss.esb.api.routing.RoutingException;
import org.jboss.esb.api.service.ServiceName;
-import org.jboss.esb.deploy.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.deploy.config.OutboundRouterConfig;
Modified: labs/jbossesb/workspace/skeagh/routing/jms/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/pom.xml 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/pom.xml 2008-11-26 18:37:08 UTC (rev 24109)
@@ -76,7 +76,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Export-Package>org.jboss.esb.jms.*</Export-Package>
+ <Export-Package>org.jboss.esb.jms</Export-Package>
<Import-Package>*;resolution:=optional</Import-Package> <!-- TODO: Replace global import with explicit package imports? -->
<Embed-Dependency>jbossesb-commons, log4j</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
Copied: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JMSBus.java (from rev 24051, labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/bus/JMSBus.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JMSBus.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JMSBus.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,555 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.log4j.Logger;
+import org.jboss.esb.api.bus.AbstractBus;
+import org.jboss.esb.api.bus.AbstractNotification;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.context.DeploymentContext;
+import org.jboss.esb.api.context.ResourceLocator;
+import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.deploy.DeploymentRuntime;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import java.util.Properties;
+
+/**
+ * ESB Bus implementation for JMS.
+ * <p/>
+ * Acts as the interface to the JMS Bus for a deployment.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JmsBus extends AbstractBus
+{
+ /**
+ * Logger.
+ */
+ private static Logger logger = Logger.getLogger(JmsBus.class);
+ /**
+ * Deployment coordination topic property key name.
+ */
+ public static final String DEPLOYMENT_COORDINTATION_TOPIC_KEY = "deployment.coordintation.topic";
+ /**
+ * Default deployment coordination topic name.
+ */
+ public static final String DEFAULT_DEPLOYMENT_COORDINTATION_TOPIC_NAME = "jbossesb.deployment.coordintation.topic";
+ /**
+ * Deployment JMS Bus Queue name config key.
+ */
+ public static final String BUS_QUEUE_KEY = "deployment.bus.queue";
+ /**
+ * Default Deployment JMS Bus Queue name.
+ */
+ public static final String DEFAULT_BUS_QUEUE_NAME = "jbossesb.jms.bus";
+ /**
+ * Deployment ID key.
+ */
+ public static final String DEPLOYMENT_ID = "jbossesb_deployment_id";
+ /**
+ * Shared JMS Topic Session.
+ */
+ private JMSSession topicSession;
+ /**
+ * Shared JMS Topic Session.
+ */
+ private JMSSession queueSession;
+ /**
+ * JMS Deployment coordination listener.
+ */
+ private JMSCoordinationListener notificationListener;
+ /**
+ * JMS Bus Message Listener.
+ */
+ private JMSQueueMessageListener messageListener;
+ /**
+ * Deployment notification broadcaster.
+ */
+ private MessageSender notificationSender;
+ /**
+ * JMS Bus Message Sender.
+ */
+ private MessageSender messageSender;
+
+ /**
+ * Connect the bus.
+ *
+ * @throws RoutingException Connection exception.
+ */
+ public final void connect() throws RoutingException
+ {
+ assertIsConfigured();
+
+ /*
+ * Need to set the context classloader to this classes classloader. When deployed/included
+ * as an osgi bundle this calls make by this class will involve jndi which uses
+ * the thread context classloader. The application classloader will the the context classloader
+ * for the bundle and will not have the ability to use the bundles classloader to find the
+ * resources is needs.
+ */
+ ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ try
+ {
+ connectJMSSessions(getProperties());
+ }
+ catch (DeploymentException e)
+ {
+ throw new RoutingException("Unable to connect JMS Bus interface for deployment '" + getDeploymentName() + "'.", e);
+ }
+
+ if (topicSession != null && queueSession != null)
+ {
+ try
+ {
+ connectCoordinationListener(getProperties());
+ connectCoordintationSender(getProperties());
+ connectBusListener(getProperties());
+ connectBusSender(getProperties());
+ }
+ catch (DeploymentException e)
+ {
+ try
+ {
+ if (notificationListener == null && notificationSender == null && messageListener == null && messageSender == null)
+ {
+ if (!logger.isDebugEnabled())
+ {
+ logger.info("Deployment '" + getDeploymentName() + "' is not being coordinated with any other deployment. Turn on deug logging for more details.");
+ }
+ else
+ {
+ logger.debug("Deployment '" + getDeploymentName() + "' is not being coordinated with any other deployment.", e);
+ }
+ }
+ else
+ {
+ throw new RoutingException("Unable to connect JMS Bus interface for deployment '" + getDeploymentName() + "'.", e);
+ }
+ }
+ finally
+ {
+ closeJMSSessions();
+ }
+ }
+ catch (Throwable t)
+ {
+ closeJMSSessions();
+ throw new RoutingException("Unable to connect JMS Bus interface for deployment '" + getDeploymentName() + "'.", t);
+ }
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(contextClassLoader);
+ }
+ }
+
+ /**
+ * Is the bus connected.
+ *
+ * @return True if the bus is connected, otherwise false.
+ */
+ public final boolean isConnected()
+ {
+ return (topicSession != null && queueSession != null);
+ }
+
+ /**
+ * Disconnect from the Bus.
+ */
+ public final void disconnect()
+ {
+ try
+ {
+ closeJMSHandler("Deployment Coordination Listener", notificationListener);
+ closeJMSHandler("Deployment Coordination Sender", notificationSender);
+ closeJMSHandler("JMS Bus Listener", messageListener);
+ closeJMSHandler("JMS Bus Sender", messageSender);
+ }
+ finally
+ {
+ closeJMSSessions();
+ }
+ }
+
+ /**
+ * Send the supplied message to the specified deployment via the bus.
+ *
+ * @param message The message.
+ * @param targetDeploymentId The target deployment ID.
+ * @throws RoutingException Error sending message onto the Bus.
+ */
+ public final void sendMessage(final BusMessage message, final String targetDeploymentId) throws RoutingException
+ {
+ try
+ {
+ ObjectMessage jmsMessage = messageSender.getSession().createObjectMessage(message);
+
+ jmsMessage.setStringProperty(DEPLOYMENT_ID, targetDeploymentId);
+ messageSender.send(jmsMessage);
+ }
+ catch (JMSException e)
+ {
+ throw new RoutingException("Error sending message to JMS Bus for deployment ID '" + targetDeploymentId + "'.", e);
+ }
+ }
+
+ /**
+ * Send a notification message onto the Bus.
+ * <p/>
+ * This allows notification messages to be exchanged with other deployments
+ * using the underlying Bus (deployment details, heartbeat, undeploy etc).
+ *
+ * @param notification The notification message to be sent onto the Bus.
+ * @throws RoutingException Error sending notification onto the Bus.
+ */
+ public final void sendNotification(final AbstractNotification notification) throws RoutingException
+ {
+ if (notificationSender != null)
+ {
+ try
+ {
+ notificationSender.send(notificationSender.getSession().createObjectMessage(notification));
+ }
+ catch (JMSException e)
+ {
+ throw new RoutingException("Unable to send deployment notification onto JMS Bus.", e);
+ }
+ }
+ }
+
+ /**
+ * Stop listening for ESB messages on the bus.
+ */
+ public final void stopListening()
+ {
+ closeJMSHandler("JMS Bus Listener", messageListener);
+ messageListener = null;
+ }
+
+ /**
+ * Connect the deployment coordination listener.
+ *
+ * @param busProperties Bus configuration properties.
+ * @throws org.jboss.esb.api.exception.DeploymentException
+ * Failed to connect listener.
+ */
+ private void connectCoordinationListener(final Properties busProperties) throws DeploymentException
+ {
+ String coordinationTopicName = busProperties.getProperty(DEPLOYMENT_COORDINTATION_TOPIC_KEY, DEFAULT_DEPLOYMENT_COORDINTATION_TOPIC_NAME);
+
+ notificationListener = new JMSCoordinationListener(coordinationTopicName, busProperties);
+ try
+ {
+ notificationListener.connect();
+ }
+ catch (JMSException e)
+ {
+ notificationListener = null;
+ throw new DeploymentException("Deployment '" + getDeploymentName() + "' is not being coordinated with any other local deployment. A JMSException occured while trying "
+ + "to connect to the deployment coordination Topic '" + coordinationTopicName + "'. The JMS Server must be running and this Topic must be deployed. "
+ + "JNDI properties used: " + busProperties, e);
+ }
+ }
+
+ /**
+ * Connect the deployment coordination sender.
+ *
+ * @param busProperties Bus configuration properties.
+ * @throws org.jboss.esb.api.exception.DeploymentException
+ * Failed to connect sender.
+ */
+ private void connectCoordintationSender(final Properties busProperties) throws DeploymentException
+ {
+ String coordinationTopicName = busProperties.getProperty(DEPLOYMENT_COORDINTATION_TOPIC_KEY, DEFAULT_DEPLOYMENT_COORDINTATION_TOPIC_NAME);
+
+ notificationSender = new MessageSender(coordinationTopicName, topicSession);
+ try
+ {
+ notificationSender.connect();
+ }
+ catch (JMSException e)
+ {
+ notificationSender = null;
+ throw new DeploymentException("Deployment '" + getDeploymentName() + "' is not being coordinated with any other local deployment. A JMSException occured while trying "
+ + "to connect to the deployment coordination Topic '" + coordinationTopicName + "'. The JMS Server must be running and this Topic must be deployed. "
+ + "JNDI properties used: " + busProperties, e);
+ }
+ }
+
+ /**
+ * Connect the {@link BusMessage} listener.
+ *
+ * @param busProperties Bus configuration properties.
+ * @throws org.jboss.esb.api.exception.DeploymentException
+ * Failed to connect listener.
+ */
+ private void connectBusListener(final Properties busProperties) throws DeploymentException
+ {
+ String busQueueName = busProperties.getProperty(BUS_QUEUE_KEY, DEFAULT_BUS_QUEUE_NAME);
+
+ messageListener = new JMSQueueMessageListener(busQueueName, busProperties);
+ try
+ {
+ messageListener.connect();
+ }
+ catch (JMSException e)
+ {
+ messageListener = null;
+ throw new DeploymentException("Deployment '" + getDeploymentName() + "' is not being coordinated with any other local deployment. A JMSException occured while trying "
+ + "to connect to the JMS Bus Queue '" + busQueueName + "'. The JMS Server must be running and this Queue must be deployed. "
+ + "JNDI properties used: " + busProperties, e);
+ }
+ }
+
+ /**
+ * Connect the {@link BusMessage} sender.
+ *
+ * @param busProperties Bus configuration properties.
+ * @throws org.jboss.esb.api.exception.DeploymentException
+ * Failed to connect sender.
+ */
+ private void connectBusSender(final Properties busProperties) throws DeploymentException
+ {
+ String busQueueName = busProperties.getProperty(BUS_QUEUE_KEY, DEFAULT_BUS_QUEUE_NAME);
+
+ messageSender = new MessageSender(busQueueName, queueSession);
+ try
+ {
+ messageSender.connect();
+ }
+ catch (JMSException e)
+ {
+ messageSender = null;
+ throw new DeploymentException("Deployment '" + getDeploymentName() + "' is not being coordinated with any other local deployment. A JMSException occured while trying "
+ + "to connect to the JMS Bus Queue '" + busQueueName + "'. The JMS Server must be running and this Queue must be deployed. "
+ + "JNDI properties used: " + busProperties, e);
+ }
+ }
+
+ /**
+ * Initialize the shared JMS Sessions.
+ *
+ * @param localBusProperties Local JMS Bus properties.
+ */
+ private void connectJMSSessions(final Properties localBusProperties) throws DeploymentException
+ {
+ ResourceLocator resourceLocator = DeploymentRuntime.getResourceLocator(DeploymentContext.getContext());
+
+ topicSession = new JMSSession(JMSSession.Type.TOPIC, localBusProperties);
+ try
+ {
+ if(resourceLocator != null)
+ {
+ topicSession.setClassLoader(resourceLocator.getClassLoader());
+ }
+ topicSession.connect();
+ }
+ catch (Throwable t)
+ {
+ closeJMSSessions();
+ logger.debug("Failed to connect shared deployment JMS Topic Session.", t);
+ return;
+ }
+ try
+ {
+ queueSession = new JMSSession(JMSSession.Type.QUEUE, localBusProperties);
+ if(resourceLocator != null)
+ {
+ queueSession.setClassLoader(resourceLocator.getClassLoader());
+ }
+ queueSession.connect();
+ }
+ catch (Throwable t)
+ {
+ closeJMSSessions();
+ // OK... this is an error... we were able to connect to the topic, but not the queue???
+ throw new DeploymentException("Failed to connect shared deployment JMS Queue Session.", t);
+ }
+ }
+
+ /**
+ * Close the JMS Sessions.
+ */
+ private void closeJMSSessions()
+ {
+ // Close the sessions...
+ if (topicSession != null)
+ {
+ if (topicSession.isConnected())
+ {
+ topicSession.close();
+ }
+ topicSession = null;
+ }
+ if (queueSession != null)
+ {
+ if (queueSession.isConnected())
+ {
+ queueSession.close();
+ }
+ queueSession = null;
+ }
+ }
+
+ /**
+ * Deployment Coordination Bus Notification Listener.
+ */
+ private class JMSCoordinationListener extends AbstractMessageListener
+ {
+
+ /**
+ * Constructor.
+ *
+ * @param destinationName Destination name.
+ * @param jndiProperties JNDI properties.
+ */
+ protected JMSCoordinationListener(final String destinationName, final Properties jndiProperties)
+ {
+ super(destinationName, topicSession, jndiProperties);
+ }
+
+ /**
+ * Handle a coordination event from other deployments.
+ *
+ * @param message Coordination message.
+ */
+ public final void onMessage(final javax.jms.Message message)
+ {
+ if (message instanceof ObjectMessage)
+ {
+ try
+ {
+ Object objectMessage = ((ObjectMessage) message).getObject();
+
+ if (objectMessage instanceof AbstractNotification)
+ {
+ AbstractNotification notification = (AbstractNotification) objectMessage;
+ try
+ {
+ getNotificationListener().onNotification(notification);
+ }
+ catch (RoutingException e)
+ {
+ logger.error("Deployment '" + getDeploymentId() + "' failed to accept notification '" + notification.getClass().getName() + "' from '" + notification.getDeploymentId() + "'.", e);
+ }
+ }
+ }
+ catch (JMSException e)
+ {
+ logger.error("Unable to get Object from JMS ObjectMessage.", e);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * JMS Bus message listener.
+ */
+ private class JMSQueueMessageListener extends AbstractMessageListener
+ {
+
+ /**
+ * Constructor.
+ *
+ * @param destinationName Destination name.
+ * @param jndiProperties JNDI properties.
+ */
+ protected JMSQueueMessageListener(final String destinationName, final Properties jndiProperties)
+ {
+ super(destinationName, queueSession, addDeploymentSelector(jndiProperties, getDeploymentId()));
+ }
+
+ /**
+ * Process a BusMessage for this deployment.
+ *
+ * @param message The bus message.
+ */
+ public final void onMessage(final javax.jms.Message message)
+ {
+ if (message instanceof ObjectMessage)
+ {
+ try
+ {
+ Object objectMessage = ((ObjectMessage) message).getObject();
+
+ if (objectMessage instanceof BusMessage)
+ {
+ try
+ {
+ getMessageListener().onMessage((BusMessage) objectMessage);
+ }
+ catch (RoutingException e)
+ {
+ logger.error("Error processing ESB Message: " + objectMessage, e);
+ }
+ }
+ }
+ catch (JMSException e)
+ {
+ logger.warn("Unable to get Object from JMS ObjectMessage.", e);
+ }
+ }
+ }
+
+
+ }
+
+ /**
+ * Set the deployment ID selector on the specified properties.
+ *
+ * @param jmsProperties JMS connection properties.
+ * @param deploymentId Deployment ID.
+ * @return The new properties with the JMS Selector set.
+ */
+ private static Properties addDeploymentSelector(final Properties jmsProperties, final String deploymentId)
+ {
+ Properties properties = (Properties) jmsProperties.clone();
+ properties.setProperty(AbstractMessageListener.MESSAGE_SELECTOR, DEPLOYMENT_ID + "='" + deploymentId + "'");
+ return properties;
+ }
+
+ /**
+ * Close JMS Handler.
+ *
+ * @param name The handler name.
+ * @param handler The handler.
+ */
+ private void closeJMSHandler(final String name, final AbstractMessageHandler handler)
+ {
+ if (handler != null && handler.isConnected())
+ {
+ try
+ {
+ handler.close();
+ }
+ catch (Throwable t)
+ {
+ logger.warn("Error closing " + name + " for deployment '" + getDeploymentName() + "'.", t);
+ }
+ }
+ }
+}
Property changes on: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JMSBus.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsBusProvider.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsBusProvider.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsBusProvider.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.jboss.esb.api.bus.Bus;
+import org.jboss.esb.api.bus.BusProvider;
+import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.util.AssertArgument;
+
+import java.util.Properties;
+
+/**
+ * JMS Bus Provider.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JmsBusProvider implements BusProvider
+{
+ /**
+ * Bus Properties.
+ */
+ private Properties properties;
+
+ /**
+ * Public constructor.
+ *
+ * @param properties Bus properties.
+ */
+ public JmsBusProvider(final Properties properties)
+ {
+ AssertArgument.isNotNull(properties, "properties");
+ this.properties = properties;
+ }
+
+ /**
+ * Get a new JmsBus instance.
+ *
+ * @return The Bus instance.
+ * @throws RoutingException Error creating Bus instance.
+ */
+ public final Bus newBusInstance() throws RoutingException
+ {
+ JmsBus bus = new JmsBus();
+ bus.setProperties(properties);
+ return bus;
+ }
+
+ /**
+ * Get Bus properties.
+ *
+ * @return Bus properties.
+ */
+ public final Properties getProperties()
+ {
+ return properties;
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsBusProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsConstants.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsConstants.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsConstants.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,89 +0,0 @@
-/*
- * Milyn - Copyright (C) 2006
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License (version 2.1) as published
- * by the Free Software Foundation.
- *
- * This library 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:
- * http://www.gnu.org/licenses/lgpl.txt
- */
-package org.jboss.esb.jms;
-
-/**
- * Contants uses for JMS properties and configuration names.
- * <p/>
- *
- * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
- *
- */
-public final class JmsConstants
-{
- /**
- * Private constructor.
- */
- private JmsConstants()
- {
- throw new AssertionError("Should not be called");
- }
-
- /**
- * ConnectionFactory property name used in configuration files.
- */
- public static final String CONNECTION_FACTORY = "org.jboss.esb.jms.connectionFactory";
-
- /**
- * DeliveryMode property name.
- */
- public static final String DELIVERY_MODE = "org.jboss.esb.jms.deliveryMode";
-
- /**
- * Time-to-Live property name.
- */
- public static final String TIME_TO_LIVE = "org.jboss.esb.jms.timeToLive";
-
- /**
- * CorrelationId property name.
- */
- public static final String CORRELATION_ID = "org.jboss.esb.jms.correlationId";
-
- /**
- * Expiration property name.
- */
- public static final String EXPIRATION = "org.jboss.esb.jms.expiration";
-
- /**
- * MessageId property name.
- */
- public static final String MESSAGE_ID = "org.jboss.esb.jms.messageId";
-
- /**
- * Redelivered property name.
- */
- public static final String REDELIVERED = "org.jboss.esb.jms.redelivered";
-
- /**
- * Timestamp property name.
- */
- public static final String TIMESTAMP = "org.jboss.esb.jms.timestamp";
-
- /**
- * ReplyTo property name.
- */
- public static final String REPLY_TO = "org.jboss.esb.jms.replyTo";
-
- /**
- * Priority property name.
- */
- public static final String PRIORITY = "org.jboss.esb.jms.priority";
-
- /**
- * Priority property name.
- */
- public static final String PROPERTIES = "org.jboss.esb.jms.properties";
-
-}
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsInboundRouter.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,15 +20,11 @@
*/
package org.jboss.esb.jms;
-import java.util.Properties;
-
-import javax.jms.JMSException;
-
import org.apache.log4j.Logger;
import org.jboss.esb.api.annotations.Initialize;
import org.jboss.esb.api.annotations.Property;
+import org.jboss.esb.api.annotations.Property.Use;
import org.jboss.esb.api.annotations.Uninitialize;
-import org.jboss.esb.api.annotations.Property.Use;
import org.jboss.esb.api.context.InvocationContext;
import org.jboss.esb.api.context.ResourceLocator;
import org.jboss.esb.api.exception.ConfigurationException;
@@ -37,8 +33,12 @@
import org.jboss.esb.api.routing.InboundRouter;
import org.jboss.esb.api.routing.MessageDispatcher;
import org.jboss.esb.jms.composers.EsbMessageComposer;
+import org.jboss.esb.jms.util.JmsConstants;
import org.jboss.esb.jms.util.RouterUtil;
+import javax.jms.JMSException;
+import java.util.Properties;
+
/**
* Inbound router for JMS.
* <br><br>
@@ -103,11 +103,11 @@
@Property(use = Use.OPTIONAL, defaultVal = "true")
private boolean extractJmsProperties;
- /**
- * The message composer to use.
- */
- @Property(use = Use.OPTIONAL, name = "esbMessageComposer", defaultVal = "org.jboss.esb.jms.composers.EsbMessageComposerImpl")
- private String messageComposerClass;
+ /**
+ * The message composer to use.
+ */
+ @Property(use = Use.OPTIONAL, name = "esbMessageComposer", defaultVal = "org.jboss.esb.jms.composers.EsbMessageComposerImpl")
+ private String messageComposerClass;
/**
* The JMS Session on which the listener is created.
@@ -119,10 +119,10 @@
*/
private JmsMessageListener messageListener;
- /**
- * MessageComposer strategy.
- */
- private EsbMessageComposer esbMessageComposer;
+ /**
+ * MessageComposer strategy.
+ */
+ private EsbMessageComposer esbMessageComposer;
/**
* Set the dispatcher used by this instance.
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsOutboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsOutboundRouter.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsOutboundRouter.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,14 +20,10 @@
*/
package org.jboss.esb.jms;
-import static org.jboss.esb.jms.JmsConstants.PROPERTIES;
-
-import java.util.Properties;
-import javax.jms.JMSException;
import org.jboss.esb.api.annotations.Initialize;
import org.jboss.esb.api.annotations.Property;
+import org.jboss.esb.api.annotations.Property.Use;
import org.jboss.esb.api.annotations.Uninitialize;
-import org.jboss.esb.api.annotations.Property.Use;
import org.jboss.esb.api.context.InvocationContext;
import org.jboss.esb.api.context.ResourceLocator;
import org.jboss.esb.api.exception.ConfigurationException;
@@ -36,8 +32,12 @@
import org.jboss.esb.api.routing.OutboundRouter;
import org.jboss.esb.api.routing.RoutingException;
import org.jboss.esb.jms.composers.JmsMessageComposer;
+import static org.jboss.esb.jms.util.JmsConstants.PROPERTIES;
import org.jboss.esb.jms.util.RouterUtil;
+import javax.jms.JMSException;
+import java.util.Properties;
+
/**
* JmsOutboundRouter is implmentation of {@link OutboundRouter} that uses the JMS transport.
* <br><br>
@@ -84,9 +84,9 @@
/**
* The name of the {@link JmsMessageComposer} implementation to be used.
*/
- @Property(use = Use.OPTIONAL, name = "jmsMessageComposer", defaultVal = "org.jboss.esb.jms.composers.JmsMessageComposerImpl")
+ @Property(use = Use.OPTIONAL, name = "jmsMessageComposer", defaultVal = "org.jboss.esb.jms.composers.JmsMessageComposerImpl")
private String messageComposerClass;
-
+
/**
* Should ESB Properties from the ESB Message and added to the outgoing JMS Message.
*/
@@ -108,14 +108,14 @@
*/
private MessageSender messageSender;
- /**
- * The {@link JmsMessageComposer} strategy.
- */
- private JmsMessageComposer jmsMessageComposer;
+ /**
+ * The {@link JmsMessageComposer} strategy.
+ */
+ private JmsMessageComposer jmsMessageComposer;
- /**
- * Name of this router. Will be injected by the deployment runtime.
- */
+ /**
+ * Name of this router. Will be injected by the deployment runtime.
+ */
private Object objectName;
/**
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/EsbMessageComposerImpl.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/EsbMessageComposerImpl.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/EsbMessageComposerImpl.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,14 +20,14 @@
*/
package org.jboss.esb.jms.composers;
-import static org.jboss.esb.jms.JmsConstants.CORRELATION_ID;
-import static org.jboss.esb.jms.JmsConstants.DELIVERY_MODE;
-import static org.jboss.esb.jms.JmsConstants.EXPIRATION;
-import static org.jboss.esb.jms.JmsConstants.MESSAGE_ID;
-import static org.jboss.esb.jms.JmsConstants.PRIORITY;
-import static org.jboss.esb.jms.JmsConstants.REDELIVERED;
-import static org.jboss.esb.jms.JmsConstants.REPLY_TO;
-import static org.jboss.esb.jms.JmsConstants.TIMESTAMP;
+import static org.jboss.esb.jms.util.JmsConstants.CORRELATION_ID;
+import static org.jboss.esb.jms.util.JmsConstants.DELIVERY_MODE;
+import static org.jboss.esb.jms.util.JmsConstants.EXPIRATION;
+import static org.jboss.esb.jms.util.JmsConstants.MESSAGE_ID;
+import static org.jboss.esb.jms.util.JmsConstants.PRIORITY;
+import static org.jboss.esb.jms.util.JmsConstants.REDELIVERED;
+import static org.jboss.esb.jms.util.JmsConstants.REPLY_TO;
+import static org.jboss.esb.jms.util.JmsConstants.TIMESTAMP;
import java.util.Enumeration;
import java.util.HashMap;
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/JmsMessageComposerImpl.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/JmsMessageComposerImpl.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/composers/JmsMessageComposerImpl.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,10 +20,10 @@
*/
package org.jboss.esb.jms.composers;
-import static org.jboss.esb.jms.JmsConstants.MESSAGE_ID;
-import static org.jboss.esb.jms.JmsConstants.REDELIVERED;
-import static org.jboss.esb.jms.JmsConstants.CORRELATION_ID;
-import static org.jboss.esb.jms.JmsConstants.REPLY_TO;
+import static org.jboss.esb.jms.util.JmsConstants.MESSAGE_ID;
+import static org.jboss.esb.jms.util.JmsConstants.REDELIVERED;
+import static org.jboss.esb.jms.util.JmsConstants.CORRELATION_ID;
+import static org.jboss.esb.jms.util.JmsConstants.REPLY_TO;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Map;
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/package.html 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/package.html 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,8 +1,8 @@
-<html>
-<head></head>
-<body>
-JMS Routers
-
-<h2>Package Specification</h2>
-</body>
+<html>
+<head></head>
+<body>
+JMS Routing.
+
+<h2>Package Specification</h2>
+</body>
</html>
Copied: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/util/JmsConstants.java (from rev 24051, labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/JmsConstants.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/util/JmsConstants.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/util/JmsConstants.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -0,0 +1,89 @@
+/*
+ * Milyn - Copyright (C) 2006
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License (version 2.1) as published
+ * by the Free Software Foundation.
+ *
+ * This library 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:
+ * http://www.gnu.org/licenses/lgpl.txt
+ */
+package org.jboss.esb.jms.util;
+
+/**
+ * Contants uses for JMS properties and configuration names.
+ * <p/>
+ *
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
+ *
+ */
+public final class JmsConstants
+{
+ /**
+ * Private constructor.
+ */
+ private JmsConstants()
+ {
+ throw new AssertionError("Should not be called");
+ }
+
+ /**
+ * ConnectionFactory property name used in configuration files.
+ */
+ public static final String CONNECTION_FACTORY = "org.jboss.esb.jms.connectionFactory";
+
+ /**
+ * DeliveryMode property name.
+ */
+ public static final String DELIVERY_MODE = "org.jboss.esb.jms.deliveryMode";
+
+ /**
+ * Time-to-Live property name.
+ */
+ public static final String TIME_TO_LIVE = "org.jboss.esb.jms.timeToLive";
+
+ /**
+ * CorrelationId property name.
+ */
+ public static final String CORRELATION_ID = "org.jboss.esb.jms.correlationId";
+
+ /**
+ * Expiration property name.
+ */
+ public static final String EXPIRATION = "org.jboss.esb.jms.expiration";
+
+ /**
+ * MessageId property name.
+ */
+ public static final String MESSAGE_ID = "org.jboss.esb.jms.messageId";
+
+ /**
+ * Redelivered property name.
+ */
+ public static final String REDELIVERED = "org.jboss.esb.jms.redelivered";
+
+ /**
+ * Timestamp property name.
+ */
+ public static final String TIMESTAMP = "org.jboss.esb.jms.timestamp";
+
+ /**
+ * ReplyTo property name.
+ */
+ public static final String REPLY_TO = "org.jboss.esb.jms.replyTo";
+
+ /**
+ * Priority property name.
+ */
+ public static final String PRIORITY = "org.jboss.esb.jms.priority";
+
+ /**
+ * Priority property name.
+ */
+ public static final String PROPERTIES = "org.jboss.esb.jms.properties";
+
+}
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsOutboundRouterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsOutboundRouterTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsOutboundRouterTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -44,7 +44,7 @@
import org.jboss.esb.api.routing.OutboundRouter;
import org.jboss.esb.api.routing.RoutingException;
import org.jboss.esb.api.service.ServiceName;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.deploy.config.OutboundRouterConfig;
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/bus/JMSBus_Standalone_Test.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/bus/JMSBus_Standalone_Test.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/bus/JMSBus_Standalone_Test.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -25,10 +25,11 @@
import org.jboss.esb.api.bus.BusMessageListener;
import org.jboss.esb.api.bus.BusNotificationListener;
import org.jboss.esb.api.routing.RoutingException;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.federate.notify.DeploymentHeartbeatNotification;
import org.jboss.esb.properties.ApplicationProperties;
import org.jboss.esb.test.JmsTestRunner;
+import org.jboss.esb.jms.JmsBus;
import java.io.IOException;
import java.util.ArrayList;
@@ -46,17 +47,17 @@
@Override
public void test() throws Exception
{
- JMSBus interface1 = createBusInterfaceInstance("deployment1");
+ JmsBus interface1 = createBusInterfaceInstance("deployment1");
TestBusMessageListener interface1Listener = new TestBusMessageListener();
interface1.setMessageListener(interface1Listener);
try
{
- JMSBus interface2 = createBusInterfaceInstance("deployment2");
+ JmsBus interface2 = createBusInterfaceInstance("deployment2");
TestBusMessageListener interface2Listener = new TestBusMessageListener();
interface2.setMessageListener(interface2Listener);
try
{
- JMSBus interface3 = createBusInterfaceInstance("deployment3");
+ JmsBus interface3 = createBusInterfaceInstance("deployment3");
TestBusMessageListener interface3Listener = new TestBusMessageListener();
interface3.setMessageListener(interface3Listener);
try
@@ -121,17 +122,17 @@
@Override
public void test() throws Exception
{
- JMSBus interface1 = createBusInterfaceInstance("deployment1");
+ JmsBus interface1 = createBusInterfaceInstance("deployment1");
TestNotificationListener interface1Listener = new TestNotificationListener();
interface1.setNotificationListener(interface1Listener);
try
{
- JMSBus interface2 = createBusInterfaceInstance("deployment2");
+ JmsBus interface2 = createBusInterfaceInstance("deployment2");
TestNotificationListener interface2Listener = new TestNotificationListener();
interface2.setNotificationListener(interface2Listener);
try
{
- JMSBus interface3 = createBusInterfaceInstance("deployment3");
+ JmsBus interface3 = createBusInterfaceInstance("deployment3");
TestNotificationListener interface3Listener = new TestNotificationListener();
interface3.setNotificationListener(interface3Listener);
try
@@ -192,9 +193,9 @@
}.run();
}
- private JMSBus createBusInterfaceInstance(String name) throws IOException, DeploymentException, InterruptedException
+ private JmsBus createBusInterfaceInstance(String name) throws IOException, DeploymentException, InterruptedException
{
- JMSBus busInterface1 = new JMSBus();
+ JmsBus busInterface1 = new JmsBus();
ApplicationProperties properties = ApplicationProperties.loadProperties(getClass().getResourceAsStream("jmsbus.properties"));
busInterface1.setDeploymentName(name);
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/EsbMessageComposerImplTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/EsbMessageComposerImplTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/EsbMessageComposerImplTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,14 +20,14 @@
*/
package org.jboss.esb.jms.composers;
-import static org.jboss.esb.jms.JmsConstants.CORRELATION_ID;
-import static org.jboss.esb.jms.JmsConstants.DELIVERY_MODE;
-import static org.jboss.esb.jms.JmsConstants.EXPIRATION;
-import static org.jboss.esb.jms.JmsConstants.MESSAGE_ID;
-import static org.jboss.esb.jms.JmsConstants.PRIORITY;
-import static org.jboss.esb.jms.JmsConstants.REDELIVERED;
-import static org.jboss.esb.jms.JmsConstants.REPLY_TO;
-import static org.jboss.esb.jms.JmsConstants.TIMESTAMP;
+import static org.jboss.esb.jms.util.JmsConstants.CORRELATION_ID;
+import static org.jboss.esb.jms.util.JmsConstants.DELIVERY_MODE;
+import static org.jboss.esb.jms.util.JmsConstants.EXPIRATION;
+import static org.jboss.esb.jms.util.JmsConstants.MESSAGE_ID;
+import static org.jboss.esb.jms.util.JmsConstants.PRIORITY;
+import static org.jboss.esb.jms.util.JmsConstants.REDELIVERED;
+import static org.jboss.esb.jms.util.JmsConstants.REPLY_TO;
+import static org.jboss.esb.jms.util.JmsConstants.TIMESTAMP;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/JmsMessageComposerImplTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/JmsMessageComposerImplTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/composers/JmsMessageComposerImplTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -36,7 +36,7 @@
import org.jboss.esb.api.message.Message;
import org.jboss.esb.api.message.MessageProcessingException;
-import org.jboss.esb.jms.JmsConstants;
+import org.jboss.esb.jms.util.JmsConstants;
import org.junit.Before;
import org.junit.Test;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/Deployable.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/Deployable.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/Deployable.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,5 +1,7 @@
package org.jboss.esb.deploy;
+import org.jboss.esb.api.exception.DeploymentException;
+
/**
* Deployable is something that can be deployed and undeployed.
* <p>
Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentException.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentException.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentException.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, 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.deploy;
-
-import org.jboss.esb.api.exception.JBossESBException;
-
-/**
- * ESB Deployment Exception.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class DeploymentException extends JBossESBException
-{
- /**
- * Public Constructor.
- *
- * @param message Exception message.
- */
- public DeploymentException(final String message)
- {
- super(message);
- }
-
- /**
- * Public Constructor.
- *
- * @param message Exception message.
- * @param cause Exception cause.
- */
- public DeploymentException(final String message, final Throwable cause)
- {
- super(message, cause);
- }
-}
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -27,6 +27,7 @@
import org.jboss.esb.api.message.MessageProcessor;
import org.jboss.esb.api.routing.MessageDispatcher;
import org.jboss.esb.api.service.ServiceName;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.classpath.ClassUtil;
import org.jboss.esb.deploy.config.ConfigUtil;
import org.jboss.esb.deploy.config.DeploymentUnit;
@@ -281,7 +282,7 @@
* <p/>
* Auto-deploys all configured {@link org.jboss.esb.api.bus.Bus} interfaces for the deployment.
*
- * @throws org.jboss.esb.deploy.DeploymentException Error deploying ESB Runtime.
+ * @throws org.jboss.esb.api.exception.DeploymentException Error deploying ESB Runtime.
*/
public final void deploy() throws DeploymentException
{
@@ -293,7 +294,7 @@
*
* @param autoDeployBusInterfaces Flag to indicate whether or not the {@link org.jboss.esb.federate.DeploymentCoordinator}
* should auto-deploy the configured {@link org.jboss.esb.api.bus.Bus} interfaces for the deployment.
- * @throws org.jboss.esb.deploy.DeploymentException Error deploying ESB Runtime.
+ * @throws org.jboss.esb.api.exception.DeploymentException Error deploying ESB Runtime.
*/
public final void deploy(final boolean autoDeployBusInterfaces) throws DeploymentException
{
@@ -353,7 +354,7 @@
/**
* Undeploy the Runtime.
*
- * @throws DeploymentException Error undeploying ESB Runtime.
+ * @throws org.jboss.esb.api.exception.DeploymentException Error undeploying ESB Runtime.
*/
public final void undeploy() throws DeploymentException
{
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentUtil.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentUtil.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -26,6 +26,7 @@
import org.jboss.esb.deploy.config.ServiceConfig;
import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
import org.jboss.esb.api.service.ServiceName;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.util.AssertArgument;
import java.io.IOException;
@@ -56,7 +57,7 @@
*
* @param deploymentConfig The config stream.
* @return The DeploymentRuntime instance (undeployed).
- * @throws org.jboss.esb.deploy.DeploymentException
+ * @throws org.jboss.esb.api.exception.DeploymentException
* Error digesting configuration.
* @throws java.io.IOException Error reading configuration stream.
*/
@@ -73,7 +74,7 @@
* @param deploymentConfig The config stream.
* @param resourceLocator The {@link org.jboss.esb.api.context.ResourceLocator} to use.
* @return The DeploymentRuntime instance (undeployed).
- * @throws org.jboss.esb.deploy.DeploymentException
+ * @throws org.jboss.esb.api.exception.DeploymentException
* Error digesting configuration.
* @throws java.io.IOException Error reading configuration stream.
*/
@@ -169,7 +170,7 @@
* @return The DeploymentRuntime instance (undeployed).
*
* @throws java.io.IOException Error reading configuration stream.
- * @throws org.jboss.esb.deploy.DeploymentException
+ * @throws org.jboss.esb.api.exception.DeploymentException
* Error digesting configuration.
*/
public static DeploymentRuntime createRuntime(final InputStream deploymentConfig, final DeploymentRuntime runtime) throws DeploymentException, IOException
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigUtil.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigUtil.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -23,7 +23,7 @@
import org.jboss.esb.api.annotations.Property;
import org.jboss.esb.classpath.ClassUtil;
import org.jboss.esb.api.context.ResourceLocator;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.util.AssertArgument;
import org.milyn.javabean.DataDecoder;
@@ -46,7 +46,7 @@
/**
* File dir name for ESB configs.
*/
- public static final String BUSCONFIG_FILE_DIR = "busconfig/";
+ public static final String ESBCONFIG_FILE_DIR = "jbossesb/";
/**
* Classpath dir name for ESB configs.
*/
@@ -64,18 +64,18 @@
* <p/>
* Checks in the following order:
* <ol>
- * <li>File: "busconfig/<configPath>"</li>
+ * <li>File: "jbossesb/<configPath>"</li>
* <li>Classpath: "/META-INF/jbossesb/<configPath>"</li>
* </ol>
*
* @param configPath The configuration file path.
* @return The configuration stream, or null if the specified configuration cannot be found.
- * @throws org.jboss.esb.deploy.DeploymentException Unable to read configuration.
+ * @throws org.jboss.esb.api.exception.DeploymentException Unable to read configuration.
*/
public static InputStream getConfigStream(final String configPath) throws DeploymentException
{
- String fileCheckPath = BUSCONFIG_FILE_DIR + configPath;
- String cpCheckPath = ESBCONFIG_CP_DIR + configPath;
+ String fileCheckPath = getFilePath(configPath);
+ String cpCheckPath = getClassPath(configPath);
// 1st: Check for a config on the local file system...
File checkFile = new File(fileCheckPath);
@@ -100,20 +100,20 @@
* <p/>
* Checks in the following order:
* <ol>
- * <li>File: "busconfig/<configPath>"</li>
+ * <li>File: "jbossesb/<configPath>"</li>
* <li>Classpath: "/META-INF/jbossesb/<configPath>"</li>
* </ol>
*
* @param configPath The configuration file path.
* @param resourceLocator The {@link ResourceLocator} implementation to use.
* @return The configuration stream, or null if the specified configuration cannot be found.
- * @throws org.jboss.esb.deploy.DeploymentException Unable to read configuration.
+ * @throws org.jboss.esb.api.exception.DeploymentException Unable to read configuration.
*/
public static InputStream getConfigStream(final String configPath, final ResourceLocator resourceLocator) throws DeploymentException
{
AssertArgument.isNotNull(resourceLocator, "resourceLocator");
- String fileCheckPath = BUSCONFIG_FILE_DIR + configPath;
- String cpCheckPath = ESBCONFIG_CP_DIR + configPath;
+ String fileCheckPath = getFilePath(configPath);
+ String cpCheckPath = getClassPath(configPath);
// 1st: Check for a config on the local file system...
File checkFile = new File(fileCheckPath);
@@ -273,4 +273,24 @@
ClassUtil.setFieldValue(field, instance, objValue);
}
+
+ /**
+ * Get the fully qualified (absolute) file path for the specified config path.
+ * @param configPath The config path.
+ * @return The absolute file path.
+ */
+ public static String getFilePath(final String configPath)
+ {
+ return (new File(ESBCONFIG_FILE_DIR + configPath)).getAbsolutePath();
+ }
+
+ /**
+ * Get the classpath location for the specified config path.
+ * @param configPath The config path.
+ * @return The classpath location.
+ */
+ public static String getClassPath(final String configPath)
+ {
+ return (ESBCONFIG_CP_DIR + configPath);
+ }
}
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DeploymentUnit.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DeploymentUnit.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DeploymentUnit.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -19,7 +19,7 @@
*/
package org.jboss.esb.deploy.config;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.api.service.ServiceName;
import org.jboss.esb.util.AssertArgument;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/PropertiesUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/PropertiesUtil.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/PropertiesUtil.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -19,13 +19,13 @@
*/
package org.jboss.esb.deploy.config;
+import org.jboss.esb.api.context.ResourceLocator;
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.properties.ApplicationProperties;
+
import java.io.IOException;
import java.io.InputStream;
-import org.jboss.esb.api.context.ResourceLocator;
-import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.properties.ApplicationProperties;
-
/**
* Deployment properties configuration utility methods.
* <p/>
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -19,7 +19,7 @@
*/
package org.jboss.esb.deploy.config.digest;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.config.DeploymentUnit;
import java.io.IOException;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.deploy.config.digest;
import org.jboss.esb.api.context.ResourceLocator;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentResource;
import org.jboss.esb.deploy.config.DeploymentUnit;
import org.jboss.esb.deploy.config.InboundRouterConfig;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/FilterDecisionTreeBuilder.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/FilterDecisionTreeBuilder.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/FilterDecisionTreeBuilder.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -21,7 +21,7 @@
import org.jboss.esb.api.context.ResourceLocator;
import org.jboss.esb.api.routing.FilterEvaluator;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.config.ConfigUtil;
import org.jboss.esb.filter.FilterDecisionNode;
import org.milyn.SmooksException;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -27,7 +27,7 @@
import org.jboss.esb.api.message.Message;
import org.jboss.esb.api.service.Service;
import org.jboss.esb.api.service.ServiceException;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.invoke.ServiceInvoker;
import org.jboss.esb.schedule.AbstractScheduleListener;
import org.jboss.esb.schedule.SchedulingException;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/BusMediator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/BusMediator.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/BusMediator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -385,7 +385,7 @@
/**
* Send the deployment details for this deployment out onto the bus.
*
- * @throws org.jboss.esb.deploy.DeploymentException Failed to send.
+ * @throws org.jboss.esb.api.exception.DeploymentException Failed to send.
*/
private void sendDeploymentDetailsNotification() throws RoutingException
{
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -24,7 +24,7 @@
import org.jboss.esb.api.annotations.Uninitialize;
import org.jboss.esb.api.bus.Bus;
import org.jboss.esb.api.routing.RoutingException;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.federate.bus.BusFactory;
import org.jboss.esb.federate.bus.BusRoutingContext;
@@ -143,18 +143,10 @@
{
throw new DeploymentException("Unable to start Bus Interface. Failed to connect bus '" + bus.getClass().getName() + "'.", e);
}
+
if (bus.isConnected())
{
- try
- {
- addBusMediator(new BusMediator(bus, runtime));
- }
- catch (RoutingException e)
- {
- bus.disconnect();
- logger.error("Unable to start Bus Interface. Failed to deliver Deployment Details Notification (on statrup) to bus '" + bus.getClass().getName() + "'.", e);
- return;
- }
+ addBusMediator(new BusMediator(bus, runtime));
}
}
}.iterate("bus.");
@@ -190,7 +182,7 @@
* @throws DeploymentException The Bus is not connected.
* @throws RoutingException Failed to send the online notification.
*/
- public final void addBusMediator(final BusMediator busMediator) throws DeploymentException, RoutingException
+ public final void addBusMediator(final BusMediator busMediator) throws DeploymentException
{
if(busMediator.getRuntime() != runtime)
{
@@ -202,23 +194,31 @@
throw new DeploymentException("Cannot add a BusMediator for a bus that is not connected.");
}
- busMediators.add(busMediator);
-
// Tell the other deployments using this bus that this deployment is online.
// This bus interface can then receive messages on behalf of the deployment
// (i.e. it will not, receive them before this message is sent)...
- busMediator.sendOnlineNotification();
+ try
+ {
+ busMediator.sendOnlineNotification();
+ }
+ catch (RoutingException e)
+ {
+ busMediator.disconnectBus();
+ throw new DeploymentException("Failed to add BusMediator instance. Error sending ", e);
+ }
+
+ busMediators.add(busMediator);
}
/**
* Remove the supplied {@link BusMediator} instance.
*
* @param busMediator Bus mediator.
- * @throws DeploymentException The Bus is not connected.
+ * @throws org.jboss.esb.api.exception.DeploymentException The Bus is not connected.
* @throws RoutingException Failed to send the online notification.
* @see #addBusMediator(BusMediator)
*/
- public final void removeBusMediator(final BusMediator busMediator) throws DeploymentException, RoutingException
+ public final void removeBusMediator(final BusMediator busMediator)
{
busMediator.disconnectBus();
busMediators.remove(busMediator);
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusFactory.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusFactory.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusFactory.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.federate.bus;
import org.jboss.esb.classpath.ClassUtil;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.config.PropertiesUtil;
import org.jboss.esb.properties.ApplicationProperties;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceRouter.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceRouter.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -27,7 +27,7 @@
import org.jboss.esb.api.routing.OutboundRouter;
import org.jboss.esb.api.routing.RoutingException;
import org.jboss.esb.api.service.ServiceName;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
/**
* Service Message {@link org.jboss.esb.api.routing.OutboundRouter}.
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.test;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.util.AssertArgument;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/jbossesb-default.properties
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/jbossesb-default.properties 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/jbossesb-default.properties 2008-11-26 18:37:08 UTC (rev 24109)
@@ -14,7 +14,7 @@
# Buses to be auto deployed...
#bus.InVM=org.jboss.esb.federate.bus.invm.InVMBus
-#bus.jms=org.jboss.esb.jms.bus.JMSBus
+#bus.jms=org.jboss.esb.jms.JmsBus
# Pre-installed deployment units...
unit.deadletter=deadletter.xml
\ No newline at end of file
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -22,8 +22,8 @@
import org.jboss.esb.api.message.MessageProcessor;
import org.jboss.esb.api.service.ServiceMEP;
import org.jboss.esb.api.service.ServiceName;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DefaultResourceLocator;
-import org.jboss.esb.deploy.DeploymentException;
import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/InboundFilterConfigTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/InboundFilterConfigTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/InboundFilterConfigTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.deploy.config;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DefaultResourceLocator;
import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
import org.jboss.esb.api.message.Message;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/OutboundFilterConfigTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/OutboundFilterConfigTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/OutboundFilterConfigTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -22,7 +22,7 @@
import junit.framework.TestCase;
import org.jboss.esb.TestInboundRouter;
import org.jboss.esb.TestOutboundRouter;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.api.service.ServiceName;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/digest/ConfigUtilTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/digest/ConfigUtilTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/digest/ConfigUtilTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
import org.jboss.esb.api.annotations.Property;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.config.ConfigUtil;
/**
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/lifecycle/BasicTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/lifecycle/BasicTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/lifecycle/BasicTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.deploy.lifecycle;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.deploy.config.MyInRouter;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/dispatch/LocalDispatcherTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/dispatch/LocalDispatcherTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/dispatch/LocalDispatcherTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.dispatch;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.api.routing.RoutingException;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/notify/DeploymentDetailsNotificationTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/notify/DeploymentDetailsNotificationTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/notify/DeploymentDetailsNotificationTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -2,7 +2,7 @@
package org.jboss.esb.federate.notify;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/schedule/ScheduleListenerTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/schedule/ScheduleListenerTest.java 2008-11-26 16:22:19 UTC (rev 24108)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/schedule/ScheduleListenerTest.java 2008-11-26 18:37:08 UTC (rev 24109)
@@ -20,7 +20,7 @@
package org.jboss.esb.schedule;
import junit.framework.TestCase;
-import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.api.exception.DeploymentException;
import org.jboss.esb.deploy.DeploymentRuntime;
import org.jboss.esb.deploy.DeploymentUtil;
import org.jboss.esb.api.routing.RoutingException;
More information about the jboss-svn-commits
mailing list