[jboss-svn-commits] JBL Code SVN: r22520 - in labs/jbossesb/workspace/skeagh: routing/jms/src/test/java/org/jboss/esb/jms and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 8 12:04:35 EDT 2008


Author: tfennelly
Date: 2008-09-08 12:04:34 -0400 (Mon, 08 Sep 2008)
New Revision: 22520

Added:
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/AbstractDeploymentNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentDetailsNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentHeartbeatNotification.java
Modified:
   labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsInboundRouterTest.java
   labs/jbossesb/workspace/skeagh/routing/pom.xml
   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/config/digest/DigestUtil.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java
   labs/jbossesb/workspace/skeagh/testutil/pom.xml
Log:
Fixed JMS routing test.

Modified: labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsInboundRouterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsInboundRouterTest.java	2008-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/test/java/org/jboss/esb/jms/JmsInboundRouterTest.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -20,34 +20,23 @@
  */
 package org.jboss.esb.jms;
 
+import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.deploy.config.digest.DigestUtil;
+import org.jboss.esb.routing.InboundRouter;
+import org.jboss.esb.service.ServiceName;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
+import org.junit.Test;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 import javax.jms.JMSException;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.naming.Context;
+import java.io.IOException;
+import java.util.Properties;
 
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.deploy.DeploymentRuntime;
-import org.jboss.esb.deploy.config.DeploymentUnit;
-import org.jboss.esb.deploy.config.InboundRouterConfig;
-import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
-import org.jboss.esb.routing.InboundRouter;
-import org.jboss.esb.service.ServiceName;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
 /**
  * Test for {@link JmsInboundRouter}.
  *
@@ -59,98 +48,59 @@
     private static final String TEST_PROVIDER_URL = "tcp://localhost:61616";
     private static final String DESTINATION_NAME = "jbossesb.TestQueue";
 
-    private static DeploymentUnit deploymentUnit;
     private final ServiceName serviceName = new ServiceName("service-cat", "service-a");
 
-    private static BrokerService broker;
-    private static Properties jndiProperties;
-
-    @BeforeClass
-    public static void startJmsProvider() throws Exception
-    {
-        broker = new BrokerService();
-
-        // configure the broker
-        broker.setDataDirectory(new File("./target/activeMQData"));
-        broker.addConnector(TEST_PROVIDER_URL);
-        broker.start();
-
-        jndiProperties = new Properties();
-        jndiProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getName());
-        jndiProperties.setProperty(Context.PROVIDER_URL, TEST_PROVIDER_URL);
-        jndiProperties.setProperty("queue." + DESTINATION_NAME, DESTINATION_NAME);
-
-        deploymentUnit = digest("jms-inbound-router_01.xml");
-    }
-
-    @AfterClass
-    public static void stopJmsProvider() throws Exception
-    {
-        broker.stop();
-    }
-
     @Test
     @Ignore
     public final void initializeDefaults() throws DeploymentException, IOException, JMSException
     {
-        InboundRouter inboundRouter = getInboundRouter(serviceName, "noproperties");
-        assertTrue(inboundRouter instanceof JmsInboundRouter);
-        initialize();
+        DeploymentRuntime runtime = DigestUtil.digestConfig(getClass().getResourceAsStream("jms-inbound-router_01.xml"));
+        InboundRouter inboundRouter = runtime.getConfigurationUnits().get(0).getInboundRouter(serviceName, "noproperties").getRouter();
 
-        final Properties properties = ((JmsInboundRouter) inboundRouter).getProperties();
-        assertEquals("org.jnp.interfaces.NamingContextFactory", properties .get(Context.INITIAL_CONTEXT_FACTORY));
-        assertEquals("org.jboss.naming,org.jnp.interfaces", properties .get(Context.URL_PKG_PREFIXES));
-        assertEquals("jnp://localhost:1099", properties .get(Context.PROVIDER_URL));
-        assertEquals("ConnectionFactory", properties .get(JmsConstants.CONNECTION_FACTORY));
-    }
-
-    @Test
-    public final void initializeConfOverride() throws DeploymentException, IOException, JMSException, InterruptedException
-    {
-        InboundRouter inboundRouter = getInboundRouter(serviceName, "inrouter1");
         assertTrue(inboundRouter instanceof JmsInboundRouter);
-        initialize();
-        Thread.sleep(3000);
-
-        MessageSender sender = new MessageSender(DESTINATION_NAME, jndiProperties);
-        try
-        {
-            sender.connect();
-            Session session = sender.getSession();
-            TextMessage textMessage = session.createTextMessage("test");
-            sender.send(textMessage);
-            Thread.sleep(3000);
+        runtime.deploy();
+        try {
+            final Properties properties = ((JmsInboundRouter) inboundRouter).getProperties();
+            assertEquals("org.jnp.interfaces.NamingContextFactory", properties .get(Context.INITIAL_CONTEXT_FACTORY));
+            assertEquals("org.jboss.naming,org.jnp.interfaces", properties .get(Context.URL_PKG_PREFIXES));
+            assertEquals("jnp://localhost:1099", properties .get(Context.PROVIDER_URL));
+            assertEquals("ConnectionFactory", properties .get(JmsConstants.CONNECTION_FACTORY));
+        } finally {
+            runtime.undeploy();
         }
-        finally
-        {
-            sender.close();
-        }
     }
 
-    private void initialize() throws DeploymentException, IOException, JMSException
+    @Test
+    public final void initializeConfOverride() throws Exception
     {
-        DeploymentRuntime runtime = new DeploymentRuntime();
-        runtime.add(deploymentUnit);
-        runtime.deploy();
-    }
-
-    private InboundRouter getInboundRouter(final ServiceName servicename, final String routerConfName) throws DeploymentException, IOException
-    {
-        final Map<ServiceName, List<InboundRouterConfig>> inboundRoutersConfs = deploymentUnit.getInboundRouters();
-        final List<InboundRouterConfig> routerConfsForService = inboundRoutersConfs .get(servicename);
-        for (InboundRouterConfig inboundRouterConfig : routerConfsForService)
-        {
-            if (inboundRouterConfig.getName().equals(routerConfName))
+        new JMSTestRunner(TEST_PROVIDER_URL) {
+            public void test() throws Exception
             {
-                return inboundRouterConfig.getRouter();
+                DeploymentRuntime runtime = DigestUtil.digestConfig(getClass().getResourceAsStream("jms-inbound-router_01.xml"));
+
+                runtime.deploy();
+                try {
+                    Thread.sleep(3000);
+
+                    Properties jndiProperties = getJndiProperties();
+                    jndiProperties.setProperty("queue." + DESTINATION_NAME, DESTINATION_NAME);
+                    MessageSender sender = new MessageSender(DESTINATION_NAME, jndiProperties);
+                    try
+                    {
+                        sender.connect();
+                        Session session = sender.getSession();
+                        TextMessage textMessage = session.createTextMessage("test");
+                        sender.send(textMessage);
+                        Thread.sleep(3000);
+                    }
+                    finally
+                    {
+                        sender.close();
+                    }
+                } finally {
+                    runtime.undeploy();
+                }
             }
-        }
-        return null;
+        }.run();
     }
-
-    private static DeploymentUnit digest(final String config) throws IOException, DeploymentException
-    {
-        DefaultConfigurationDigester digester = new DefaultConfigurationDigester();
-        return digester.digest(JmsInboundRouterTest.class .getResourceAsStream(config));
-    }
 }

Modified: labs/jbossesb/workspace/skeagh/routing/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/pom.xml	2008-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/routing/pom.xml	2008-09-08 16:04:34 UTC (rev 22520)
@@ -25,6 +25,13 @@
             <artifactId>jbossesb-rt</artifactId>
             <version>${jboss.esb.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>jboss.jbossesb</groupId>
+            <artifactId>jbossesb-testutil</artifactId>
+            <version>${jboss.esb.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>

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-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -37,7 +37,12 @@
 import org.jboss.esb.util.AssertArgument;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
 
 /**
  * JBoss ESB Runtime.
@@ -63,6 +68,10 @@
      */
     private String deploymentName = "$UNKNOWN$";
     /**
+     * Unique deployment ID.
+     */
+    private String deploymentID = UUID.randomUUID().toString();
+    /**
      * The list of configurations associated with this deployment instance.
      */
     private List<DeploymentUnit> deploymentUnits = new ArrayList<DeploymentUnit>();
