[jboss-svn-commits] JBL Code SVN: r24028 - in labs/jbossesb/workspace/skeagh: api/src/main/java/org/jboss/esb/api/bus and 18 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Nov 21 05:45:38 EST 2008


Author: tfennelly
Date: 2008-11-21 05:45:38 -0500 (Fri, 21 Nov 2008)
New Revision: 24028

Added:
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/AbstractNotification.java
   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/BusMessage.java
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessageListener.java
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusNotificationListener.java
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEvent.java
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEventLog.java
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/package.html
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLogAccessor.java
Removed:
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/Bus.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessage.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessageListener.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/AbstractDeploymentNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/BusNotificationListener.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEvent.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLog.java
Modified:
   labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/context/DeploymentContext.java
   labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/util/AssertArgument.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/dispatch/AbstractDispatcher.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/LocalDispatcher.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/DeploymentMonitor.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/federate/bus/BusInboundRouter.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusOutboundRouter.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusRoutingContext.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/jms/JMSBus.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentHeartbeatNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentUndeployNotification.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/BusRouterProcessingEvent.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/OutboundRouterProcessingEvent.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/ServiceProcessingEvent.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceInvoker.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/ESBTestComponent.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/TestInboundRouter.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/bus/jms/JMSBus_Standalone_Test.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_011/RoutingTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_012/RoutingTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_013/RoutingTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_014/RoutingTest.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2182

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/AbstractNotification.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/AbstractDeploymentNotification.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/AbstractNotification.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/AbstractNotification.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,79 @@
+/*
+ * 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 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 AbstractNotification implements Serializable
+{
+    /**
+     * The notification source deployment name.
+     */
+    private String deploymentName;
+    /**
+     * The notification source deployment ID.
+     */
+    private String deploymentId;
+
+    /**
+     * Get the notification source deployment name.
+     *
+     * @return The deployment name.
+     */
+    public final String getDeploymentName()
+    {
+        return deploymentName;
+    }
+
+    /**
+     * Set the notification source deployment name.
+     *
+     * @param deploymentName The deployment name.
+     */
+    public final void setDeploymentName(final String deploymentName)
+    {
+        this.deploymentName = deploymentName;
+    }
+
+    /**
+     * Get the notification source deployment ID.
+     *
+     * @return The deployment ID.
+     */
+    public final String getDeploymentId()
+    {
+        return deploymentId;
+    }
+
+    /**
+     * Set the notification source deployment ID.
+     *
+     * @param deploymentId The deployment ID.
+     */
+    public final void setDeploymentId(final String deploymentId)
+    {
+        this.deploymentId = deploymentId;
+    }
+}


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

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java (from rev 24024, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/Bus.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/Bus.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,114 @@
+/*
+ * 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;
+
+/**
+ * JBoss ESB Bus definition.
+ * <p/>
+ * Implementations of this interface act as the interface to a specfic
+ * message aware Bus implementation, for the local deployment.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface Bus
+{
+    /**
+     * Set the deploymentName for the local deployment.
+     *
+     * @param deploymentName The deployment Name.
+     */
+    void setDeploymentName(String deploymentName);
+
+    /**
+     * Set the deploymentId for the local deployment.
+     *
+     * @param deploymentId The deployment ID.
+     */
+    void setDeploymentId(String deploymentId);
+
+    /**
+     * Set the Bus properties.
+     *
+     * @param properties The Bus properties.
+     */
+    void setProperties(Properties properties);
+
+    /**
+     * Connect the bus.
+     *
+     * @throws RoutingException Connection exception.
+     */
+    void connect() throws RoutingException;
+
+    /**
+     * Is the bus connected.
+     *
+     * @return True if the bus is connected, otherwise false.
+     */
+    boolean isConnected();
+
+    /**
+     * Stop listening for ESB messages on the bus.
+     */
+    void stopListening();
+
+    /**
+     * Close the Bus.
+     */
+    void close();
+
+    /**
+     * 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.
+     */
+    void sendMessage(BusMessage message, String targetDeploymentId) throws RoutingException;
+
+    /**
+     * 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.
+     */
+    void sendNotification(AbstractNotification notification) throws RoutingException;
+
+    /**
+     * Set the bus message listener on the {@link Bus} implementation.
+     *
+     * @param listener The message listener.
+     */
+    void setMessageListener(BusMessageListener listener);
+
+    /**
+     * Set the bus notification listener.
+     *
+     * @param listener Notification listener.
+     */
+    void setNotificationListener(BusNotificationListener listener);
+}


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

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessage.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessage.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessage.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessage.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,193 @@
+/*
+ * 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.context.AddressingContext;
+import org.jboss.esb.api.context.InvocationContext;
+import org.jboss.esb.api.history.ProcessingEventLog;
+import org.jboss.esb.api.message.Message;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * ESB Bus Message.
+ * <p/>
+ * This class encapsulates the ESB {@link org.jboss.esb.api.message.Message} for transportation
+ * on a Bus.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public final class BusMessage implements Serializable
+{
+    // TODO: Make Externalizable
+
+    /**
+     * Invocation Parameters.
+     */
+    private Map<String, String> invocationParameters = new LinkedHashMap<String, String>();
+    /**
+     * Addressing Context.
+     */
+    private AddressingContext addressingContext;
+    /**
+     * The fault.
+     */
+    private Throwable fault;
+    /**
+     * Message.
+     */
+    private Message message;
+    /**
+     * The processing event log.
+     * <p/>
+     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
+     * in the deployment configuration properties.
+     */
+    private ProcessingEventLog processingEventLog;
+
+    /**
+     * Get the invocation parameters provided with the initial
+     * service invocation.
+     * <p/>
+     * These parameters pass along with the {@link org.jboss.esb.api.message.Message}
+     *
+     * @return The invocation parameters.
+     */
+    public Map<String, String> getInvocationParameters()
+    {
+        return invocationParameters;
+    }
+
+    /**
+     * Set the invocation parameters provided with the initial
+     * service invocation.
+     * <p/>
+     * These parameters pass along with the {@link org.jboss.esb.api.message.Message}
+     *
+     * @param invocationParameters The invocation parameters.
+     */
+    public void setInvocationParameters(final Map<String, String> invocationParameters)
+    {
+        this.invocationParameters = invocationParameters;
+    }
+
+    /**
+     * Get the message Addressing Context.
+     *
+     * @return The message Addressing Context.
+     */
+    public AddressingContext getAddressingContext()
+    {
+        return addressingContext;
+    }
+
+    /**
+     * Set the message Addressing Context.
+     *
+     * @param addressingContext The message Addressing Context.
+     */
+    public void setAddressingContext(final AddressingContext addressingContext)
+    {
+        this.addressingContext = addressingContext;
+    }
+
+    /**
+     * Get the message.
+     *
+     * @return The message.
+     */
+    public Message getMessage()
+    {
+        return message;
+    }
+
+    /**
+     * Set the message.
+     *
+     * @param message The message.
+     */
+    public void setMessage(final Message message)
+    {
+        this.message = message;
+    }
+
+    /**
+     * Get the associated fault.
+     * @return The associated fault.
+     */
+    public Throwable getFault()
+    {
+        return fault;
+    }
+
+    /**
+     * Set the associated fault.
+     * @param fault The associated fault.
+     */
+    public void setFault(final Throwable fault)
+    {
+        this.fault = fault;
+    }
+
+    /**
+     * Get the processing event log.
+     * <p/>
+     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
+     * in the deployment configuration properties.
+     *
+     * @return The processing event log, or null if not attached.
+     */
+    public ProcessingEventLog getProcessingEventLog()
+    {
+        return processingEventLog;
+    }
+
+    /**
+     * Set the processing event log.
+     * <p/>
+     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
+     * in the deployment configuration properties.
+     *
+     * @param processingEventLog The processing event log, or null if not attached.
+     */
+    public void setProcessingEventLog(final ProcessingEventLog processingEventLog)
+    {
+        this.processingEventLog = processingEventLog;
+    }
+
+    /**
+     * Create a {@link BusMessage} instance from the supplied message and the existing thread context.
+     *
+     * @param theMessage Th message.
+     * @return The bundled {@link BusMessage} instance.
+     */
+    public static BusMessage create(final Message theMessage)
+    {
+        BusMessage busMessage = new BusMessage();
+
+        busMessage.setAddressingContext(AddressingContext.getContext());
+        busMessage.setInvocationParameters(InvocationContext.getContext().getInvocationParameters());
+        busMessage.setMessage(theMessage);
+
+        return busMessage;
+    }
+}


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

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessageListener.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessageListener.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessageListener.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessageListener.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+/**
+ * {@link BusMessage} Listener interface.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface BusMessageListener
+{
+    /**
+     * Message handler.
+     *
+     * @param busMessage The bus message.
+     * @throws RoutingException Message routing exception.
+     */
+    void onMessage(BusMessage busMessage) throws RoutingException;
+}
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusMessageListener.java
___________________________________________________________________
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + native

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusNotificationListener.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/BusNotificationListener.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusNotificationListener.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/bus/BusNotificationListener.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+/**
+ * Notification Listener interface.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface BusNotificationListener
+{
+    /**
+     * Deployment notification handler.
+     *
+     * @param notification The notification.
+     * @throws RoutingException Invalid deployment detected.
+     */
+    void onNotification(AbstractNotification notification) throws RoutingException;
+}


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

