[jboss-svn-commits] JBL Code SVN: r24171 - in labs/jbossesb/workspace/skeagh: examples/jms-routing/esb/src/main/resources and 14 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Dec 1 08:20:05 EST 2008


Author: tfennelly
Date: 2008-12-01 08:20:04 -0500 (Mon, 01 Dec 2008)
New Revision: 24171

Added:
   labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/
   labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/package.html
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/InVMDeadLetterService.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/PersistedDeadLetterService.java
Removed:
   labs/jbossesb/workspace/skeagh/examples/jms-routing/esb/src/main/resources/jndi.properties
   labs/jbossesb/workspace/skeagh/examples/jms-routing/esb/src/test/resources/
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/DeadLetterPersistanceService.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java
Modified:
   labs/jbossesb/workspace/skeagh/examples/pom.xml
   labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml
   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/federate/DeploymentMonitor.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/preinstalled/deadletter.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/DeploymentCoordinatorTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/businjection/BusInjectionTest.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
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml
Log:
https://jira.jboss.org/jira/browse/JBESB-2182

Deleted: labs/jbossesb/workspace/skeagh/examples/jms-routing/esb/src/main/resources/jndi.properties
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/jms-routing/esb/src/main/resources/jndi.properties	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/examples/jms-routing/esb/src/main/resources/jndi.properties	2008-12-01 13:20:04 UTC (rev 24171)
@@ -1,17 +0,0 @@
-java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:61717
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as. 
-connectionFactoryNames = connectionFactory, ConnectionFactory, queueConnectionFactory, topicConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.jbossesb.TestQueue = jbossesb.TestQueue
-queue.jbossesb.TestOutQueue = jbossesb.TestOutQueue
-
-queue.jbossesb.jms.bus = jbossesb.jms.bus
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-topic.jbossesb.deployment.coordintation.topic = jbossesb.deployment.coordintation.topic

Modified: labs/jbossesb/workspace/skeagh/examples/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/examples/pom.xml	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/examples/pom.xml	2008-12-01 13:20:04 UTC (rev 24171)
@@ -22,6 +22,7 @@
     <modules>
         <module>jms-routing</module>
         <module>file-routing</module>
+        <module>jms-bus</module>
     </modules>
 
 </project>

Modified: labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/performance/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:20:04 UTC (rev 24171)
@@ -7,7 +7,7 @@
     </resources>
     
     <services>
-        <service serviceCategory="JBossESB" serviceName="DeadLetterPersistanceService" serviceDescription="Mock Dead Letter Service" class="org.jboss.esb.failure.MockDeadLetterService">
+        <service serviceCategory="JBossESB" serviceName="DeadLetterService" serviceDescription="InVM Dead Letter Service" class="org.jboss.esb.failure.InVMDeadLetterService">
             <property name="scheduleResourceId">redeliverSchedule</property>
         </service>
     </services>

Copied: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/package.html (from rev 24166, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/package.html)
===================================================================
--- labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/package.html	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/package.html	2008-12-01 13:20:04 UTC (rev 24171)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JMS test utilities.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/routing/jms/src/main/java/org/jboss/esb/jms/test/package.html
___________________________________________________________________
Name: svn:mergeinfo
   + 

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-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -27,7 +27,7 @@
 import org.jboss.esb.deploy.config.FilterConfig;
 import org.jboss.esb.deploy.config.OutboundRouterConfig;
 import org.jboss.esb.deploy.config.ServiceConfig;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
 import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.federate.bus.BusOutboundRouter;
 import org.jboss.esb.history.ProcessingEventLogAccessor;