@@ -114,6 +123,24 @@
     }
 
     /**
+     * Get the deployment ID.
+     * @return The deployment ID.
+     */
+    public final String getDeploymentID()
+    {
+        return deploymentID;
+    }
+
+    /**
+     * Set the deployment ID.
+     * @param deploymentID The deployment ID.
+     */
+    public final void setDeploymentID(final String deploymentID)
+    {
+        this.deploymentID = deploymentID;
+    }
+
+    /**
      * Get the deployment configuration units.
      *
      * @return The deployment configuration units.
@@ -172,11 +199,13 @@
             deployOutboundRouters();
             deployServices();
             deployInboundRouters();
-        } catch (DeploymentException e)
+        }
+        catch (DeploymentException e)
         {
             undeploy();
             throw e;
-        } catch (Throwable t)
+        }
+        catch (Throwable t)
         {
             undeploy();
             throw new DeploymentException("Unexpected deployment error.", t);
@@ -239,10 +268,12 @@
             {
                 ClassUtil.execAnnotatedMethod(object, Uninitialize.class);
                 undeployedObjects.add(object);
-            } catch (InvocationTargetException e)
+            }
+            catch (InvocationTargetException e)
             {
                 logger.error("Error while undeploying '" + key + "' (" + object.getClass().getName() + ").", e.getCause());
-            } catch (Throwable t)
+            }
+            catch (Throwable t)
             {
                 logger.error("Error while undeploying '" + key + "' (" + object.getClass().getName() + ").", t);
             }
@@ -301,10 +332,12 @@
                 logger.debug("Deployed resource '" + key + "' (" + resource.getClass().getName() + ").");
                 deployedObjects.put(key, resource);
                 deployedResources.put(key, resource);
-            } catch (InvocationTargetException e)
+            }
+            catch (InvocationTargetException e)
             {
                 throw new DeploymentException("Unable to deploy resource '" + key + "' (" + resource.getClass().getName() + ").", e.getCause());
-            } catch (Exception e)
+            }
+            catch (Exception e)
             {
                 throw new DeploymentException("Unable to deploy resource '" + key + "' (" + resource.getClass().getName() + ").", e);
             }
@@ -330,10 +363,12 @@
                     deployObject(service.getValue().getService(), null, service.getKey());
                     logger.debug("Deployed service '" + service.getKey() + "' (" + service.getValue().getClass().getName() + ").");
                     deployedObjects.put(service.getKey(), service.getValue().getService());
-                } catch (InvocationTargetException e)
+                }
+                catch (InvocationTargetException e)
                 {
                     throw new DeploymentException("Unable to deploy service '" + service.getKey() + "' (" + service.getValue().getService().getClass().getName() + ").", e.getCause());
-                } catch (Exception e)
+                }
+                catch (Exception e)
                 {
                     throw new DeploymentException("Unable to deploy service '" + service.getKey() + "' (" + service.getValue().getService().getClass().getName() + ").", e);
                 }
@@ -385,10 +420,12 @@
                         deployObject(routerConfig.getRouter(), routerConfig.getName(), serviceName);
                         logger.debug("Deployed InboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").");
                         deployedObjects.put(routerConfig.getName(), routerConfig.getRouter());
-                    } catch (InvocationTargetException e)
+                    }
+                    catch (InvocationTargetException e)
                     {
                         throw new DeploymentException("Unable to deploy InboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").", e.getCause());
-                    } catch (Exception e)
+                    }
+                    catch (Exception e)
                     {
                         throw new DeploymentException("Unable to deploy InboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").", e);
                     }
@@ -440,10 +477,12 @@
                         deployObject(routerConfig.getRouter(), routerConfig.getName(), routerConfigMap.getKey());
                         logger.debug("Deployed OutboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").");
                         deployedObjects.put(routerConfig.getName(), routerConfig.getRouter());
-                    } catch (InvocationTargetException e)
+                    }
+                    catch (InvocationTargetException e)
                     {
                         throw new DeploymentException("Unable to deploy OutboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").", e.getCause());
-                    } catch (Exception e)
+                    }
+                    catch (Exception e)
                     {
                         throw new DeploymentException("Unable to deploy OutboundRouter '" + routerConfig.getName() + "' (" + routerConfig.getRouter().getClass().getName() + ").", e);
                     }
@@ -471,10 +510,12 @@
                     deployObject(transformer, null, serviceName);
                     logger.debug("Deployed transformer for router '" + routerConfigName + "' (" + transformer.getClass().getName() + ").");
                     deployedObjects.put(transformer, transformer);
-                } catch (InvocationTargetException e)
+                }
+                catch (InvocationTargetException e)
                 {
                     throw new DeploymentException("Unable to deploy transformer for router '" + routerConfigName + "' (" + transformer.getClass().getName() + ").", e.getCause());
-                } catch (Exception e)
+                }
+                catch (Exception e)
                 {
                     throw new DeploymentException("Unable to deploy transformer for router '" + routerConfigName + "' (" + transformer.getClass().getName() + ").", e);
                 }

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java	2008-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -19,6 +19,9 @@
  */
 package org.jboss.esb.deploy.config.digest;
 