Modified: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/context/DeploymentContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/context/DeploymentContext.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/context/DeploymentContext.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -51,8 +51,23 @@
      * Context ThreadLocal.
      */
     private static ThreadLocal<DeploymentContext> contextTL = new ThreadLocal<DeploymentContext>();
+    private String deploymentId;
 
     /**
+     * Public constructor.
+     * 
+     * @param deploymentId Deployment ID.
+     */
+    public DeploymentContext(final String deploymentId)
+    {
+        if (deploymentId == null)
+        {
+            throw new IllegalArgumentException("null 'deploymentId' arg in method call.");
+        }
+        this.deploymentId = deploymentId;
+    }
+
+    /**
      * Set the {@link DeploymentContext} associated with the current thread.
      *
      * @param context The {@link DeploymentContext} associated with the current thread.
@@ -79,6 +94,15 @@
     }
 
     /**
+     * Get the deployment ID.
+     * @return The deployment ID.
+     */
+    public final String getDeploymentId()
+    {
+        return deploymentId;
+    }
+
+    /**
      * Set the list of deployment resources on the context.
      *
      * @param resources A list of deployment resources associated with this deployment.

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEvent.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEvent.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEvent.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEvent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,70 @@
+/*
+ * 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.history;
+
+import org.jboss.esb.api.context.DeploymentContext;
+
+import java.io.Serializable;
+
+/**
+ * Abstract processing Event.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class ProcessingEvent implements Serializable
+{
+    /**
+     * Event time.
+     */
+    private long time;
+    /**
+     * The deployment Id.
+     */
+    private String deploymentId;
+
+    /**
+     * Constructor.
+     */
+    protected ProcessingEvent()
+    {
+        time = System.currentTimeMillis();
+        deploymentId = DeploymentContext.getContext().getDeploymentId();
+    }
+
+    /**
+     * Get the event time.
+     *
+     * @return Event Time.
+     */
+    public final long getTime()
+    {
+        return time;
+    }
+
+    /**
+     * Get the deployment Id of the deployment on which the event occured.
+     *
+     * @return The deployment Id.
+     */
+    public final String getDeploymentId()
+    {
+        return deploymentId;
+    }
+}


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

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEventLog.java (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLog.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEventLog.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/ProcessingEventLog.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,154 @@
+/*
+ * 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.history;
+
+import org.jboss.esb.api.context.InvocationContext;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Processing event Log.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ProcessingEventLog implements Serializable
+{
+    /**
+     * Configuration key for event log propogation.
+     */
+    public static final String HISTORY_EVENT_PROPOGATE = "history.event.propagate";
+
+    /**
+     * Processing events.
+     */
+    private List<ProcessingEvent> processingEvents = new ArrayList<ProcessingEvent>();
+    /**
+     * Flag indicatiing whether or not the event log is to be propagated
+     * across delpoyments.
+     */
+    private boolean propagate;
+
+    /**
+     * Public Constructor.
+     *
+     * @param propagate Propagate the event log across deployments.
+     */
+    public ProcessingEventLog(final boolean propagate)
+    {
+        this.propagate = propagate;
+    }
+
+    /**
+     * Is the event log to be propagated across deployments.
+     *
+     * @return True if the event log is to be propagated, otherwise false.
+     */
+    public final boolean propagate()
+    {
+        return propagate;
+    }
+
+    /**
+     * Set the event log propagation flag.
+     *
+     * @param propagate True if the event log is to be propagated, otherwise false.
+     */
+    public final void setPropagate(final boolean propagate)
+    {
+        this.propagate = propagate;
+    }
+
+    /**
+     * Set the event log instance on the supplied InvocationContext.
+     *
+     * @param eventLog          The event log instance.
+     * @param invocationContext The InvocationContext.
+     */
+    public static void setEventLog(final ProcessingEventLog eventLog, final InvocationContext invocationContext)
+    {
+        if (eventLog == null)
+        {
+            throw new IllegalArgumentException("null 'eventLog' arg in method call.");
+        }
+        if (invocationContext == null)
+        {
+            throw new IllegalArgumentException("null 'invocationContext' arg in method call.");
+        }
+
+        invocationContext.setContextObject(ProcessingEventLog.class, eventLog);
+    }
+
+    /**
+     * Log a processing event.
+     *
+     * @param event The event to be logged.
+     */
+    public final void logEvent(final ProcessingEvent event)
+    {
+        if (event == null)
+        {
+            throw new IllegalArgumentException("null 'event' arg in method call.");
+        }
+        processingEvents.add(event);
+    }
+
+    /**
+     * Get the list of logged processing events.
+     *
+     * @return The list of logged processing events.
+     */
+    public final List<ProcessingEvent> getProcessingEvents()
+    {
+        return processingEvents;
+    }
+
+    /**
+     * Get a String representation of the event log.
+     *
+     * @return A String representation of the event log.
+     */
+    public final String toString()
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+
+        stringBuilder.append("Message Processing Event Log:\n");
+        if (processingEvents.isEmpty())
+        {
+            stringBuilder.append("\tNo events logged!");
+        }
+        else
+        {
+            for (int i = 0; i < processingEvents.size(); i++)
+            {
+                StringBuilder number = new StringBuilder();
+
+                number.append(i + 1);
+                number.append(".    ");
+                number.setLength(5);
+
+                stringBuilder.append("\t" + number + "[" + processingEvents.get(i).getDeploymentId() + "] " + processingEvents.get(i) + "\n");
+            }
+        }
+
+        return stringBuilder.toString();
+    }
+}


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