@@ -246,13 +246,13 @@
                 }
                 else
                 {
-                    logger.debug("ServiceException in service '" + serviceName + "'.  'faultTo' address not specified.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", e);
+                    logger.debug("ServiceException in service '" + serviceName + "'.  'faultTo' address not specified.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", e);
                     routeToDeadLetterService(theMessage, e);
                 }
             }
             catch (Throwable t)
             {
-                logger.debug("Non ServiceException in service '" + serviceName + "'.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", t);
+                logger.debug("Non ServiceException in service '" + serviceName + "'.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", t);
                 routeToDeadLetterService(theMessage, t);
             }
         }
@@ -296,7 +296,7 @@
                                 }
                                 catch (Throwable t)
                                 {
-                                    logger.debug("Exception routing message to Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", t);
+                                    logger.debug("Exception routing message to Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", t);
                                     routeToDeadLetterService(message, t);
                                 }
                                 // In this case, we don't pass the message to the outrouters (below).
@@ -322,7 +322,7 @@
                             }
                             catch (Throwable t)
                             {
-                                logger.debug("Exception routing message to remote OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", t);
+                                logger.debug("Exception routing message to remote OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", t);
                                 routeToDeadLetterService(message, t);
                             }
                         }
@@ -348,7 +348,7 @@
                             }
                             catch (Throwable t)
                             {
-                                logger.debug("Exception applying message processors on OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", t);
+                                logger.debug("Exception applying message processors on OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", t);
                                 // Route the original message to the DLS...
                                 routeToDeadLetterService(message, t);
                                 continue;
@@ -362,7 +362,7 @@
                             }
                             catch (Throwable t)
                             {
-                                logger.debug("Exception routing message to OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + DeadLetterPersistanceService.SERVICE_NAME + "'.", t);
+                                logger.debug("Exception routing message to OutboundRouter for Service '" + addressContext.getTo() + "' via OutboundRouter.  Router Configuration '" + outboundRouterConfig.getName() + "'.  Routing to Dead Letter Service '" + PersistedDeadLetterService.SERVICE_NAME + "'.", t);
                                 // Route the original message to the DLS...
                                 routeToDeadLetterService(message, t);
                             }
@@ -484,7 +484,7 @@
      */
     public static boolean routeToDeadLetterService(final Message theMessage, final Throwable theFault, final AddressingContext addressingContext, final ServiceInvoker serviceInvoker)
     {
-        if (addressingContext.getTo().equals(DeadLetterPersistanceService.SERVICE_NAME))
+        if (addressingContext.getTo().equals(PersistedDeadLetterService.SERVICE_NAME))
         {
             return false;
         }
@@ -494,9 +494,9 @@
 
         faultContext.setFaultMessage(theMessage);
         faultContext.setFault(theFault);
-        faultContext.setFaultRecipient(DeadLetterPersistanceService.SERVICE_NAME);
+        faultContext.setFaultRecipient(PersistedDeadLetterService.SERVICE_NAME);
         busMessage.setFault(theFault);
 
-        return serviceInvoker.send(new Message(busMessage), DeadLetterPersistanceService.SERVICE_NAME);
+        return serviceInvoker.send(new Message(busMessage), PersistedDeadLetterService.SERVICE_NAME);
     }
 }

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/DeadLetterPersistanceService.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/DeadLetterPersistanceService.java	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/DeadLetterPersistanceService.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -1,50 +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.failure;
-
-import org.jboss.esb.api.message.Message;
-import org.jboss.esb.api.service.Service;
-import org.jboss.esb.api.service.ServiceException;
-import org.jboss.esb.api.service.ServiceName;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class DeadLetterPersistanceService implements Service
-{
-
-    /**
-     * Service name.
-     */
-    public static final ServiceName SERVICE_NAME = new ServiceName("JBossESB", DeadLetterPersistanceService.class.getSimpleName());
-
-    /**
-     * Persist the Dead Letter message.
-     * @param message The message.
-     * @return The original message.
-     * @throws ServiceException An exception occured while persisting the message.
-     */
-    public final Message process(final Message message) throws ServiceException
-    {
-        // TODO
-        System.out.println("Message delivered to DeadLetterPersistanceService");
-        return message;
-    }
-}

