servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r526407 [4/4] - in /incubator/servicemix/trunk/deployables/serviceengines: servicemix-bean/src/main/java/org/apache/servicemix/bean/ servicemix-bean/src/main/java/org/apache/servicemix/bean/support/ servicemix-bean/src/test/java/org/apache/...
Date Sat, 07 Apr 2007 08:35:53 GMT
Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SpringConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SpringConfigurationTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SpringConfigurationTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SpringConfigurationTest.java
Sat Apr  7 01:35:49 2007
@@ -39,7 +39,8 @@
         for (int i = 0; i < nbMsgs; i++) {
             InOnly me = client.createInOnlyExchange();
             me.setService(new QName("http://test", "entryPoint"));
-            me.getInMessage().setContent(new StringSource("<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
+            me.getInMessage().setContent(new StringSource(
+                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
             client.sendSync(me);
         }        
         ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
@@ -61,7 +62,8 @@
         for (int i = 0; i < nbMsgs; i++) {
             InOnly me = client.createInOnlyExchange();
             me.setService(new QName("http://test", "entryPoint"));
-            me.getInMessage().setContent(new StringSource("<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
+            me.getInMessage().setContent(new StringSource(
+                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
             client.send(me);
         }
         for (int i = 0; i < nbMsgs; i++) {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
Sat Apr  7 01:35:49 2007
@@ -19,7 +19,10 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-public class VMEIPTests {
+public final class VMEIPTests {
+
+    private VMEIPTests() {
+    }
 
     public static Test suite() {
         TestSuite suite = new TestSuite("Test for org.apache.servicemix.eip");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/support/NamespaceContextImplTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/support/NamespaceContextImplTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/support/NamespaceContextImplTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/support/NamespaceContextImplTest.java
Sat Apr  7 01:35:49 2007
@@ -16,15 +16,16 @@
  */
 package org.apache.servicemix.eip.support;
 
+import junit.framework.TestCase;
+
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractApplicationContext;
 
-import junit.framework.TestCase;
-
 public class NamespaceContextImplTest extends TestCase {
 
     public void testNsContext() throws Exception {
-        AbstractApplicationContext springContext = new ClassPathXmlApplicationContext("org/apache/servicemix/eip/support/nscontext.xml");
+        AbstractApplicationContext springContext = 
+            new ClassPathXmlApplicationContext("org/apache/servicemix/eip/support/nscontext.xml");
         Object objNsContext = springContext.getBean("nsContext");
         assertNotNull(objNsContext);
         assertTrue(objNsContext instanceof NamespaceContextImpl);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerBootstrap.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerBootstrap.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerBootstrap.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerBootstrap.java
Sat Apr  7 01:35:49 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.servicemix.lwcontainer;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.jbi.JBIException;
 import javax.jbi.component.Bootstrap;
 import javax.jbi.component.InstallationContext;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Base class for components bootstrap.

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerComponent.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerComponent.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerComponent.java
Sat Apr  7 01:35:49 2007
@@ -26,7 +26,7 @@
      * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
      */
     public BaseServiceUnitManager createServiceUnitManager() {
-        Deployer[] deployers = new Deployer[] { new LwContainerXBeanDeployer(this) };
+        Deployer[] deployers = new Deployer[] {new LwContainerXBeanDeployer(this) };
         return new BaseServiceUnitManager(this, deployers);
     }
 

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerEndpoint.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerEndpoint.java
Sat Apr  7 01:35:49 2007
@@ -30,9 +30,9 @@
 public class LwContainerEndpoint extends Endpoint {
 
     private static final QName SERVICE_NAME = new QName("http://lwcontainer.servicemix.org",
"LwContainerComponent");
-    
+
     private ActivationSpec activationSpec;
-    
+
     public LwContainerEndpoint(ActivationSpec activationSpec) {
         this.activationSpec = activationSpec;
         this.service = SERVICE_NAME;
@@ -44,14 +44,13 @@
             this.endpoint = new IdGenerator().generateId();
         }
     }
-    
+
     public Role getRole() {
         throw new UnsupportedOperationException();
     }
 
     public void activate() throws Exception {
         getContainer().activateComponent(activationSpec);
-        
     }
 
     public void deactivate() throws Exception {
@@ -64,7 +63,7 @@
 
     public JBIContainer getContainer() {
         ComponentContext context = getServiceUnit().getComponent().getComponentContext();
-        if( context instanceof ComponentContextImpl ) {
+        if (context instanceof ComponentContextImpl) {
             return ((ComponentContextImpl) context).getContainer();
         }
         throw new IllegalStateException("LwContainer component can only be deployed in ServiceMix");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/test/java/org/apache/servicemix/lwcontainer/LwContainerComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/test/java/org/apache/servicemix/lwcontainer/LwContainerComponentTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/test/java/org/apache/servicemix/lwcontainer/LwContainerComponentTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-lwcontainer/src/test/java/org/apache/servicemix/lwcontainer/LwContainerComponentTest.java
Sat Apr  7 01:35:49 2007
@@ -16,75 +16,72 @@
  */
 package org.apache.servicemix.lwcontainer;
 
-import org.apache.servicemix.client.DefaultServiceMixClient;
-import org.apache.servicemix.client.ServiceMixClient;
-import org.apache.servicemix.jbi.container.JBIContainer;
-import org.apache.servicemix.lwcontainer.LwContainerComponent;
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
 
 import javax.jbi.messaging.InOut;
 import javax.jbi.messaging.MessagingException;
 import javax.xml.namespace.QName;
 
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-
 import junit.framework.TestCase;
 
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.client.ServiceMixClient;
+import org.apache.servicemix.jbi.container.JBIContainer;
+
 /**
  * 
  * @version $Revision$
  */
 public class LwContainerComponentTest extends TestCase {
-	protected JBIContainer container = new JBIContainer();
-
-	private File tempRootDir;
+    protected JBIContainer container = new JBIContainer();
 
-	/*
-	 * @see TestCase#setUp()
-	 */
-	protected void setUp() throws Exception {
-		super.setUp();
-		container.setCreateMBeanServer(false);
-		container.setMonitorInstallationDirectory(false);
-		tempRootDir = File.createTempFile("servicemix", "rootDir");
-		tempRootDir.delete();
-		File tempTemp = new File(tempRootDir.getAbsolutePath() + "/temp");
-		if (!tempTemp.mkdirs())
-			fail("Unable to create temporary working root directory ["
-					+ tempTemp.getAbsolutePath() + "]");
+    private File tempRootDir;
 
-		System.out.println("Using temporary root directory ["
-				+ tempRootDir.getAbsolutePath() + "]");
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        container.setCreateMBeanServer(false);
+        container.setMonitorInstallationDirectory(false);
+        tempRootDir = File.createTempFile("servicemix", "rootDir");
+        tempRootDir.delete();
+        File tempTemp = new File(tempRootDir.getAbsolutePath() + "/temp");
+        if (!tempTemp.mkdirs()) {
+            fail("Unable to create temporary working root directory [" + tempTemp.getAbsolutePath()
+ "]");
+        }
+        System.out.println("Using temporary root directory [" + tempRootDir.getAbsolutePath()
+ "]");
 
-		container.setRootDir(tempRootDir.getAbsolutePath());
+        container.setRootDir(tempRootDir.getAbsolutePath());
         container.setMonitorInstallationDirectory(false);
         container.setUseMBeanServer(false);
         container.setCreateMBeanServer(false);
         container.setFlowName("st");
-		container.init();
-		container.start();
-	}
+        container.init();
+        container.start();
+    }
 
-	public void testComponentInstallation() throws Exception {
+    public void testComponentInstallation() throws Exception {
         LwContainerComponent component = new LwContainerComponent();
         container.activateComponent(component, "#ServiceMixComponent#");
         URL url = getClass().getResource("su1-src/servicemix.xml");
         File path = new File(new URI(url.toString()));
         path = path.getParentFile();
         ServiceMixClient client = new DefaultServiceMixClient(container);
-        
+
         for (int i = 0; i < 2; i++) {
             // Deploy and start su
             component.getServiceUnitManager().deploy("su1", path.getAbsolutePath());
             component.getServiceUnitManager().init("su1", path.getAbsolutePath());
             component.getServiceUnitManager().start("su1");
-            
+
             // Send message
             InOut inout = client.createInOutExchange();
             inout.setService(new QName("http://servicemix.apache.org/demo/", "chained"));
             client.send(inout);
-            
+
             // Stop and undeploy
             component.getServiceUnitManager().stop("su1");
             component.getServiceUnitManager().shutDown("su1");
@@ -98,33 +95,33 @@
             } catch (MessagingException e) {
                 // Ok, the lw component is undeployed
             }
-            
+
         }
-	}
+    }
 
     /*
-	 * @see TestCase#tearDown()
-	 */
+     * @see TestCase#tearDown()
+     */
 
-	protected void tearDown() throws Exception {
-		super.tearDown();
+    protected void tearDown() throws Exception {
+        super.tearDown();
         container.stop();
-		container.shutDown();
-		deleteDir(tempRootDir);
-	}
-
-	public static boolean deleteDir(File dir) {
-		System.out.println("Deleting directory : " + dir.getAbsolutePath());
-		if (dir.isDirectory()) {
-			String[] children = dir.list();
-			for (int i = 0; i < children.length; i++) {
-				boolean success = deleteDir(new File(dir, children[i]));
-				if (!success) {
-					return false;
-				}
-			}
-		}
-		// The directory is now empty so delete it
-		return dir.delete();
-	}
+        container.shutDown();
+        deleteDir(tempRootDir);
+    }
+
+    public static boolean deleteDir(File dir) {
+        System.out.println("Deleting directory : " + dir.getAbsolutePath());
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i = 0; i < children.length; i++) {
+                boolean success = deleteDir(new File(dir, children[i]));
+                if (!success) {
+                    return false;
+                }
+            }
+        }
+        // The directory is now empty so delete it
+        return dir.delete();
+    }
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzComponent.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzComponent.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzComponent.java
Sat Apr  7 01:35:49 2007
@@ -87,7 +87,7 @@
      */
     @Override
     protected Class[] getEndpointClasses() {
-        return new Class[] { QuartzEndpoint.class };
+        return new Class[] {QuartzEndpoint.class };
     }
     
     /* (non-Javadoc)

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java
Sat Apr  7 01:35:49 2007
@@ -140,8 +140,7 @@
             exchange.setInMessage(message);
             configureExchangeTarget(exchange);
             send(exchange);
-        }
-        catch (MessagingException e) {
+        } catch (MessagingException e) {
             throw new JobExecutionException(e);
         }
     }
@@ -189,17 +188,16 @@
             scheduler.addCalendar(e.getKey(), e.getValue(), true, true);
         }
         scheduler.addJob(getJobDetail(), true);
-        for (Trigger trigger : getTriggers()) {
-            boolean triggerExists = (scheduler.getTrigger(trigger.getName(), trigger.getGroup())
!= null);
+        for (Trigger trg : getTriggers()) {
+            boolean triggerExists = scheduler.getTrigger(trg.getName(), trg.getGroup()) !=
null;
             if (!triggerExists) {
                 try {
-                    scheduler.scheduleJob(trigger);
-                }
-                catch (ObjectAlreadyExistsException ex) {
-                    scheduler.rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
+                    scheduler.scheduleJob(trg);
+                } catch (ObjectAlreadyExistsException ex) {
+                    scheduler.rescheduleJob(trg.getName(), trg.getGroup(), trg);
                 }
             } else {
-                scheduler.rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
+                scheduler.rescheduleJob(trg.getName(), trg.getGroup(), trg);
             }
         }
         super.start();
@@ -208,8 +206,8 @@
     public void stop() throws Exception {
         super.stop();
         Scheduler scheduler = ((QuartzComponent) getServiceUnit().getComponent()).getScheduler();
-        for (Trigger trigger : getTriggers()) {
-            scheduler.unscheduleJob(trigger.getName(), trigger.getGroup());
+        for (Trigger trg : getTriggers()) {
+            scheduler.unscheduleJob(trg.getName(), trg.getGroup());
         }
         scheduler.deleteJob(getJobDetail().getName(), getJobDetail().getGroup());
         for (Map.Entry<String, Calendar> e : getCalendars().entrySet()) {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/DefaultQuartzMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/DefaultQuartzMarshaler.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/DefaultQuartzMarshaler.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/DefaultQuartzMarshaler.java
Sat Apr  7 01:35:49 2007
@@ -24,14 +24,15 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.dom.DOMSource;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
 import org.apache.servicemix.components.util.MarshalerSupport;
 import org.apache.servicemix.jbi.util.DOMUtil;
 import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 /**
  * The default implementation of the Quartz marshaler
@@ -40,15 +41,17 @@
  */
 public class DefaultQuartzMarshaler extends MarshalerSupport implements QuartzMarshaler {
 
-    public void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext
context) throws JobExecutionException, MessagingException {
+    public void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext
context) 
+        throws JobExecutionException, MessagingException {
+
         JobDetail detail = context.getJobDetail();
         JobDataMap dataMap = detail.getJobDataMap();
-        for (Iterator iter = dataMap.entrySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = dataMap.entrySet().iterator(); iter.hasNext();) {
             Map.Entry entry = (Map.Entry) iter.next();
             String key = (String) entry.getKey();
             if (!key.equals(ServiceMixJob.COMPONENT_NAME) && !key.equals(ServiceMixJob.ENDPOINT_NAME))
{
-	            Object value = entry.getValue();
-	            message.setProperty(key, value);
+                Object value = entry.getValue();
+                message.setProperty(key, value);
             }
         }
         try {
@@ -61,8 +64,7 @@
             DOMUtil.addChildElement(root, "description", detail.getDescription());
             DOMUtil.addChildElement(root, "fireTime", context.getFireTime());
             message.setContent(new DOMSource(document));
-        }
-        catch (ParserConfigurationException e) {
+        } catch (ParserConfigurationException e) {
             throw new MessagingException("Failed to create content: " + e, e);
         }
     }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/QuartzMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/QuartzMarshaler.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/QuartzMarshaler.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/QuartzMarshaler.java
Sat Apr  7 01:35:49 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.servicemix.quartz.support;
 
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 
-import javax.jbi.messaging.NormalizedMessage;
-import javax.jbi.messaging.MessagingException;
-
 /**
  * @version $Revision$
  */
@@ -35,5 +35,7 @@
      * @throws JobExecutionException
      * @throws MessagingException
      */
-    void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext context)
throws JobExecutionException, MessagingException;
+    void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext context)
+        throws JobExecutionException, MessagingException;
+
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/ServiceMixJob.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/ServiceMixJob.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/ServiceMixJob.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/support/ServiceMixJob.java
Sat Apr  7 01:35:49 2007
@@ -30,8 +30,8 @@
  */
 public class ServiceMixJob implements Job {
     
-    public static String COMPONENT_NAME = "org.apache.servicemix.quartz.ComponentName";
-    public static String ENDPOINT_NAME = "org.apache.servicemix.quartz.EndpointName";
+    public static final String COMPONENT_NAME = "org.apache.servicemix.quartz.ComponentName";
+    public static final String ENDPOINT_NAME = "org.apache.servicemix.quartz.EndpointName";
     
     public void execute(JobExecutionContext context) throws JobExecutionException {
         try {
@@ -41,7 +41,8 @@
             }
             QuartzComponent component = (QuartzComponent) context.getScheduler().getContext().get(componentName);
             if (component == null) {
-                throw new JobExecutionException("No quartz JBI component available for key:
" + componentName + ". Bad job data map");
+                throw new JobExecutionException("No quartz JBI component available for key:
" + componentName + "."
+                        + " Bad job data map");
             }
             String endpointName = (String) context.getJobDetail().getJobDataMap().get(ENDPOINT_NAME);
             if (endpointName == null) {
@@ -49,7 +50,8 @@
             }
             QuartzEndpoint endpoint = (QuartzEndpoint) component.getRegistry().getEndpoint(endpointName);
             if (endpoint == null) {
-                throw new JobExecutionException("No quartz JBI endpoint available for key:
" + endpointName + ". Bad job data map");
+                throw new JobExecutionException("No quartz JBI endpoint available for key:
" + endpointName + "."
+                        + " Bad job data map");
             }
             endpoint.onJobExecute(context);
         } catch (SchedulerException e) {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/CustomMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/CustomMarshaler.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/CustomMarshaler.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/CustomMarshaler.java
Sat Apr  7 01:35:49 2007
@@ -27,12 +27,15 @@
 public class CustomMarshaler extends DefaultQuartzMarshaler {
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.quartz.support.DefaultQuartzMarshaler#populateNormalizedMessage(javax.jbi.messaging.NormalizedMessage,
org.quartz.JobExecutionContext)
+     * @see org.apache.servicemix.quartz.support.DefaultQuartzMarshaler#populateNormalizedMessage(
+     *      javax.jbi.messaging.NormalizedMessage, org.quartz.JobExecutionContext)
      */
     @Override
-    public void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext
context) throws JobExecutionException, MessagingException {
+    public void populateNormalizedMessage(NormalizedMessage message, JobExecutionContext
context)
+        throws JobExecutionException, MessagingException {
         super.populateNormalizedMessage(message, context);
-        message.setContent(new StringSource((String) context.getJobDetail().getJobDataMap().get("xml")));

+        message.setContent(new StringSource((String) context.getJobDetail().
+                getJobDataMap().get("xml"))); 
     }
 
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzComponentTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzComponentTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzComponentTest.java
Sat Apr  7 01:35:49 2007
@@ -22,7 +22,6 @@
 
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.tck.ReceiverComponent;
-import org.quartz.Trigger;
 import org.springframework.scheduling.quartz.SimpleTriggerBean;
 
 public class QuartzComponentTest extends TestCase {
@@ -42,7 +41,7 @@
         trigger.setName("trigger");
         trigger.afterPropertiesSet();
         endpoint.setTrigger(trigger);
-        quartz.setEndpoints(new QuartzEndpoint[] { endpoint });
+        quartz.setEndpoints(new QuartzEndpoint[] {endpoint });
         jbi.activateComponent(quartz, "servicemix-quartz");
         
         ReceiverComponent receiver = new ReceiverComponent(new QName("receiver"), "endpoint");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzSpringTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzSpringTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzSpringTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-quartz/src/test/java/org/apache/servicemix/quartz/QuartzSpringTest.java
Sat Apr  7 01:35:49 2007
@@ -18,12 +18,13 @@
 
 import javax.jbi.messaging.NormalizedMessage;
 
+import org.w3c.dom.Element;
+
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.tck.Receiver;
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.w3c.dom.Element;
 
 public class QuartzSpringTest extends SpringTestSupport {
 

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonComponent.java
Sat Apr  7 01:35:49 2007
@@ -31,7 +31,7 @@
  */
 public class SaxonComponent extends DefaultComponent {
 
-    public final static String[] EPR_PROTOCOLS = { "xslt:", "xquery:" };
+    public static final String[] EPR_PROTOCOLS = {"xslt:", "xquery:" };
 
     private SaxonEndpoint[] endpoints;
 
@@ -44,7 +44,7 @@
     }
 
     protected Class[] getEndpointClasses() {
-        return new Class[] { SaxonEndpoint.class };
+        return new Class[] {SaxonEndpoint.class };
     }
 
     protected List getConfiguredEndpoints() {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
Sat Apr  7 01:35:49 2007
@@ -27,6 +27,8 @@
 import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.parsers.DocumentBuilder;
 
+import org.w3c.dom.Document;
+
 import net.sf.saxon.Configuration;
 
 import org.apache.servicemix.common.endpoints.ProviderEndpoint;
@@ -36,13 +38,12 @@
 import org.springframework.core.io.FileSystemResource;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.UrlResource;
-import org.w3c.dom.Document;
 
 public abstract class SaxonEndpoint extends ProviderEndpoint {
 
-    public static String RESULT_BYTES = "bytes";
-    public static String RESULT_STRING = "string";
-    public static String RESULT_DOM = "dom";
+    public static final String RESULT_BYTES = "bytes";
+    public static final String RESULT_STRING = "string";
+    public static final String RESULT_DOM = "dom";
     
     private Configuration configuration;
     private boolean copyProperties = true;
@@ -212,7 +213,8 @@
     /**
      * Transform the content and send it back
      */
-    protected void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage
out) throws Exception {
+    protected void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage
out) 
+            throws Exception {
         copyPropertiesAndAttachments(in, out);
         transform(exchange, in, out);
     }
@@ -239,7 +241,8 @@
         }
     }
     
-    protected abstract void transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage
out) throws Exception;
+    protected abstract void transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage
out) 
+        throws Exception;
 
     protected Resource getDynamicResource(MessageExchange exchange, NormalizedMessage in)
throws Exception {
         Object res = getExpression().evaluate(exchange, in);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
Sat Apr  7 01:35:49 2007
@@ -119,7 +119,8 @@
         queryContent(expression, exchange, in, out);
     }
     
-    protected void queryContent(XQueryExpression expression, MessageExchange exchange, NormalizedMessage
in, NormalizedMessage out) throws Exception {
+    protected void queryContent(XQueryExpression expression, MessageExchange exchange, 
+            NormalizedMessage in, NormalizedMessage out) throws Exception {
         Configuration config = getConfiguration();
         DynamicQueryContext dynamicEnv = new DynamicQueryContext(config);
         DocumentInfo doc = staticEnv.buildDocument(in.getContent());
@@ -131,8 +132,7 @@
             Result result = new StreamResult(buffer);
             expression.pull(dynamicEnv, result, props);
             out.setContent(new BytesSource(buffer.toByteArray()));
-        }
-        else if (RESULT_STRING.equalsIgnoreCase(getResult())) {
+        } else if (RESULT_STRING.equalsIgnoreCase(getResult())) {
             StringWriter buffer = new StringWriter();
             Result result = new StreamResult(buffer);
             expression.pull(dynamicEnv, result, props);
@@ -144,7 +144,8 @@
         }
     }
     
-    protected void configureQuery(DynamicQueryContext dynamicEnv, MessageExchange exchange,
NormalizedMessage in) throws Exception {
+    protected void configureQuery(DynamicQueryContext dynamicEnv, MessageExchange exchange,
NormalizedMessage in) 
+            throws Exception {
         for (Iterator iter = exchange.getPropertyNames().iterator(); iter.hasNext();) {
             String name = (String) iter.next();
             Object value = exchange.getProperty(name);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
Sat Apr  7 01:35:49 2007
@@ -74,7 +74,8 @@
         transformContent(transformer, exchange, in, out);
     }
     
-    protected void transformContent(Transformer transformer, MessageExchange exchange, NormalizedMessage
in, NormalizedMessage out) throws Exception {
+    protected void transformContent(Transformer transformer, MessageExchange exchange, 
+            NormalizedMessage in, NormalizedMessage out) throws Exception {
         Source src = in.getContent();
         if (src instanceof DOMSource) {
             src = new DOMSource(getSourceTransformer().toDOMDocument(src));
@@ -84,8 +85,7 @@
             Result result = new StreamResult(buffer);
             transformer.transform(src, result);
             out.setContent(new BytesSource(buffer.toByteArray()));
-        }
-        else if (RESULT_STRING.equalsIgnoreCase(getResult())) {
+        } else if (RESULT_STRING.equalsIgnoreCase(getResult())) {
             StringWriter buffer = new StringWriter();
             Result result = new StreamResult(buffer);
             transformer.transform(src, result);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/test/java/org/apache/servicemix/saxon/SaxonComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/test/java/org/apache/servicemix/saxon/SaxonComponentTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/test/java/org/apache/servicemix/saxon/SaxonComponentTest.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-saxon/src/test/java/org/apache/servicemix/saxon/SaxonComponentTest.java
Sat Apr  7 01:35:49 2007
@@ -24,6 +24,8 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamSource;
 
+import org.w3c.dom.Element;
+
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
@@ -31,10 +33,9 @@
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.w3c.dom.Element;
 
 public class SaxonComponentTest extends SpringTestSupport {
-    
+
     public void testXslt() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -55,7 +56,7 @@
         assertEquals("2005", textValueOfXPath(el, "/transformed/bookstore/book[1]/year"));
         client.done(me);
     }
-    
+
     public void testXsltWithElement() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -78,7 +79,7 @@
         assertEquals("2005", textValueOfXPath(el, "/transformed/book/year"));
         client.done(me);
     }
-    
+
     public void testXsltDynamic() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -102,12 +103,13 @@
         assertEquals("2005", textValueOfXPath(el, "/transformed/book/year"));
         client.done(me);
     }
-    
+
     public void testXsltWithParam() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
         me.setService(new QName("urn:test", "xslt-params"));
-        me.getInMessage().setContent(new StringSource("<sample id='777888' sent='" + new
Date() + "'>hello world!</sample>"));
+        me.getInMessage().setContent(new StringSource("<sample id='777888' sent='"
+                + new Date() + "'>hello world!</sample>"));
         client.sendSync(me);
         if (me.getStatus() == ExchangeStatus.ERROR) {
             if (me.getError() != null) {
@@ -122,8 +124,8 @@
         Element el = transformer.toDOMElement(me.getOutMessage());
         assertEquals("cheeseyCheese", textValueOfXPath(el, "//param"));
         assertEquals("4002", textValueOfXPath(el, "//integer"));
-     }
-    
+    }
+
     public void testXQuery() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -144,7 +146,7 @@
         assertEquals("XQuery Kick Start", textValueOfXPath(el, "/titles/title[1]"));
         client.done(me);
     }
-    
+
     public void testXQueryInline() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -170,7 +172,7 @@
         assertEquals("XQuery Kick Start", DOMUtil.getElementText(el));
         client.done(me);
     }
-    
+
     public void testXQueryDynamic() throws Exception {
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
         InOut me = client.createInOutExchange();
@@ -192,9 +194,9 @@
         assertEquals("XQuery Kick Start", textValueOfXPath(el, "/titles/title[1]"));
         client.done(me);
     }
-    
+
     protected AbstractXmlApplicationContext createBeanFactory() {
         return new ClassPathXmlApplicationContext("spring.xml");
     }
-    
+
 }



Mime
View raw message