Copied: labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/package.html (from rev 24021, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/package.html)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/package.html	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/src/main/java/org/jboss/esb/api/history/package.html	2008-11-21 10:45:38 UTC (rev 24028)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+Message Processing History API.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file

Modified: labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/util/AssertArgument.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/util/AssertArgument.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/util/AssertArgument.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -50,8 +50,7 @@
     {
         if (arg == null)
         {
-            throw new IllegalArgumentException("null '" + argName
-                    + "' arg in method call.");
+            throw new IllegalArgumentException("null '" + argName + "' arg in method call.");
         }
         return arg;
     }

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-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentRuntime.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -22,33 +22,33 @@
 import org.apache.log4j.Logger;
 import org.jboss.esb.api.annotations.Initialize;
 import org.jboss.esb.api.annotations.Uninitialize;
-import org.jboss.esb.classpath.ClassUtil;
 import org.jboss.esb.api.context.DeploymentContext;
 import org.jboss.esb.api.context.ResourceLocator;
+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.classpath.ClassUtil;
 import org.jboss.esb.deploy.config.ConfigUtil;
 import org.jboss.esb.deploy.config.DeploymentUnit;
 import org.jboss.esb.deploy.config.InboundRouterConfig;
 import org.jboss.esb.deploy.config.InboundRouterFilterConfig;
 import org.jboss.esb.deploy.config.OutboundRouterConfig;
+import org.jboss.esb.deploy.config.ServiceConfig;
 import org.jboss.esb.deploy.config.PropertiesUtil;
-import org.jboss.esb.deploy.config.ServiceConfig;
 import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
 import org.jboss.esb.dispatch.DispatchChain;
 import org.jboss.esb.dispatch.FilteredDispatchChain;
 import org.jboss.esb.dispatch.LocalDispatcher;
+import org.jboss.esb.federate.BusMediator;
 import org.jboss.esb.federate.DeploymentCoordinator;
-import org.jboss.esb.federate.BusMediator;
 import org.jboss.esb.federate.bus.BusDispatcher;
 import org.jboss.esb.federate.bus.BusInboundRouter;
 import org.jboss.esb.federate.bus.BusOutboundRouter;
 import org.jboss.esb.federate.bus.BusRoutingContext;
-import org.jboss.esb.api.message.MessageProcessor;
 import org.jboss.esb.properties.ApplicationProperties;
 import org.jboss.esb.properties.PropertiesIterator;
-import org.jboss.esb.api.routing.MessageDispatcher;
 import org.jboss.esb.schedule.JobScheduler;
 import org.jboss.esb.schedule.SimpleSchedule;
-import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.util.AssertArgument;
 
 import java.io.IOException;
@@ -291,18 +291,18 @@
             throw new DeploymentException("Runtime already deployed.");
         }
 
-        context = new DeploymentContext();
+        deploymentProperties = PropertiesUtil.getDeploymentConfig(deploymentName, resourceLocator);
+        deploymentId = deploymentProperties.getProperty("deployment.id", deploymentId);
+        deploymentId += ":" + deploymentName;
 