+import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.deploy.config.DeploymentUnit;
 import org.jboss.esb.xml.XMLParseUtils;
 import org.milyn.Smooks;
 import org.milyn.cdr.SmooksResourceConfigurationList;
@@ -40,7 +43,12 @@
 import java.io.InputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Configuration digest utility class.
@@ -156,7 +164,8 @@
 
                 execContext.setEventListener(new HtmlReportGenerator(new FileWriter(tsReportPathFile)));
                 smooks.filter(new DOMSource(configurationElement), result, execContext);
-            } else
+            }
+            else
             {
                 smooks.filter(new DOMSource(configurationElement), result);
             }
@@ -220,7 +229,8 @@
                     try
                     {
                         list = XMLConfigDigester.digestConfig(ClassUtil.getResourceAsStream(resPathString, DigestUtil.class), baseURI);
-                    } catch (URISyntaxException e)
+                    }
+                    catch (URISyntaxException e)
                     {
                         throw (IOException) (new IOException("Error while reading namespace digest configuration file '" + resPathString + "'.").initCause(e));
                     }
@@ -232,4 +242,26 @@
 
         return list;
     }
+
+    /**
+     * Digest the supplied config stream and create a DeploymentRuntime instance.
+     * <p/>
+     * Uses the {@link org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester}.
+     *
+     * @param config The config stream.
+     * @return The DeploymentRuntime instance (undeployed).
+     * @throws DeploymentException Error digesting configuration.
+     * @throws IOException         Error reading configuration stream.
+     */
+    public static DeploymentRuntime digestConfig(final InputStream config) throws DeploymentException, IOException
+    {
+        DeploymentRuntime runtime = new DeploymentRuntime();
+        DefaultConfigurationDigester digester = new DefaultConfigurationDigester();
+        DeploymentUnit deploymentUnit;
+
+        deploymentUnit = digester.digest(config);
+        runtime.add(deploymentUnit);
+
+        return runtime;
+    }
 }

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/AbstractDeploymentNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/AbstractDeploymentNotification.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/AbstractDeploymentNotification.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.federate;
+
+import java.io.Serializable;
+
+/**
+ * Deployment notification base type.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class AbstractDeploymentNotification implements Serializable
+{
+    /**
+     * The deployment name.
+     */
+    private String name;
+    /**
+     * The deployment ID.
+     */
+    private String id;
+
+    /**
+     * Get the deployment name.
+     * @return The deployment name.
+     */
+    public final String getName()
+    {
+        return name;
+    }
+
+    /**
+     * Set the deployment name.
+     * @param name The deployment name.
+     */
+    public final void setName(final String name)
+    {
+        this.name = name;
+    }
+
+    /**
+     * Get the deployment ID.
+     * @return The deployment ID.
+     */
+    public final String getId()
+    {
+        return id;
+    }
+
+    /**
+     * Set the deployment ID.
+     * @param id The deployment ID.
+     */
+    public final void setId(final String id)
+    {
+        this.id = id;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/AbstractDeploymentNotification.java
___________________________________________________________________
Name: svn:eol-style
   + native

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-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -23,6 +23,8 @@
 import org.jboss.esb.schedule.SchedulingException;
 import org.jboss.esb.deploy.config.DeploymentUnit;
 
+import java.util.List;
+
 /**
  * Deployment Coordinator.
  * <p/>
@@ -34,17 +36,17 @@
 public class DeploymentCoordinator extends AbstractScheduleListener
 {
     /**
-     * Deployment Unit.
+     * Deployment Units.
      */
-    private DeploymentUnit deploymentUnit;
+    private List<DeploymentUnit> deploymentUnits;
 
     /**
      * Public constructor.
-     * @param deploymentUnit The DeploymentUnit for the local deployment.
+     * @param deploymentUnits The DeploymentUnits for the local deployment.
      */
-    public DeploymentCoordinator(final DeploymentUnit deploymentUnit)
+    public DeploymentCoordinator(final List<DeploymentUnit> deploymentUnits)
     {
-        this.deploymentUnit = deploymentUnit;
+        this.deploymentUnits = deploymentUnits;
     }
 
     /**

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentDetailsNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentDetailsNotification.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentDetailsNotification.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.federate;
+
+import org.jboss.esb.routing.OutboundRouter;
+import org.jboss.esb.service.ServiceName;
+
+import java.util.List;
+
+/**
+ * Deployment details notification.
+ * <p/>
+ * Used to notify other deployments of the list of services and outbound routers
+ * deployed in the associated deployment.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DeploymentDetailsNotification extends AbstractDeploymentNotification
+{
+    /**
+     * The list of services contained in the deployment.
+     */
+    private List<ServiceName> services;
+    /**
+     * The list of outbound routers contained in the deployment.
+     */
+    private List<OutboundRouter> outboundRouters;
+
+    /**
+     * Get the deployment service list.
+     * @return The deployment service list.
+     */
+    public final List<ServiceName> getServices()
+    {
+        return services;
+    }
+
+    /**
+     * Set the deployment service list.
+     * @param services The deployment service list.
+     */
+    public final void setServices(final List<ServiceName> services)
+    {
+        this.services = services;
+    }
+
+    /**
+     * Get the deployment {@link OutboundRouter} list.
+     * @return The deployment {@link OutboundRouter} list.
+     */
+    public final List<OutboundRouter> getOutboundRouters()
+    {
+        return outboundRouters;
+    }
+
+    /**
+     * Set the deployment {@link OutboundRouter} list.
+     * @param outboundRouters The deployment {@link OutboundRouter} list.
+     */
+    public final void setOutboundRouters(final List<OutboundRouter> outboundRouters)
+    {
+        this.outboundRouters = outboundRouters;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentDetailsNotification.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentHeartbeatNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentHeartbeatNotification.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentHeartbeatNotification.java	2008-09-08 16:04:34 UTC (rev 22520)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright XXXX, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.federate;
+
+/**
+ * Simple deployment heartbeat notification.
+ * <p/>
+ * Used to signal to other deployments that a particular deployment is still
+ * running.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DeploymentHeartbeatNotification extends AbstractDeploymentNotification
+{    
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentHeartbeatNotification.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/workspace/skeagh/testutil/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/testutil/pom.xml	2008-09-08 15:53:48 UTC (rev 22519)
+++ labs/jbossesb/workspace/skeagh/testutil/pom.xml	2008-09-08 16:04:34 UTC (rev 22520)
@@ -15,7 +15,7 @@
 
     <dependencies>
 
-        <!-- Test Dependencies - can we embed JBM for testing ?? -->
+        <!-- Test Dependencies - can we easily embed JBM for JMS testing ?? -->
         <dependency>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-core</artifactId>




More information about the jboss-svn-commits mailing list