Copied: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/InVMDeadLetterService.java (from rev 24166, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/InVMDeadLetterService.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/InVMDeadLetterService.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -0,0 +1,200 @@
+/*
+ * 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.failure;
+
+import org.apache.log4j.Logger;
+import org.jboss.esb.api.annotations.Initialize;
+import org.jboss.esb.api.bus.BusMessage;
+import org.jboss.esb.api.context.DeploymentContext;
+import org.jboss.esb.api.context.InvocationContext;
+import org.jboss.esb.api.message.Message;
+import org.jboss.esb.api.service.Service;
+import org.jboss.esb.api.service.ServiceException;
+import org.jboss.esb.api.exception.DeploymentException;
+import org.jboss.esb.invoke.ServiceInvoker;
+import org.jboss.esb.schedule.AbstractScheduleListener;
+import org.jboss.esb.schedule.SchedulingException;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * InVM Dead Letter Service.
+ * <p/>
+ * This implementation is volatile (obviously enough :) ).
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class InVMDeadLetterService extends AbstractScheduleListener implements Service
+{
+
+    /**
+     * Logger.
+     */
+    private static Logger logger = Logger.getLogger(InVMDeadLetterService.class);
+
+    /**
+     * Flag to indicate whether or not the Service is expecting delivery of dead messages.
+     */
+    private boolean expectingMessages = false;
+    /**
+     * Exception to throw.
+     */
+    private Exception throwException = null;
+    /**
+     * Messages.
+     */
+    private Queue<BusMessage> messages = new ConcurrentLinkedQueue<BusMessage>();
+    /**
+     * Deployment context.
+     */
+    private DeploymentContext deploymentContext;
+    /**
+     * ServiceInvoker.
+     */
+    private ServiceInvoker serviceInvoker;
+
+    /**
+     * Initialize the router.
+     * @throws DeploymentException If an error occurs during initialization.
+     */
+    @Initialize
+    public final void initialize() throws DeploymentException
+    {
+        serviceInvoker = new ServiceInvoker(deploymentContext);
+    }
+    
+    /**
+     * Service process method.
+     *
+     * @param message The message to be processed.
+     * @return The resultant {@link Message}.
+     * @throws ServiceException Service exception processing the message.
+     */
+    public final Message process(final Message message) throws ServiceException
+    {
+        if (throwException instanceof RuntimeException)
+        {
+            throw (RuntimeException) throwException;
+        }
+        else if (throwException instanceof ServiceException)
+        {
+            throw (ServiceException) throwException;
+        }
+
+        if (!expectingMessages)
+        {
+            throw new RuntimeException("Not expecting Dead Letter message deliveries. Call InVMDeadLetterService.setExpectingMessages(true) to turn off this error.");
+        }
+
+        BusMessage busMessage = (BusMessage) message.getPayload();
+        synchronized (messages)
+        {
+            messages.add(busMessage);
+        }
+
+        logger.info("Message delivered to InVM DLQ: [" + busMessage.getAddressingContext() + "].");
+
+        return message;
+    }
+
+    /**
+     * On schedule event processor.
+     *
+     * @throws SchedulingException Exception processing schedule event.
+     */
+    @Override
+    public final void onSchedule() throws SchedulingException
+    {
+        synchronized (messages)
+        {
+            if(!messages.isEmpty())
+            {
+                int messageCountAtStart = messages.size();
+                for(int i = 0; i < messageCountAtStart; i++)
+                {
+                    BusMessage message = messages.poll();
+
+                    DeploymentContext.setContext(deploymentContext);
+                    try
+                    {
+                        InvocationContext invocationContext = new InvocationContext(message.getInvocationParameters());
+
+                        InvocationContext.setContext(invocationContext);
+                        try
+                        {
+                            logger.info("Redelivering message from DLQ.  Addressing: '" + message.getAddressingContext() + "'.");
+                            serviceInvoker.send(message.getMessage(), message.getAddressingContext());
+                        }
+                        finally
+                        {
+                            InvocationContext.setContext(null);
+                        }
+                    }
+                    finally
+                    {
+                        DeploymentContext.setContext(null);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Get the messages sent to the service.
+     *
+     * @return The messages.
+     */
+    public final Queue<BusMessage> getMessages()
+    {
+        return messages;
+    }
+
+    /**
+     * Turn on off the flag indicating that this InVMDeadLetter Service
+     * is expecting message deliveries.
+     * @param expectingMessages True if the Service should expect messages, otherwise false.
+     */
+    public final void setExpectingMessages(final boolean expectingMessages)
+    {
+        this.expectingMessages = expectingMessages;
+    }
+
+    /**
+     * Set the exception to be thrown from the process method.
+     * @param throwException The exception to be thrown.
+     */
+    public final void setThrowException(final Exception throwException)
+    {
+        if (throwException instanceof RuntimeException)
+        {
+            // Lovely...
+        }
+        else if (throwException instanceof ServiceException)
+        {
+            // Lovely...
+        }
+        else
+        {
+            throw new IllegalArgumentException("Must be a " + RuntimeException.class.getName() + " or " + ServiceException.class.getName() + ".");
+        }
+        this.throwException = throwException;
+    }
+}


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

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/MockDeadLetterService.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -1,198 +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.failure;
-
-import org.apache.log4j.Logger;
-import org.jboss.esb.api.annotations.Initialize;
-import org.jboss.esb.api.bus.BusMessage;
-import org.jboss.esb.api.context.DeploymentContext;
-import org.jboss.esb.api.context.InvocationContext;
-import org.jboss.esb.api.message.Message;
-import org.jboss.esb.api.service.Service;
-import org.jboss.esb.api.service.ServiceException;
-import org.jboss.esb.api.exception.DeploymentException;
-import org.jboss.esb.invoke.ServiceInvoker;
-import org.jboss.esb.schedule.AbstractScheduleListener;
-import org.jboss.esb.schedule.SchedulingException;
-
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-/**
- * Mock Dead Letter Service.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class MockDeadLetterService extends AbstractScheduleListener implements Service
-{
-
-    /**
-     * Logger.
-     */
-    private static Logger logger = Logger.getLogger(MockDeadLetterService.class);
-
-    /**
-     * Flag to indicate whether or not the Service is expecting delivery of dead messages.
-     */
-    private boolean expectingMessages = false;
-    /**
-     * Exception to throw.
-     */
-    private Exception throwException = null;
-    /**
-     * Messages.
-     */
-    private Queue<BusMessage> messages = new ConcurrentLinkedQueue<BusMessage>();
-    /**
-     * Deployment context.
-     */
-    private DeploymentContext deploymentContext;
-    /**
-     * ServiceInvoker.
-     */
-    private ServiceInvoker serviceInvoker;
-
-    /**
-     * Initialize the router.
-     * @throws DeploymentException If an error occurs during initialization.
-     */
-    @Initialize
-    public final void initialize() throws DeploymentException
-    {
-        serviceInvoker = new ServiceInvoker(deploymentContext);
-    }
-    
-    /**
-     * Service process method.
-     *
-     * @param message The message to be processed.
-     * @return The resultant {@link Message}.
-     * @throws ServiceException Service exception processing the message.
-     */
-    public final Message process(final Message message) throws ServiceException
-    {
-        if (throwException instanceof RuntimeException)
-        {
-            throw (RuntimeException) throwException;
-        }
-        else if (throwException instanceof ServiceException)
-        {
-            throw (ServiceException) throwException;
-        }
-
-        if (!expectingMessages)
-        {
-            throw new RuntimeException("Not expecting Dead Letter message deliveries. Call MockDeadLetterService.setExpectingMessages(true) to turn off this error.");
-        }
-
-        BusMessage busMessage = (BusMessage) message.getPayload();
-        synchronized (messages)
-        {
-            messages.add(busMessage);
-        }
-
-        logger.info("Message delivered to Mock DLQ: [" + busMessage.getAddressingContext() + "].");
-
-        return message;
-    }
-
-    /**
-     * On schedule event processor.
-     *
-     * @throws SchedulingException Exception processing schedule event.
-     */
-    @Override
-    public final void onSchedule() throws SchedulingException
-    {
-        synchronized (messages)
-        {
-            if(!messages.isEmpty())
-            {
-                int messageCountAtStart = messages.size();
-                for(int i = 0; i < messageCountAtStart; i++)
-                {
-                    BusMessage message = messages.poll();
-
-                    DeploymentContext.setContext(deploymentContext);
-                    try
-                    {
-                        InvocationContext invocationContext = new InvocationContext(message.getInvocationParameters());
-
-                        InvocationContext.setContext(invocationContext);
-                        try
-                        {
-                            logger.info("Redelivering message from DLQ.  Addressing: '" + message.getAddressingContext() + "'.");
-                            serviceInvoker.send(message.getMessage(), message.getAddressingContext());
-                        }
-                        finally
-                        {
-                            InvocationContext.setContext(null);
-                        }
-                    }
-                    finally
-                    {
-                        DeploymentContext.setContext(null);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Get the messages sent to the service.
-     *
-     * @return The messages.
-     */
-    public final Queue<BusMessage> getMessages()
-    {
-        return messages;
-    }
-
-    /**
-     * Turn on off the flag indicating that this MockDeadLetter Service
-     * is expecting message deliveries.
-     * @param expectingMessages True if the Service should expect messages, otherwise false.
-     */
-    public final void setExpectingMessages(final boolean expectingMessages)
-    {
-        this.expectingMessages = expectingMessages;
-    }
-
-    /**
-     * Set the exception to be thrown from the process method.
-     * @param throwException The exception to be thrown.
-     */
-    public final void setThrowException(final Exception throwException)
-    {
-        if (throwException instanceof RuntimeException)
-        {
-            // Lovely...
-        }
-        else if (throwException instanceof ServiceException)
-        {
-            // Lovely...
-        }
-        else
-        {
-            throw new IllegalArgumentException("Must be a " + RuntimeException.class.getName() + " or " + ServiceException.class.getName() + ".");
-        }
-        this.throwException = throwException;
-    }
-}

Copied: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/PersistedDeadLetterService.java (from rev 24166, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/DeadLetterPersistanceService.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/PersistedDeadLetterService.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/failure/PersistedDeadLetterService.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.esb.failure;
+
+import org.jboss.esb.api.message.Message;
+import org.jboss.esb.api.service.Service;
+import org.jboss.esb.api.service.ServiceException;
+import org.jboss.esb.api.service.ServiceName;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class PersistedDeadLetterService implements Service
+{
+
+    /**
+     * Service name.
+     */
+    public static final ServiceName SERVICE_NAME = new ServiceName("JBossESB", "DeadLetterService");
+
+    /**
+     * Persist the Dead Letter message.
+     * @param message The message.
+     * @return The original message.
+     * @throws ServiceException An exception occured while persisting the message.
+     */
+    public final Message process(final Message message) throws ServiceException
+    {
+        // TODO
+        System.out.println("Message delivered to PersistedDeadLetterService.  Service not yet implemented!!");
+        return message;
+    }
+}


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

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-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/DeploymentMonitor.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -22,7 +22,7 @@
 import org.jboss.esb.api.context.DeploymentContext;
 import org.jboss.esb.api.context.FaultContext;
 import org.jboss.esb.api.context.InvocationContext;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
 import org.jboss.esb.api.bus.Bus;
 import org.jboss.esb.api.bus.BusMessage;
 import org.jboss.esb.api.history.ProcessingEventLog;
@@ -210,9 +210,9 @@
 
                 faultContext.setFaultMessage(message.getMessage());
                 faultContext.setFault(t);
-                faultContext.setFaultRecipient(DeadLetterPersistanceService.SERVICE_NAME);
+                faultContext.setFaultRecipient(PersistedDeadLetterService.SERVICE_NAME);
 
-                return serviceInvoker.send(new Message(message), DeadLetterPersistanceService.SERVICE_NAME);
+                return serviceInvoker.send(new Message(message), PersistedDeadLetterService.SERVICE_NAME);
             }
             else
             {

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/preinstalled/deadletter.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:20:04 UTC (rev 24171)
@@ -1,7 +1,15 @@
 <jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
 
+    <resources>
+        <resource id="redeliverSchedule" class="org.jboss.esb.schedule.SimpleSchedule">
+            <property name="frequency">2500</property>
+        </resource>
+    </resources>
+
     <services>
-        <service serviceCategory="JBossESB" serviceName="DeadLetterPersistanceService" serviceDescription="Default Dead Letter Service" class="org.jboss.esb.failure.DeadLetterPersistanceService" />
+        <service serviceCategory="JBossESB" serviceName="DeadLetterService" serviceDescription="InVM Dead Letter Service" class="org.jboss.esb.failure.InVMDeadLetterService">
+            <property name="scheduleResourceId">redeliverSchedule</property>
+        </service>
     </services>
 
 </jbossesb>
\ No newline at end of file

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/DeploymentCoordinatorTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/DeploymentCoordinatorTest.java	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/DeploymentCoordinatorTest.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -50,12 +50,12 @@
                 // So deployment1 should be monitoring deployment2...
                 monitor = (DeploymentMonitor) coordinator1.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
+                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
 
                 // And deployment2 should be monitoring deployment1...
                 monitor = (DeploymentMonitor) coordinator2.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
+                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
 
                 // Now lets deploy another services
                 DeploymentRuntime deployment3 = DeploymentUtil.createRuntime(getClass().getResourceAsStream("deployment-03.xml"));
@@ -98,12 +98,12 @@
                 // So deployment1 should be monitoring deployment2...
                 monitor = (DeploymentMonitor) coordinator1.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
+                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
 
                 // And deployment2 should be monitoring deployment1...
                 monitor = (DeploymentMonitor) coordinator2.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
+                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
             } finally {
                 deployment2.undeploy();
             }
@@ -138,12 +138,12 @@
                 // So deployment1 should be monitoring deployment2...
                 monitor = (DeploymentMonitor) coordinator1.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
+                assertEquals("{online=true} deployment2:x[Services: [hello:goodbye, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello]]", monitor.toString());
 
                 // And deployment2 should be monitoring deployment1...
                 monitor = (DeploymentMonitor) coordinator2.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
+                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
 
                 // Now lets switch off the heartbeat broadcast on deployment1...
                 coordinator1.setBroadcastHeartbeat(false);
@@ -152,7 +152,7 @@
                 // deployment2 should see deployment1 as being offline now...
                 monitor = (DeploymentMonitor) coordinator2.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=false} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
+                assertEquals("{online=false} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
 
                 // Switch the heartbeat broadcast on deployment1 back on again...
                 coordinator1.setBroadcastHeartbeat(true);
@@ -161,7 +161,7 @@
                 // deployment2 should see deployment1 as being online again...
                 monitor = (DeploymentMonitor) coordinator2.getBusMediators().next().getDeploymentMonitors().values().toArray()[0];
                 monitor.getServiceSets().setDeploymentId("x");
-                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
+                assertEquals("{online=true} deployment1:x[Services: [hello:hello, JBossESB:DeadLetterService]][OutboundRoutedServices: [hello:hello, hello:goodbye]]", monitor.toString());
 
             } finally {
                 deployment2.undeploy();

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/businjection/BusInjectionTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/businjection/BusInjectionTest.java	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/federate/businjection/BusInjectionTest.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -26,8 +26,8 @@
 import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.DeploymentUtil;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.failure.MockDeadLetterService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
+import org.jboss.esb.failure.InVMDeadLetterService;
 import org.jboss.esb.federate.BusMediator;
 import org.jboss.esb.federate.bus.invm.InVMBus;
 
@@ -83,8 +83,8 @@
                 Thread.sleep(100);
 
                 // Deployments 2 and 3 should be able to see each other...
-                assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:C]]}", mediatorD2.getDeploymentMonitors().toString());
-                assertEquals("{deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
+                assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:C]]}", mediatorD2.getDeploymentMonitors().toString());
+                assertEquals("{deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
 
                 try
                 {
@@ -93,7 +93,7 @@
                     TestService serviceB = (TestService) DeploymentUtil.getService(serviceNameB, deployment2).getService();
                     TestService serviceC = (TestService) DeploymentUtil.getService(serviceNameC, deployment3).getService();
                     TestOutboundRouter outrouter = (TestOutboundRouter) DeploymentUtil.getOutboundRouter(serviceNameC, "outrouter", deployment3).getRouter();
-                    MockDeadLetterService dlDLQ = (MockDeadLetterService) DeploymentUtil.getService(DeadLetterPersistanceService.SERVICE_NAME, deployment1).getService();
+                    InVMDeadLetterService dlDLQ = (InVMDeadLetterService) DeploymentUtil.getService(PersistedDeadLetterService.SERVICE_NAME, deployment1).getService();
 
                     dlDLQ.setExpectingMessages(true);
                     
@@ -121,9 +121,9 @@
                     Thread.sleep(200);
 
                     // All deployments should see each other again ...
-                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:C]], deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:B]]}", mediatorD1.getDeploymentMonitors().toString());
-                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:C]], deployment1-Id:deployment1={online=true} deployment1:deployment1-Id:deployment1[Services: [Service:A, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:A]]}", mediatorD2.getDeploymentMonitors().toString());
-                    assertEquals("{deployment1-Id:deployment1={online=true} deployment1:deployment1-Id:deployment1[Services: [Service:A, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:A]], deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
+                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:C]], deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:B]]}", mediatorD1.getDeploymentMonitors().toString());
+                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:C]], deployment1-Id:deployment1={online=true} deployment1:deployment1-Id:deployment1[Services: [Service:A, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:A]]}", mediatorD2.getDeploymentMonitors().toString());
+                    assertEquals("{deployment1-Id:deployment1={online=true} deployment1:deployment1-Id:deployment1[Services: [Service:A, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:A]], deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
 
                     // Now remove the bus from deployment 1....
                     deployment1.getDeploymentCoordinator().removeBusMediator(mediatorD1);
@@ -132,8 +132,8 @@
 
                     // Deployments 2 and 3 should only see each other again (i.e. not deployment1)...
                     assertEquals("{}", mediatorD1.getDeploymentMonitors().toString());
-                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:C]]}", mediatorD2.getDeploymentMonitors().toString());
-                    assertEquals("{deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterPersistanceService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
+                    assertEquals("{deployment3-Id:deployment3={online=true} deployment3:deployment3-Id:deployment3[Services: [Service:C, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:C]]}", mediatorD2.getDeploymentMonitors().toString());
+                    assertEquals("{deployment2-Id:deployment2={online=true} deployment2:deployment2-Id:deployment2[Services: [Service:B, JBossESB:DeadLetterService]][OutboundRoutedServices: [Service:B]]}", mediatorD3.getDeploymentMonitors().toString());
 
                     serviceA.reset();
                     serviceB.reset();

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-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_012/RoutingTest.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -26,8 +26,8 @@
 import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.DeploymentUtil;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.failure.MockDeadLetterService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
+import org.jboss.esb.failure.InVMDeadLetterService;
 
 /**
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -52,7 +52,7 @@
         {
             TestInboundRouter inrouter = (TestInboundRouter) DeploymentUtil.getInboundRouter("inrouter", deployment1).getRouter();
             TestService serviceA = (TestService) DeploymentUtil.getService(serviceNameA, deployment1).getService();
-            MockDeadLetterService dlService = (MockDeadLetterService) DeploymentUtil.getService(DeadLetterPersistanceService.SERVICE_NAME, deployment1).getService();
+            InVMDeadLetterService dlService = (InVMDeadLetterService) DeploymentUtil.getService(PersistedDeadLetterService.SERVICE_NAME, deployment1).getService();
             String faultString = "A Runtime Exception - should route to Dead Letter Service.";
 
             serviceA.setThrowException(new RuntimeException(faultString));

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-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_013/RoutingTest.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -27,8 +27,8 @@
 import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.DeploymentUtil;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.failure.MockDeadLetterService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
+import org.jboss.esb.failure.InVMDeadLetterService;
 
 /**
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -56,7 +56,7 @@
         {
             TestInboundRouter inrouter = (TestInboundRouter) DeploymentUtil.getInboundRouter("inrouter", deployment1).getRouter();
             TestService serviceA = (TestService) DeploymentUtil.getService(serviceNameA, deployment1).getService();
-            MockDeadLetterService dlService = (MockDeadLetterService) DeploymentUtil.getService(DeadLetterPersistanceService.SERVICE_NAME, deployment1).getService();
+            InVMDeadLetterService dlService = (InVMDeadLetterService) DeploymentUtil.getService(PersistedDeadLetterService.SERVICE_NAME, deployment1).getService();
             String faultString = "A Service Exception - should route to Dead Letter Service because there's no faultTo address.";
 
             serviceA.setThrowException(new ServiceException(faultString));

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-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/routing/scenario_014/RoutingTest.java	2008-12-01 13:20:04 UTC (rev 24171)
@@ -28,8 +28,8 @@
 import org.jboss.esb.api.service.ServiceName;
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.DeploymentUtil;
-import org.jboss.esb.failure.DeadLetterPersistanceService;
-import org.jboss.esb.failure.MockDeadLetterService;
+import org.jboss.esb.failure.PersistedDeadLetterService;
+import org.jboss.esb.failure.InVMDeadLetterService;
 
 /**
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -57,7 +57,7 @@
             TestInboundRouter inrouter = (TestInboundRouter) DeploymentUtil.getInboundRouter("inrouter", deployment1).getRouter();
             TestService serviceA = (TestService) DeploymentUtil.getService(serviceNameA, deployment1).getService();
             TestOutboundRouter outrouter = (TestOutboundRouter) DeploymentUtil.getOutboundRouter(serviceNameA, "outrouter", deployment1).getRouter();
-            MockDeadLetterService dlService = (MockDeadLetterService) DeploymentUtil.getService(DeadLetterPersistanceService.SERVICE_NAME, deployment1).getService();
+            InVMDeadLetterService dlService = (InVMDeadLetterService) DeploymentUtil.getService(PersistedDeadLetterService.SERVICE_NAME, deployment1).getService();
             String faultString = "A Routing Exception - should route to DLS.";
 
             outrouter.setThrowException(new RoutingException(faultString));

Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:12:16 UTC (rev 24170)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/preinstalled/deadletter.xml	2008-12-01 13:20:04 UTC (rev 24171)
@@ -7,7 +7,7 @@
     </resources>
     
     <services>
-        <service serviceCategory="JBossESB" serviceName="DeadLetterPersistanceService" serviceDescription="Mock Dead Letter Service" class="org.jboss.esb.failure.MockDeadLetterService">
+        <service serviceCategory="JBossESB" serviceName="DeadLetterService" serviceDescription="InVM Dead Letter Service" class="org.jboss.esb.failure.InVMDeadLetterService">
             <property name="scheduleResourceId">redeliverSchedule</property>
         </service>
     </services>




More information about the jboss-svn-commits mailing list