+        context = new DeploymentContext(deploymentId);
+
         DeploymentContext.setContext(context);
         try
         {
             context.setContextObject(DeploymentRuntime.class, this);
             context.setContextObject(ResourceLocator.class, resourceLocator);
 
-            deploymentProperties = PropertiesUtil.getDeploymentConfig(deploymentName, resourceLocator);
-            deploymentId = deploymentProperties.getProperty("deployment.id", deploymentId);
-            deploymentId += ":" + deploymentName;
-
             logger.info("Starting JBoss ESB deployment: '" + deploymentName + "'.");
 
             // Add the pre-installed deployment units e.g. for the "Dead Letter" Service

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -28,9 +28,9 @@
 import org.jboss.esb.deploy.config.OutboundRouterConfig;
 import org.jboss.esb.deploy.config.ServiceConfig;
 import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.federate.bus.BusOutboundRouter;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.history.ProcessingEventLogAccessor;
 import org.jboss.esb.history.events.OutboundRouterProcessingEvent;
 import org.jboss.esb.history.events.ServiceProcessingEvent;
 import org.jboss.esb.api.message.Message;
@@ -207,7 +207,7 @@
                 addressingContext.setFrom(serviceName);
 
                 // Log this processing event...
-                ProcessingEventLog.getEventLog().logEvent(new ServiceProcessingEvent(serviceName));
+                ProcessingEventLogAccessor.getEventLog().logEvent(new ServiceProcessingEvent(serviceName));
 
                 // If we need to send a reply, send it now...
                 if (outMessage != null && replyTo != null)
@@ -357,7 +357,7 @@
                                 outRouter.route(outMessage);
 
                                 // Log this processing event...
-                                ProcessingEventLog.getEventLog().logEvent(new OutboundRouterProcessingEvent(outboundRouterConfig.getName()));
+                                ProcessingEventLogAccessor.getEventLog().logEvent(new OutboundRouterProcessingEvent(outboundRouterConfig.getName()));
                             }
                             catch (Throwable t)
                             {

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/LocalDispatcher.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/LocalDispatcher.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/LocalDispatcher.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -25,7 +25,7 @@
 import org.jboss.esb.api.context.InvocationContext;
 import org.jboss.esb.deploy.config.InboundRouterFilterConfig;
 import org.jboss.esb.deploy.config.FilterConfig;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.history.ProcessingEventLogAccessor;
 import org.jboss.esb.api.message.Message;
 import org.jboss.esb.api.message.MessageProcessor;
 import org.jboss.esb.util.AssertArgument;
@@ -147,7 +147,7 @@
                                 applyOutboundRouters(outMessage, dispatchChain.getServiceName(), dispatchChain.getOutboundRouters());
 
                                 // Log the event...
-                                if (ProcessingEventLog.getEventLog().getProcessingEvents().isEmpty())
+                                if (ProcessingEventLogAccessor.getEventLog().getProcessingEvents().isEmpty())
                                 {
                                     throw new IllegalStateException("Message not processed for Service Name '" + dispatchChain.getServiceName() + "'.  No Service instance or Outbound Router instances applied.");
                                 }

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-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/BusMediator.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -20,19 +20,18 @@
 package org.jboss.esb.federate;
 
 import org.apache.log4j.Logger;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessageListener;
 import org.jboss.esb.api.context.AddressingContext;
 import org.jboss.esb.api.context.DeploymentContext;
 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.federate.bus.Bus;
+import org.jboss.esb.api.bus.Bus;
 import org.jboss.esb.federate.bus.BusInboundRouter;
-import org.jboss.esb.federate.bus.BusMessage;
-import org.jboss.esb.federate.bus.BusMessageListener;
 import org.jboss.esb.federate.bus.BusOutboundRouter;
 import org.jboss.esb.federate.bus.BusRoutingContext;
-import org.jboss.esb.federate.notify.AbstractDeploymentNotification;
+import org.jboss.esb.api.bus.AbstractNotification;
 import org.jboss.esb.federate.notify.DeploymentDetailsNotification;
 import org.jboss.esb.federate.notify.DeploymentHeartbeatNotification;
 import org.jboss.esb.federate.notify.DeploymentUndeployNotification;
@@ -213,21 +212,21 @@
     /**
      * Bus notification listener.
      */
-    private class BusNotificationListener implements org.jboss.esb.federate.notify.BusNotificationListener
+    private class BusNotificationListener implements org.jboss.esb.api.bus.BusNotificationListener
     {
         /**
-         * Deployment notification handler.
+         * Deployment notification handler callback.
          *
          * @param notification The notification.
-         * @throws org.jboss.esb.deploy.DeploymentException Invalid deployment detected.
+         * @throws RoutingException Invalid deployment detected.
          */
-        public final synchronized void onNotification(final AbstractDeploymentNotification notification) throws DeploymentException
+        public final synchronized void onNotification(final AbstractNotification notification) throws RoutingException
         {
             String deploymentId = notification.getDeploymentId();
 
             if (runtime.getDeploymentId().equals(deploymentId))
             {
-                throw new DeploymentException("Cannot accept deployment notification for deployment '" + deploymentId + "'.  Deployment IDs must be unique!");
+                throw new RoutingException("Cannot accept deployment notification for deployment '" + deploymentId + "'.  Deployment IDs must be unique!");
             }
 
             if (notification instanceof DeploymentHeartbeatNotification)
@@ -303,16 +302,9 @@
          *
          * @throws org.jboss.esb.deploy.DeploymentException Failed to send.
          */
-        private void sendDeploymentDetailsNotification() throws DeploymentException
+        private void sendDeploymentDetailsNotification() throws RoutingException
         {
-            try
-            {
-                bus.sendNotification(onlineNotification);
-            }
-            catch (RoutingException e)
-            {
-                throw new DeploymentException("Failed to send DeploymentDetails notification broadcast out onto Bus (" + bus.getClass().getName() + ").", e);
-            }
+            bus.sendNotification(onlineNotification);
         }
     }
 

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-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentCoordinator.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -23,10 +23,10 @@
 import org.jboss.esb.api.annotations.Initialize;
 import org.jboss.esb.api.annotations.Uninitialize;
 import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.api.bus.Bus;
 import org.jboss.esb.deploy.DeploymentException;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.config.PropertiesUtil;
-import org.jboss.esb.federate.bus.Bus;
 import org.jboss.esb.federate.bus.BusFactory;
 import org.jboss.esb.federate.bus.BusRoutingContext;
 import org.jboss.esb.federate.notify.DeploymentUndeployNotification;

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentMonitor.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentMonitor.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentMonitor.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -23,9 +23,10 @@
 import org.jboss.esb.api.context.FaultContext;
 import org.jboss.esb.api.context.InvocationContext;
 import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.federate.bus.Bus;
-import org.jboss.esb.federate.bus.BusMessage;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.api.bus.Bus;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.history.ProcessingEventLog;
+import org.jboss.esb.history.ProcessingEventLogAccessor;
 import org.jboss.esb.history.events.BusRouterProcessingEvent;
 import org.jboss.esb.api.message.Message;
 import org.jboss.esb.invoke.ServiceInvoker;
@@ -184,7 +185,7 @@
     {
         try
         {
-            ProcessingEventLog eventLog = ProcessingEventLog.getEventLog();
+            ProcessingEventLog eventLog = ProcessingEventLogAccessor.getEventLog();
 
             // Log this processing event...
             eventLog.logEvent(new BusRouterProcessingEvent(message.getAddressingContext().getTo(), targetDeploymentId, bus.getClass()));
@@ -197,7 +198,7 @@
             }
 
             // And send the message out onto the bus...
-            bus.send(message, targetDeploymentId);
+            bus.sendMessage(message, targetDeploymentId);
 
             return true;
         }

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/Bus.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/Bus.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/Bus.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,117 +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.federate.bus;
-
-import org.jboss.esb.api.routing.RoutingException;
-import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.federate.notify.AbstractDeploymentNotification;
-import org.jboss.esb.federate.notify.BusNotificationListener;
-
-import java.util.Properties;
-
-/**
- * JBoss ESB Bus definition.
- * <p/>
- * Implementations of this interface act as the interface to a specfic
- * message aware Bus implementation, for the local deployment.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface Bus
-{
-    /**
-     * Set the deploymentName for the local deployment.
-     *
-     * @param deploymentName The deployment Name.
-     */
-    void setDeploymentName(String deploymentName);
-
-    /**
-     * Set the deploymentId for the local deployment.
-     *
-     * @param deploymentId The deployment ID.
-     */
-    void setDeploymentId(String deploymentId);
-
-    /**
-     * Set the Bus properties.
-     *
-     * @param properties The Bus properties.
-     */
-    void setProperties(Properties properties);
-
-    /**
-     * Connect the bus.
-     *
-     * @throws DeploymentException Connection exception.
-     */
-    void connect() throws RoutingException;
-
-    /**
-     * Is the bus connected.
-     *
-     * @return True if the bus is connected, otherwise false.
-     */
-    boolean isConnected();
-
-    /**
-     * Stop listening for ESB messages on the bus.
-     */
-    void stopListening();
-
-    /**
-     * Close the Bus.
-     */
-    void close();
-
-    /**
-     * 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.
-     */
-    void send(BusMessage message, String targetDeploymentId) throws RoutingException;
-
-    /**
-     * Set the bus message listener on the {@link Bus} implementation.
-     *
-     * @param listener The message listener.
-     */
-    void setMessageListener(BusMessageListener listener);
-
-    /**
-     * Set the bus notification listener.
-     *
-     * @param listener Notification listener.
-     */
-    void setNotificationListener(BusNotificationListener listener);
-
-    /**
-     * 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.
-     */
-    void sendNotification(AbstractDeploymentNotification notification) throws RoutingException;
-}

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-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusFactory.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -24,6 +24,7 @@
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.config.PropertiesUtil;
 import org.jboss.esb.properties.ApplicationProperties;
+import org.jboss.esb.api.bus.Bus;
 
 /**
  * Bus Factory class.

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusInboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusInboundRouter.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusInboundRouter.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -21,16 +21,17 @@
 
 import org.jboss.esb.api.context.AddressingContext;
 import org.jboss.esb.api.context.InvocationContext;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.api.history.ProcessingEventLog;
 import org.jboss.esb.api.message.Message;
 import org.jboss.esb.api.routing.MessageDispatcher;
 import org.jboss.esb.api.routing.InboundRouter;
 import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.api.bus.BusMessage;
 
 /**
  * Bus inbound router for a specific Service.
  * <p/>
- * Receives a message from a {@link Bus} and dispatches it to the
+ * Receives a message from a {@link org.jboss.esb.api.bus.Bus} and dispatches it to the
  * target service and router chain.
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -63,7 +64,7 @@
     }
 
     /**
-     * Receive a message from a {@link Bus}.
+     * Receive a message from a {@link org.jboss.esb.api.bus.Bus}.
      *
      * @param busMessage The bus message.
      * @throws RoutingException Error processing the message routed via the Bus.

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessage.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessage.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessage.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,193 +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.federate.bus;
-
-import org.jboss.esb.api.context.AddressingContext;
-import org.jboss.esb.api.context.InvocationContext;
-import org.jboss.esb.history.ProcessingEventLog;
-import org.jboss.esb.api.message.Message;
-
-import java.io.Serializable;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * ESB Bus Message.
- * <p/>
- * This class encapsulates the ESB {@link org.jboss.esb.api.message.Message} for transportation
- * on a Bus.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public final class BusMessage implements Serializable
-{
-    // TODO: Make Externalizable
-
-    /**
-     * Invocation Parameters.
-     */
-    private Map<String, String> invocationParameters = new LinkedHashMap<String, String>();
-    /**
-     * Addressing Context.
-     */
-    private AddressingContext addressingContext;
-    /**
-     * The fault.
-     */
-    private Throwable fault;
-    /**
-     * Message.
-     */
-    private Message message;
-    /**
-     * The processing event log.
-     * <p/>
-     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
-     * in the deployment configuration properties.
-     */
-    private ProcessingEventLog processingEventLog;
-
-    /**
-     * Get the invocation parameters provided with the initial
-     * service invocation.
-     * <p/>
-     * These parameters pass along with the {@link org.jboss.esb.api.message.Message}
-     *
-     * @return The invocation parameters.
-     */
-    public Map<String, String> getInvocationParameters()
-    {
-        return invocationParameters;
-    }
-
-    /**
-     * Set the invocation parameters provided with the initial
-     * service invocation.
-     * <p/>
-     * These parameters pass along with the {@link org.jboss.esb.api.message.Message}
-     *
-     * @param invocationParameters The invocation parameters.
-     */
-    public void setInvocationParameters(final Map<String, String> invocationParameters)
-    {
-        this.invocationParameters = invocationParameters;
-    }
-
-    /**
-     * Get the message Addressing Context.
-     *
-     * @return The message Addressing Context.
-     */
-    public AddressingContext getAddressingContext()
-    {
-        return addressingContext;
-    }
-
-    /**
-     * Set the message Addressing Context.
-     *
-     * @param addressingContext The message Addressing Context.
-     */
-    public void setAddressingContext(final AddressingContext addressingContext)
-    {
-        this.addressingContext = addressingContext;
-    }
-
-    /**
-     * Get the message.
-     *
-     * @return The message.
-     */
-    public Message getMessage()
-    {
-        return message;
-    }
-
-    /**
-     * Set the message.
-     *
-     * @param message The message.
-     */
-    public void setMessage(final Message message)
-    {
-        this.message = message;
-    }
-
-    /**
-     * Get the associated fault.
-     * @return The associated fault.
-     */
-    public Throwable getFault()
-    {
-        return fault;
-    }
-
-    /**
-     * Set the associated fault.
-     * @param fault The associated fault.
-     */
-    public void setFault(final Throwable fault)
-    {
-        this.fault = fault;
-    }
-
-    /**
-     * Get the processing event log.
-     * <p/>
-     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
-     * in the deployment configuration properties.
-     *
-     * @return The processing event log, or null if not attached.
-     */
-    public ProcessingEventLog getProcessingEventLog()
-    {
-        return processingEventLog;
-    }
-
-    /**
-     * Set the processing event log.
-     * <p/>
-     * Only attached for debug/trace purposes.  See the "history.event.propagate" property
-     * in the deployment configuration properties.
-     *
-     * @param processingEventLog The processing event log, or null if not attached.
-     */
-    public void setProcessingEventLog(final ProcessingEventLog processingEventLog)
-    {
-        this.processingEventLog = processingEventLog;
-    }
-
-    /**
-     * Create a {@link BusMessage} instance from the supplied message and the existing thread context.
-     *
-     * @param theMessage Th message.
-     * @return The bundled {@link BusMessage} instance.
-     */
-    public static BusMessage create(final Message theMessage)
-    {
-        BusMessage busMessage = new BusMessage();
-
-        busMessage.setAddressingContext(AddressingContext.getContext());
-        busMessage.setInvocationParameters(InvocationContext.getContext().getInvocationParameters());
-        busMessage.setMessage(theMessage);
-
-        return busMessage;
-    }
-}

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessageListener.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessageListener.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusMessageListener.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,38 +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.federate.bus;
-
-import org.jboss.esb.api.routing.RoutingException;
-
-/**
- * {@link BusMessage} Listener interface.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface BusMessageListener
-{
-    /**
-     * Message handler.
-     *
-     * @param busMessage The bus message.
-     * @throws RoutingException Message routing exception.
-     */
-    void onMessage(BusMessage busMessage) throws RoutingException;
-}
\ No newline at end of file

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusOutboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusOutboundRouter.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusOutboundRouter.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -26,6 +26,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.api.bus.BusMessage;
 
 import java.util.ArrayList;
 import java.util.List;

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusRoutingContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusRoutingContext.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/BusRoutingContext.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -30,7 +30,7 @@
 /**
  * Bus routing context.
  * <p/>
- * Contains {@link Bus} routing info relating to the local deployment.
+ * Contains {@link org.jboss.esb.api.bus.Bus} routing info relating to the local deployment.
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/jms/JMSBus.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/jms/JMSBus.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/bus/jms/JMSBus.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -23,13 +23,13 @@
 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.bus.BusMessageListener;
 import org.jboss.esb.deploy.DeploymentException;
 import org.jboss.esb.deploy.DeploymentRuntime;
-import org.jboss.esb.federate.bus.Bus;
-import org.jboss.esb.federate.bus.BusMessage;
-import org.jboss.esb.federate.bus.BusMessageListener;
-import org.jboss.esb.federate.notify.AbstractDeploymentNotification;
-import org.jboss.esb.federate.notify.BusNotificationListener;
+import org.jboss.esb.api.bus.Bus;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.bus.AbstractNotification;
+import org.jboss.esb.api.bus.BusNotificationListener;
 import org.jboss.esb.jms.AbstractMessageHandler;
 import org.jboss.esb.jms.AbstractMessageListener;
 import org.jboss.esb.jms.JMSSession;
@@ -258,7 +258,7 @@
      * @param targetDeploymentId The target deployment ID.
      * @throws RoutingException Error sending message onto the Bus.
      */
-    public final void send(final BusMessage message, final String targetDeploymentId) throws RoutingException
+    public final void sendMessage(final BusMessage message, final String targetDeploymentId) throws RoutingException
     {
         try
         {
@@ -302,7 +302,7 @@
      * @param notification The notification message to be sent onto the Bus.
      * @throws RoutingException Error sending notification onto the Bus.
      */
-    public final void sendNotification(final AbstractDeploymentNotification notification) throws RoutingException
+    public final void sendNotification(final AbstractNotification notification) throws RoutingException
     {
         if (notificationSender != null)
         {
@@ -531,21 +531,22 @@
                 {
                     Object objectMessage = ((ObjectMessage) message).getObject();
 
-                    if (objectMessage instanceof AbstractDeploymentNotification)
+                    if (objectMessage instanceof AbstractNotification)
                     {
+                        AbstractNotification notification = (AbstractNotification) objectMessage;
                         try
                         {
-                            notificationCallback.onNotification((AbstractDeploymentNotification) objectMessage);
+                            notificationCallback.onNotification(notification);
                         }
-                        catch (DeploymentException e)
+                        catch (RoutingException e)
                         {
-                            logger.error("Error processing deployment coodination notification: " + objectMessage, e);
+                            logger.error("Deployment '" + deploymentId + "' failed to accept notification '" + notification.getClass().getName() + "' from '" + notification.getDeploymentId() +  "'.", e);
                         }
                     }
                 }
                 catch (JMSException e)
                 {
-                    logger.warn("Unable to get Object from JMS ObjectMessage.", e);
+                    logger.error("Unable to get Object from JMS ObjectMessage.", e);
                 }
             }
         }

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/AbstractDeploymentNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/AbstractDeploymentNotification.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/AbstractDeploymentNotification.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,79 +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.federate.notify;
-
-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 deploymentName;
-    /**
-     * The deployment ID.
-     */
-    private String deploymentId;
-
-    /**
-     * Get the deployment name.
-     *
-     * @return The deployment name.
-     */
-    public final String getDeploymentName()
-    {
-        return deploymentName;
-    }
-
-    /**
-     * Set the deployment name.
-     *
-     * @param deploymentName The deployment name.
-     */
-    public final void setDeploymentName(final String deploymentName)
-    {
-        this.deploymentName = deploymentName;
-    }
-
-    /**
-     * 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;
-    }
-}

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/BusNotificationListener.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/BusNotificationListener.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/BusNotificationListener.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,38 +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.federate.notify;
-
-import org.jboss.esb.deploy.DeploymentException;
-
-/**
- * Notification Listener interface.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface BusNotificationListener
-{
-    /**
-     * Deployment notification handler.
-     *
-     * @param notification The notification.
-     * @throws DeploymentException Invalid deployment detected.
-     */
-    void onNotification(AbstractDeploymentNotification notification) throws DeploymentException;
-}

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -23,6 +23,7 @@
 import org.jboss.esb.deploy.config.DeploymentUnit;
 import org.jboss.esb.deploy.config.ServiceConfig;
 import org.jboss.esb.federate.DeploymentServiceSets;
+import org.jboss.esb.api.bus.AbstractNotification;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -36,7 +37,7 @@
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
-public class DeploymentDetailsNotification extends AbstractDeploymentNotification
+public class DeploymentDetailsNotification extends AbstractNotification
 {
     /**
      * The list of services contained in the deployment.

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentHeartbeatNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentHeartbeatNotification.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentHeartbeatNotification.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -20,6 +20,7 @@
 package org.jboss.esb.federate.notify;
 
 import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.api.bus.AbstractNotification;
 
 /**
  * Simple deployment heartbeat notification.
@@ -29,7 +30,7 @@
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
-public class DeploymentHeartbeatNotification extends AbstractDeploymentNotification
+public class DeploymentHeartbeatNotification extends AbstractNotification
 {
 
     /**

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentUndeployNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentUndeployNotification.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentUndeployNotification.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -20,6 +20,7 @@
 package org.jboss.esb.federate.notify;
 
 import org.jboss.esb.deploy.DeploymentRuntime;
+import org.jboss.esb.api.bus.AbstractNotification;
 
 /**
  * Deployment undeploy notification.
@@ -29,7 +30,7 @@
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
-public class DeploymentUndeployNotification extends AbstractDeploymentNotification
+public class DeploymentUndeployNotification extends AbstractNotification
 {
 
     /**

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEvent.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEvent.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEvent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,71 +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.history;
-
-import org.jboss.esb.api.context.DeploymentContext;
-import org.jboss.esb.deploy.DeploymentRuntime;
-
-import java.io.Serializable;
-
-/**
- * Abstract processing Event.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class ProcessingEvent implements Serializable
-{
-    /**
-     * Event time.
-     */
-    private long time;
-    /**
-     * The deployment Id.
-     */
-    private String deploymentId;
-
-    /**
-     * Constructor.
-     */
-    protected ProcessingEvent()
-    {
-        time = System.currentTimeMillis();
-        deploymentId = DeploymentRuntime.getRuntime(DeploymentContext.getContext()).getDeploymentId();
-    }
-
-    /**
-     * Get the event time.
-     *
-     * @return Event Time.
-     */
-    public final long getTime()
-    {
-        return time;
-    }
-
-    /**
-     * Get the deployment Id of the deployment on which the event occured.
-     *
-     * @return The deployment Id.
-     */
-    public final String getDeploymentId()
-    {
-        return deploymentId;
-    }
-}

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLog.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLog.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLog.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -1,180 +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.history;
-
-import org.jboss.esb.api.context.DeploymentContext;
-import org.jboss.esb.api.context.InvocationContext;
-import org.jboss.esb.deploy.DeploymentRuntime;
-import org.jboss.esb.util.AssertArgument;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Processing event Log.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ProcessingEventLog implements Serializable
-{
-    /**
-     * Configuration key for event log propogation.
-     */
-    private static final String HISTORY_EVENT_PROPOGATE = "history.event.propagate";
-
-    /**
-     * Processing events.
-     */
-    private List<ProcessingEvent> processingEvents = new ArrayList<ProcessingEvent>();
-    /**
-     * Flag indicatiing whether or not the event log is to be propagated
-     * across delpoyments.
-     */
-    private boolean propagate;
-
-    /**
-     * Public Constructor.
-     *
-     * @param propagate Propagate the event log across deployments.
-     */
-    public ProcessingEventLog(final boolean propagate)
-    {
-        this.propagate = propagate;
-    }
-
-    /**
-     * Get the {@link ProcessingEventLog} from the current {@linkInvocationContext}.
-     *
-     * @return The Processing Event Log.
-     */
-    public static ProcessingEventLog getEventLog()
-    {
-        return getEventLog(InvocationContext.getContext());
-    }
-
-    /**
-     * Is the event log to be propagated across deployments.
-     *
-     * @return True if the event log is to be propagated, otherwise false.
-     */
-    public final boolean propagate()
-    {
-        return propagate;
-    }
-
-    /**
-     * Set the event log propagation flag.
-     *
-     * @param propagate True if the event log is to be propagated, otherwise false.
-     */
-    public final void setPropagate(final boolean propagate)
-    {
-        this.propagate = propagate;
-    }
-
-    /**
-     * Get the {@link ProcessingEventLog} from the {@linkInvocationContext}.
-     *
-     * @param invocationContext The {@linkInvocationContext}.
-     * @return The Processing Event Log.
-     */
-    public static ProcessingEventLog getEventLog(final InvocationContext invocationContext)
-    {
-        AssertArgument.isNotNull(invocationContext, "invocationContext");
-        ProcessingEventLog eventLog = (ProcessingEventLog) invocationContext.getContextObject(ProcessingEventLog.class);
-
-        if (eventLog == null)
-        {
-            DeploymentContext deploymentContext = DeploymentContext.getContext();
-            DeploymentRuntime runtime = DeploymentRuntime.getRuntime(deploymentContext);
-
-            eventLog = new ProcessingEventLog(runtime.getDeploymentProperties().getBooleanProperty(HISTORY_EVENT_PROPOGATE, false));
-            setEventLog(eventLog, invocationContext);
-        }
-
-        return eventLog;
-    }
-
-    /**
-     * Set the event log instance on the supplied InvocationContext.
-     *
-     * @param eventLog          The event log instance.
-     * @param invocationContext The InvocationContext.
-     */
-    public static void setEventLog(final ProcessingEventLog eventLog, final InvocationContext invocationContext)
-    {
-        AssertArgument.isNotNull(eventLog, "eventLog");
-        AssertArgument.isNotNull(invocationContext, "invocationContext");
-        invocationContext.setContextObject(ProcessingEventLog.class, eventLog);
-    }
-
-    /**
-     * Log a processing event.
-     *
-     * @param event The event to be logged.
-     */
-    public final void logEvent(final ProcessingEvent event)
-    {
-        AssertArgument.isNotNull(event, "event");
-        processingEvents.add(event);
-    }
-
-    /**
-     * Get the list of logged processing events.
-     *
-     * @return The list of logged processing events.
-     */
-    public final List<ProcessingEvent> getProcessingEvents()
-    {
-        return processingEvents;
-    }
-
-    /**
-     * Get a String representation of the event log.
-     *
-     * @return A String representation of the event log.
-     */
-    public final String toString()
-    {
-        StringBuilder stringBuilder = new StringBuilder();
-
-        stringBuilder.append("Message Processing Event Log:\n");
-        if (processingEvents.isEmpty())
-        {
-            stringBuilder.append("\tNo events logged!");
-        }
-        else
-        {
-            for (int i = 0; i < processingEvents.size(); i++)
-            {
-                StringBuilder number = new StringBuilder();
-
-                number.append(i + 1);
-                number.append(".    ");
-                number.setLength(5);
-
-                stringBuilder.append("\t" + number + "[" + processingEvents.get(i).getDeploymentId() + "] " + processingEvents.get(i) + "\n");
-            }
-        }
-
-        return stringBuilder.toString();
-    }
-}

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLogAccessor.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLogAccessor.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/ProcessingEventLogAccessor.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -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.history;
+
+import org.jboss.esb.api.context.InvocationContext;
+import org.jboss.esb.api.context.DeploymentContext;
+import org.jboss.esb.api.history.ProcessingEventLog;
+import org.jboss.esb.util.AssertArgument;
+import org.jboss.esb.deploy.DeploymentRuntime;
+
+/**
+ * Accessor for an {@link InvocationContext InvocationContext's} {@link ProcessingEventLog}.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class ProcessingEventLogAccessor
+{
+    /**
+     * Provate constructor.
+     */
+    private ProcessingEventLogAccessor()
+    {
+    }
+
+    /**
+     * Get the {@link org.jboss.esb.api.history.ProcessingEventLog} from the current {@link InvocationContext}.
+     *
+     * @return The Processing Event Log.
+     */
+    public static ProcessingEventLog getEventLog()
+    {
+        return getEventLog(InvocationContext.getContext());
+    }
+
+    /**
+     * Get the {@link org.jboss.esb.api.history.ProcessingEventLog} from the {@link InvocationContext}.
+     *
+     * @param invocationContext The {@link InvocationContext}.
+     * @return The Processing Event Log.
+     */
+    public static ProcessingEventLog getEventLog(final InvocationContext invocationContext)
+    {
+        AssertArgument.isNotNull(invocationContext, "invocationContext");
+        ProcessingEventLog eventLog = (ProcessingEventLog) invocationContext.getContextObject(ProcessingEventLog.class);
+
+        if (eventLog == null)
+        {
+            DeploymentContext deploymentContext = DeploymentContext.getContext();
+            DeploymentRuntime runtime = DeploymentRuntime.getRuntime(deploymentContext);
+
+            eventLog = new ProcessingEventLog(runtime.getDeploymentProperties().getBooleanProperty(ProcessingEventLog.HISTORY_EVENT_PROPOGATE, false));
+            ProcessingEventLog.setEventLog(eventLog, invocationContext);
+        }
+
+        return eventLog;
+    }
+}


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

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/BusRouterProcessingEvent.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/BusRouterProcessingEvent.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/BusRouterProcessingEvent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -20,8 +20,8 @@
 package org.jboss.esb.history.events;
 
 import org.jboss.esb.api.service.ServiceName;
-import org.jboss.esb.federate.bus.Bus;
-import org.jboss.esb.history.ProcessingEvent;
+import org.jboss.esb.api.bus.Bus;
+import org.jboss.esb.api.history.ProcessingEvent;
 
 /**
  * Bus Router Processing Event.

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/OutboundRouterProcessingEvent.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/OutboundRouterProcessingEvent.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/OutboundRouterProcessingEvent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -19,7 +19,7 @@
  */
 package org.jboss.esb.history.events;
 
-import org.jboss.esb.history.ProcessingEvent;
+import org.jboss.esb.api.history.ProcessingEvent;
 
 /**
  * Outbound router event.

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/ServiceProcessingEvent.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/ServiceProcessingEvent.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/history/events/ServiceProcessingEvent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -19,7 +19,7 @@
  */
 package org.jboss.esb.history.events;
 
-import org.jboss.esb.history.ProcessingEvent;
+import org.jboss.esb.api.history.ProcessingEvent;
 import org.jboss.esb.api.service.ServiceName;
 
 /**

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceInvoker.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/invoke/ServiceInvoker.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -29,12 +29,13 @@
 import org.jboss.esb.federate.DeploymentMonitor;
 import org.jboss.esb.federate.BusMediator;
 import org.jboss.esb.federate.bus.BusInboundRouter;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.federate.bus.BusRoutingContext;
 import org.jboss.esb.api.message.Message;
 import org.jboss.esb.api.service.ServiceName;
+import org.jboss.esb.api.history.ProcessingEventLog;
 import org.jboss.esb.util.AssertArgument;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.history.ProcessingEventLogAccessor;
 import org.jboss.esb.serialization.java.JavaSerializer;
 import org.jboss.esb.serialization.SerializationException;
 
@@ -137,7 +138,7 @@
     {
         InvocationContext thisInvocationContext = InvocationContext.getContext();
         AddressingContext thisAddressingContext = AddressingContext.getContext();
-        ProcessingEventLog eventLog = ProcessingEventLog.getEventLog();
+        ProcessingEventLog eventLog = ProcessingEventLogAccessor.getEventLog();
 
         // Set the Addressing context for the new Service Invocation...
         AddressingContext.setContext(dispatchAddressingContext);

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/ESBTestComponent.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/ESBTestComponent.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/ESBTestComponent.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -20,7 +20,8 @@
 package org.jboss.esb;
 
 import junit.framework.TestCase;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.api.history.ProcessingEventLog;
+import org.jboss.esb.history.ProcessingEventLogAccessor;
 import org.jboss.esb.api.context.InvocationContext;
 import org.jboss.esb.api.context.AddressingContext;
 import org.jboss.esb.api.context.DeploymentContext;
@@ -90,7 +91,7 @@
         invocationContext = InvocationContext.getContext();
         addressingContext = AddressingContext.getContext();
         deploymentContext = DeploymentContext.getContext();
-        eventLog = ProcessingEventLog.getEventLog();
+        eventLog = ProcessingEventLogAccessor.getEventLog();
     }
 
     public void throwException() throws ServiceException, RoutingException

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/TestInboundRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/TestInboundRouter.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/TestInboundRouter.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -22,7 +22,7 @@
 import org.jboss.esb.api.context.InvocationContext;
 import org.jboss.esb.api.message.Message;
 import org.jboss.esb.api.routing.MessageDispatcher;
-import org.jboss.esb.history.ProcessingEventLog;
+import org.jboss.esb.api.history.ProcessingEventLog;
 import org.jboss.esb.api.routing.InboundRouter;
 
 /**

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/bus/jms/JMSBus_Standalone_Test.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/bus/jms/JMSBus_Standalone_Test.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/bus/jms/JMSBus_Standalone_Test.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -21,10 +21,11 @@
 
 import junit.framework.TestCase;
 import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.federate.bus.BusMessage;
-import org.jboss.esb.federate.bus.BusMessageListener;
-import org.jboss.esb.federate.notify.BusNotificationListener;
-import org.jboss.esb.federate.notify.AbstractDeploymentNotification;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessageListener;
+import org.jboss.esb.api.bus.AbstractNotification;
+import org.jboss.esb.api.routing.RoutingException;
+import org.jboss.esb.api.bus.BusNotificationListener;
 import org.jboss.esb.federate.notify.DeploymentHeartbeatNotification;
 import org.jboss.esb.test.JmsTestRunner;
 import org.jboss.esb.properties.ApplicationProperties;
@@ -66,7 +67,7 @@
                             assertEquals(0, interface1Listener.messagesReceived.size());
                             assertEquals(0, interface2Listener.messagesReceived.size());
                             assertEquals(0, interface3Listener.messagesReceived.size());
-                            interface1.send(message, "deployment2");
+                            interface1.sendMessage(message, "deployment2");
                             Thread.sleep(100);
                             assertEquals(0, interface1Listener.messagesReceived.size());
                             assertEquals(1, interface2Listener.messagesReceived.size());
@@ -77,7 +78,7 @@
                             assertEquals(0, interface1Listener.messagesReceived.size());
                             assertEquals(0, interface2Listener.messagesReceived.size());
                             assertEquals(0, interface3Listener.messagesReceived.size());
-                            interface2.send(message, "deployment3");
+                            interface2.sendMessage(message, "deployment3");
                             Thread.sleep(100);
                             assertEquals(0, interface1Listener.messagesReceived.size());
                             assertEquals(0, interface2Listener.messagesReceived.size());
@@ -88,7 +89,7 @@
                             assertEquals(0, interface1Listener.messagesReceived.size());
                             assertEquals(0, interface2Listener.messagesReceived.size());
                             assertEquals(0, interface3Listener.messagesReceived.size());
-                            interface3.send(message, "deployment1");
+                            interface3.sendMessage(message, "deployment1");
                             Thread.sleep(100);
                             assertEquals(1, interface1Listener.messagesReceived.size());
                             assertEquals(0, interface2Listener.messagesReceived.size());
@@ -224,9 +225,9 @@
 
     private class TestNotificationListener implements BusNotificationListener
     {
-        private List<AbstractDeploymentNotification> notificationsReceived = new ArrayList<AbstractDeploymentNotification>();
+        private List<AbstractNotification> notificationsReceived = new ArrayList<AbstractNotification>();
 
-        public void onNotification(AbstractDeploymentNotification notification)
+        public void onNotification(AbstractNotification notification) throws RoutingException
         {
             notificationsReceived.add(notification);
         }

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_011/RoutingTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_011/RoutingTest.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_011/RoutingTest.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -26,7 +26,7 @@
 import org.jboss.esb.test.JmsTestRunner;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.DeploymentUtil;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.api.service.ServiceException;
 import org.jboss.esb.api.service.ServiceName;
 

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_012/RoutingTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_012/RoutingTest.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_012/RoutingTest.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -27,7 +27,7 @@
 import org.jboss.esb.deploy.DeploymentUtil;
 import org.jboss.esb.failure.DeadLetterPersistanceService;
 import org.jboss.esb.failure.MockDeadLetterService;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.api.service.ServiceName;
 
 /**

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_013/RoutingTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_013/RoutingTest.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_013/RoutingTest.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -26,7 +26,7 @@
 import org.jboss.esb.deploy.DeploymentUtil;
 import org.jboss.esb.failure.DeadLetterPersistanceService;
 import org.jboss.esb.failure.MockDeadLetterService;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.test.JmsTestRunner;
 import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.api.service.ServiceException;

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_014/RoutingTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_014/RoutingTest.java	2008-11-21 09:44:40 UTC (rev 24027)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_014/RoutingTest.java	2008-11-21 10:45:38 UTC (rev 24028)
@@ -28,7 +28,7 @@
 import org.jboss.esb.deploy.DeploymentUtil;
 import org.jboss.esb.failure.DeadLetterPersistanceService;
 import org.jboss.esb.failure.MockDeadLetterService;
-import org.jboss.esb.federate.bus.BusMessage;
+import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.api.routing.RoutingException;
 import org.jboss.esb.api.service.ServiceName;
 




More information about the jboss-svn-commits mailing list