You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2006/02/22 00:40:29 UTC

svn commit: r379627 [7/34] - in /incubator/servicemix/trunk: ./ etc/ sandbox/servicemix-wsn-1.2/src/sa/META-INF/ sandbox/servicemix-wsn-1.2/src/su/META-INF/ servicemix-assembly/ servicemix-assembly/src/main/assembly/ servicemix-assembly/src/main/releas...

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/timer/BPETimerServiceJdk.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/timer/BPETimerServiceJdk.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/timer/BPETimerServiceJdk.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/timer/BPETimerServiceJdk.java Tue Feb 21 15:40:05 2006
@@ -1,73 +1,73 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe.timer;
-
-import java.util.Date;
-import java.util.Timer;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.ode.event.ITimerEvent;
-import org.apache.ode.timerservice.IBPETimer;
-import org.apache.ode.timerservice.IBPETimerService;
-import org.apache.ode.util.BPEProperties;
-import org.apache.ode.util.BPException;
-
-public class BPETimerServiceJdk implements IBPETimerService {
-
-    private static final Log log = LogFactory.getLog(BPETimerServiceJdk.class);
-    private static Timer timer;
-    
-    public BPETimerServiceJdk() {
-        super();
-    }
-
-    public IBPETimer createTimer(long startDuration, ITimerEvent timerEvent) throws BPException {
-        if (log.isDebugEnabled()) {
-            log.debug("Schedule timer " + timerEvent + " for " + startDuration);
-        }
-        BPETimerJdk tt = new BPETimerJdk(timerEvent);
-        timer.schedule(tt, startDuration);
-        return tt;
-    }
-
-    public IBPETimer createTimer(Date startTime, ITimerEvent timerEvent) throws BPException {
-        if (log.isDebugEnabled()) {
-            log.debug("Schedule timer " + timerEvent + " at " + startTime);
-        }
-        BPETimerJdk tt = new BPETimerJdk(timerEvent);
-        timer.schedule(tt, startTime);
-        return tt;
-    }
-
-    public void removeTimer(IBPETimer timer) throws BPException {
-        if (log.isDebugEnabled()) {
-            log.debug("Timer " + timer.getTimerEvent() + " cancelled");
-        }
-        ((BPETimerJdk) timer).cancel();
-
-    }
-
-    public void init(BPEProperties props) throws BPException {
-        synchronized (BPETimerServiceJdk.class) {
-            if (timer == null) {
-                timer = new Timer();
-            }
-        }
-    }
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe.timer;
+
+import java.util.Date;
+import java.util.Timer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.ode.event.ITimerEvent;
+import org.apache.ode.timerservice.IBPETimer;
+import org.apache.ode.timerservice.IBPETimerService;
+import org.apache.ode.util.BPEProperties;
+import org.apache.ode.util.BPException;
+
+public class BPETimerServiceJdk implements IBPETimerService {
+
+    private static final Log log = LogFactory.getLog(BPETimerServiceJdk.class);
+    private static Timer timer;
+    
+    public BPETimerServiceJdk() {
+        super();
+    }
+
+    public IBPETimer createTimer(long startDuration, ITimerEvent timerEvent) throws BPException {
+        if (log.isDebugEnabled()) {
+            log.debug("Schedule timer " + timerEvent + " for " + startDuration);
+        }
+        BPETimerJdk tt = new BPETimerJdk(timerEvent);
+        timer.schedule(tt, startDuration);
+        return tt;
+    }
+
+    public IBPETimer createTimer(Date startTime, ITimerEvent timerEvent) throws BPException {
+        if (log.isDebugEnabled()) {
+            log.debug("Schedule timer " + timerEvent + " at " + startTime);
+        }
+        BPETimerJdk tt = new BPETimerJdk(timerEvent);
+        timer.schedule(tt, startTime);
+        return tt;
+    }
+
+    public void removeTimer(IBPETimer timer) throws BPException {
+        if (log.isDebugEnabled()) {
+            log.debug("Timer " + timer.getTimerEvent() + " cancelled");
+        }
+        ((BPETimerJdk) timer).cancel();
+
+    }
+
+    public void init(BPEProperties props) throws BPException {
+        synchronized (BPETimerServiceJdk.class) {
+            if (timer == null) {
+                timer = new Timer();
+            }
+        }
+    }
+
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/timer/BPETimerServiceJdk.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/util/FileSystemJarInputStream.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/util/FileSystemJarInputStream.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/util/FileSystemJarInputStream.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/util/FileSystemJarInputStream.java Tue Feb 21 15:40:05 2006
@@ -1,68 +1,68 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.util.jar.JarOutputStream;
-
-import org.apache.servicemix.jbi.util.FileUtil;
-
-public class FileSystemJarInputStream extends InputStream implements Runnable {
-
-	private File root;
-	private PipedInputStream input;
-	private PipedOutputStream output;
-	private Thread runner;
-	private IOException exception;
-	
-	public FileSystemJarInputStream(File root) throws IOException {
-		this.root = root;
-		input = new PipedInputStream();
-		output = new PipedOutputStream(input);
-	}
-
-	public int read() throws IOException {
-		if (runner == null) {
-			runner = new Thread(this);
-			runner.setDaemon(true);
-			runner.start();
-		}
-		if (exception != null) {
-			throw exception;
-		}
-		return input.read();
-	}
-
-	public void run() {
-		try {
-			JarOutputStream jos = new JarOutputStream(output);
-			FileUtil.zipDir(root.getAbsolutePath(), jos, "");
-			jos.close();
-		} catch (IOException e) {
-			exception = e;
-            try {
-                output.close();
-            } catch (IOException e2) {
-                e2.printStackTrace();
-            }
-		}
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.util.jar.JarOutputStream;
+
+import org.apache.servicemix.jbi.util.FileUtil;
+
+public class FileSystemJarInputStream extends InputStream implements Runnable {
+
+	private File root;
+	private PipedInputStream input;
+	private PipedOutputStream output;
+	private Thread runner;
+	private IOException exception;
+	
+	public FileSystemJarInputStream(File root) throws IOException {
+		this.root = root;
+		input = new PipedInputStream();
+		output = new PipedOutputStream(input);
+	}
+
+	public int read() throws IOException {
+		if (runner == null) {
+			runner = new Thread(this);
+			runner.setDaemon(true);
+			runner.start();
+		}
+		if (exception != null) {
+			throw exception;
+		}
+		return input.read();
+	}
+
+	public void run() {
+		try {
+			JarOutputStream jos = new JarOutputStream(output);
+			FileUtil.zipDir(root.getAbsolutePath(), jos, "");
+			jos.close();
+		} catch (IOException e) {
+			exception = e;
+            try {
+                output.close();
+            } catch (IOException e2) {
+                e2.printStackTrace();
+            }
+		}
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/util/FileSystemJarInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/uuid/ActiveMQUUIDService.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/uuid/ActiveMQUUIDService.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/uuid/ActiveMQUUIDService.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/uuid/ActiveMQUUIDService.java Tue Feb 21 15:40:05 2006
@@ -1,42 +1,42 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe.uuid;
-
-import org.apache.activemq.util.IdGenerator;
-import org.apache.ode.util.BPEProperties;
-import org.apache.ode.uuid.UUIDService;
-import org.apache.ode.uuid.UUIDServiceException;
-
-
-public class ActiveMQUUIDService implements UUIDService {
-
-    private IdGenerator idGenerator;
-    
-    public ActiveMQUUIDService() {
-        idGenerator = new IdGenerator();
-    }
-
-    public String getUUID() {
-        return idGenerator.generateId();
-    }
-
-    public void init(BPEProperties props) throws UUIDServiceException {
-    }
-
-    public void close() {
-    }
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe.uuid;
+
+import org.apache.activemq.util.IdGenerator;
+import org.apache.ode.util.BPEProperties;
+import org.apache.ode.uuid.UUIDService;
+import org.apache.ode.uuid.UUIDServiceException;
+
+
+public class ActiveMQUUIDService implements UUIDService {
+
+    private IdGenerator idGenerator;
+    
+    public ActiveMQUUIDService() {
+        idGenerator = new IdGenerator();
+    }
+
+    public String getUUID() {
+        return idGenerator.generateId();
+    }
+
+    public void init(BPEProperties props) throws UUIDServiceException {
+    }
+
+    public void close() {
+    }
+
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/uuid/ActiveMQUUIDService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/main/resources/bpeEngine.properties
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/main/resources/bpeEngine.properties?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/main/resources/bpeEngine.properties (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/main/resources/bpeEngine.properties Tue Feb 21 15:40:05 2006
@@ -1,19 +1,19 @@
-DEF_CLASS_KEY=org.apache.ode.definition.service.unmanaged.DefinitionServiceProxy
-DEF_PERSISTENT_KEY=FALSE
-DEF_SCHEMA_KEY=BPEL4WS.XSD
-INST_CLASS_KEY=org.apache.ode.instance.service.nonpersistent.InstanceServiceTransientImpl
-INST_PERSISTENT_KEY=FALSE
-SCOPE_CLASS_KEY=org.apache.ode.scope.service.impl.ScopeServiceImpl
-ED_CLASS_KEY=org.apache.ode.bped.unmanaged.EventDirectorSLImpl
-CORL_CLASS_KEY=org.apache.ode.correlation.unmanaged.CorrelationServiceSLImpl
-LOCK_CLASS_KEY=org.apache.ode.locking.IMLockingService
-LOCK_HASH_BUCKETS_KEY=1000
-BPEL_COMPLIANT_KEY=TRUE
-CTX_CLASS_TRANSIENT_KEY=org.apache.ode.context.nonpersistent.TransientContextService
-CTX_CLASS_PERSISTENT_KEY=org.apache.ode.context.persistent.PersistentContextService
-CTX_PERSISTENCE_KEY=CTX_PERSISTENT
-DOF_CLASS_PERSISTENT_KEY=org.apache.ode.context.ejb.EJBDataObjectFactory
-EXTERNAL_ACTION_BPE_IMPLEMENTATION_KEY=org.apache.servicemix.bpe.external.JbiExternalAction
-EXTERNAL_ACTION_DEFAULT_IMPLEMENTATION_KEY=org.apache.servicemix.bpe.external.JbiInvokeAction
-BPETIMER_CLASS_KEY=org.apache.servicemix.bpe.timer.BPETimerServiceJdk
-UUID_CLASS_KEY=org.apache.servicemix.bpe.uuid.ActiveMQUUIDService
+DEF_CLASS_KEY=org.apache.ode.definition.service.unmanaged.DefinitionServiceProxy
+DEF_PERSISTENT_KEY=FALSE
+DEF_SCHEMA_KEY=BPEL4WS.XSD
+INST_CLASS_KEY=org.apache.ode.instance.service.nonpersistent.InstanceServiceTransientImpl
+INST_PERSISTENT_KEY=FALSE
+SCOPE_CLASS_KEY=org.apache.ode.scope.service.impl.ScopeServiceImpl
+ED_CLASS_KEY=org.apache.ode.bped.unmanaged.EventDirectorSLImpl
+CORL_CLASS_KEY=org.apache.ode.correlation.unmanaged.CorrelationServiceSLImpl
+LOCK_CLASS_KEY=org.apache.ode.locking.IMLockingService
+LOCK_HASH_BUCKETS_KEY=1000
+BPEL_COMPLIANT_KEY=TRUE
+CTX_CLASS_TRANSIENT_KEY=org.apache.ode.context.nonpersistent.TransientContextService
+CTX_CLASS_PERSISTENT_KEY=org.apache.ode.context.persistent.PersistentContextService
+CTX_PERSISTENCE_KEY=CTX_PERSISTENT
+DOF_CLASS_PERSISTENT_KEY=org.apache.ode.context.ejb.EJBDataObjectFactory
+EXTERNAL_ACTION_BPE_IMPLEMENTATION_KEY=org.apache.servicemix.bpe.external.JbiExternalAction
+EXTERNAL_ACTION_DEFAULT_IMPLEMENTATION_KEY=org.apache.servicemix.bpe.external.JbiInvokeAction
+BPETIMER_CLASS_KEY=org.apache.servicemix.bpe.timer.BPETimerServiceJdk
+UUID_CLASS_KEY=org.apache.servicemix.bpe.uuid.ActiveMQUUIDService

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/main/resources/bpeEngine.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEComponentTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEComponentTest.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEComponentTest.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEComponentTest.java Tue Feb 21 15:40:05 2006
@@ -1,353 +1,353 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URI;
-import java.net.URL;
-
-import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.Fault;
-import javax.jbi.messaging.InOut;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessagingException;
-import javax.jbi.messaging.NormalizedMessage;
-import javax.xml.namespace.QName;
-import javax.xml.transform.TransformerException;
-
-import junit.framework.TestCase;
-
-import org.apache.servicemix.MessageExchangeListener;
-import org.apache.servicemix.bpe.BPEComponent;
-import org.apache.servicemix.client.DefaultServiceMixClient;
-import org.apache.servicemix.client.ServiceMixClient;
-import org.apache.servicemix.components.util.ComponentSupport;
-import org.apache.servicemix.http.HttpEndpoint;
-import org.apache.servicemix.http.HttpSpringComponent;
-import org.apache.servicemix.jbi.container.ActivationSpec;
-import org.apache.servicemix.jbi.container.JBIContainer;
-import org.apache.servicemix.jbi.jaxp.SourceTransformer;
-import org.apache.servicemix.jbi.jaxp.StringSource;
-import org.apache.servicemix.jbi.messaging.MessageExchangeSupport;
-import org.apache.servicemix.jbi.util.DOMUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.traversal.NodeIterator;
-
-import com.sun.org.apache.xpath.internal.CachedXPathAPI;
-
-public class BPEComponentTest extends TestCase {
-
-    private JBIContainer jbi;
-    private BPEComponent bpe;
-    private ServiceMixClient client;
-    
-    protected void setUp() throws Exception {
-        jbi = new JBIContainer();
-        jbi.setFlowName("st");
-        jbi.setEmbedded(true);
-        jbi.setUseMBeanServer(false);
-        jbi.init();
-        client = new DefaultServiceMixClient(jbi);
-        bpe = new BPEComponent();
-        jbi.activateComponent(bpe, "bpe");
-    }
-    
-    protected void tearDown() throws Exception {
-        if (jbi != null) {
-            jbi.shutDown();
-        }
-    }
-    
-    protected void registerCreditAgency() throws Exception {
-        ActivationSpec creditAgency = new ActivationSpec();
-        creditAgency.setInterfaceName(new QName("urn:logicblaze:soa:creditagency", "CreditAgency"));
-        creditAgency.setComponent(new CreditAgency());
-        jbi.activateComponent(creditAgency);
-    }
-    
-    protected void registerBanks() throws Exception {
-        for (int i = 1; i <= 5; i++) {
-            ActivationSpec bank = new ActivationSpec();
-            bank.setInterfaceName(new QName("urn:logicblaze:soa:bank", "Bank"));
-            bank.setComponent(new Bank(i));
-            jbi.activateComponent(bank);
-        }
-    }
-    
-    
-    protected void registerHttp() throws Exception {
-        HttpSpringComponent http = new HttpSpringComponent();
-        HttpEndpoint ep = new HttpEndpoint();
-        ep.setSoap(true);
-        ep.setDefaultMep(MessageExchangeSupport.IN_OUT);
-        ep.setRoleAsString("consumer");
-        ep.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        ep.setEndpoint("loanbroker");
-        ep.setLocationURI("http://localhost:8192");
-        http.setEndpoints(new HttpEndpoint[] { ep });
-        jbi.activateComponent(http, "http");
-    }
-    
-    public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[1024];
-        int len;
-        while ((len = in.read(buffer)) >= 0) {
-            out.write(buffer, 0, len);
-        }
-    }
-    
-    public void testWithHttp() throws Exception {
-        registerCreditAgency();
-        registerBanks();
-        registerHttp();
-        jbi.start();
-        
-        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
-        File path = new File(new URI(url.toString()));
-        path = path.getParentFile();
-        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
-        bpe.getServiceUnitManager().start("loanbroker");
-        
-        HttpURLConnection con = (HttpURLConnection) new URL("http://localhost:8192").openConnection();
-        con.setDoOutput(true);
-        con.setDoInput(true);
-        InputStream is = getClass().getClassLoader().getResourceAsStream("request.xml");
-        OutputStream os = con.getOutputStream();
-        copyInputStream(is, os);
-        copyInputStream(con.getInputStream(), System.out);
-    }
-    
-    public void testBPEOk() throws Exception {
-        registerCreditAgency();
-        registerBanks();
-        jbi.start();
-        
-        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
-        File path = new File(new URI(url.toString()));
-        path = path.getParentFile();
-        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
-        bpe.getServiceUnitManager().start("loanbroker");
-        
-        //
-        // Message for bank1 and bank2
-        //
-        MessageExchange me = client.createInOutExchange();
-        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        me.setOperation(new QName("getLoanQuote"));
-        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>100000.0</amount><duration>12</duration></getLoanQuoteRequest>"));
-        long t0 = System.currentTimeMillis();
-        client.sendSync(me);
-        long t1 = System.currentTimeMillis();
-        if (me.getError() != null) {
-            throw me.getError();
-        }
-        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
-        String out = new SourceTransformer().contentToString(me.getMessage("out"));
-        System.err.println(out);
-        System.err.println("Time: " + (t1 - t0));
-        client.done(me);
-        
-        //
-        // Message for bank3 and bank4
-        //
-        me = client.createInOutExchange();
-        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        me.setOperation(new QName("getLoanQuote"));
-        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>50000.0</amount><duration>12</duration></getLoanQuoteRequest>"));
-        t0 = System.currentTimeMillis();
-        client.sendSync(me);
-        t1 = System.currentTimeMillis();
-        if (me.getError() != null) {
-            throw me.getError();
-        }
-        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
-        out = new SourceTransformer().contentToString(me.getMessage("out"));
-        System.err.println(out);
-        System.err.println("Time: " + (t1 - t0));
-        client.done(me);
-        
-        //
-        // Message for bank5
-        //
-        me = client.createInOutExchange();
-        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        me.setOperation(new QName("getLoanQuote"));
-        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>1200.0</amount><duration>12</duration></getLoanQuoteRequest>"));
-        t0 = System.currentTimeMillis();
-        client.sendSync(me);
-        t1 = System.currentTimeMillis();
-        if (me.getError() != null) {
-            throw me.getError();
-        }
-        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
-        out = new SourceTransformer().contentToString(me.getMessage("out"));
-        System.err.println(out);
-        System.err.println("Time: " + (t1 - t0));
-        client.done(me);
-    }
-    
-    public void testBPEWithFault() throws Exception {
-        registerCreditAgency();
-        jbi.start();
-        
-        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
-        File path = new File(new URI(url.toString()));
-        path = path.getParentFile();
-        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
-        bpe.getServiceUnitManager().start("loanbroker");
-        
-        MessageExchange me = client.createInOutExchange();
-        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        me.setOperation(new QName("getLoanQuote"));
-        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>234341</ssn></getLoanQuoteRequest>"));
-        client.sendSync(me);
-        assertEquals(ExchangeStatus.ERROR, me.getStatus());
-        assertNotNull(me.getFault());
-        client.done(me);
-    }
-    
-    public void testBPEWithException() throws Exception {
-        registerCreditAgency();
-        jbi.start();
-        
-        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
-        File path = new File(new URI(url.toString()));
-        path = path.getParentFile();
-        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
-        bpe.getServiceUnitManager().start("loanbroker");
-        
-        MessageExchange me = client.createInOutExchange();
-        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
-        me.setOperation(new QName("getLoanQuote"));
-        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn></ssn></getLoanQuoteRequest>"));
-        client.sendSync(me);
-        assertEquals(ExchangeStatus.ERROR, me.getStatus());
-        assertNotNull(me.getError());
-        client.done(me);
-    }
-    
-    public static class Bank extends ComponentSupport implements MessageExchangeListener {
-        
-        public Bank(int number) {
-            setService(new QName("urn:logicblaze:soa:bank", "Bank" + number));
-            setEndpoint("bank");
-        }
-        
-        public void onMessageExchange(MessageExchange exchange) throws MessagingException {
-            InOut inOut = (InOut) exchange;
-            if (inOut.getStatus() == ExchangeStatus.DONE) {
-                return;
-            } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
-                done(inOut);
-                return;
-            }
-            System.err.println(getService().getLocalPart() + " requested");
-            try {
-                String output = "<getLoanQuoteResponse xmlns=\"urn:logicblaze:soa:bank\"><rate>" + (Math.ceil(1000 * Math.random()) / 100) + "</rate></getLoanQuoteResponse>";
-                NormalizedMessage answer = inOut.createMessage();
-                answer.setContent(new StringSource(output));
-                answer(inOut, answer);
-            } catch (Exception e) {
-                throw new MessagingException(e);
-            }
-        }
-    }
-    
-    public static class CreditAgency extends ComponentSupport implements MessageExchangeListener {
-
-        public CreditAgency() {
-            setService(new QName("urn:logicblaze:soa:creditagency", "CreditAgencyService"));
-            setEndpoint("agency");
-        }
-        
-        public void onMessageExchange(MessageExchange exchange) throws MessagingException {
-            InOut inOut = (InOut) exchange;
-            if (inOut.getStatus() == ExchangeStatus.DONE) {
-                return;
-            } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
-                done(inOut);
-                return;
-            }
-            try {
-                Document doc = (Document) new SourceTransformer().toDOMNode(inOut.getInMessage());
-                String ssn = textValueOfXPath(doc, "//*[local-name()='ssn']");
-                if (ssn == null || ssn.length() == 0) {
-                    fail(exchange, new NullPointerException());
-                    return;
-                } 
-                if (!ssn.startsWith("1")) {
-                    Fault fault = inOut.createFault();
-                    fault.setContent(new StringSource("<InvalidSSN xmlns=\"urn:logicblaze:soa:creditagency\"><ssn>" + ssn + "</ssn></InvalidSSN>"));
-                    fail(inOut, fault);
-                } else {
-                    String operation = null;
-                    if (inOut.getOperation() != null) {
-                        operation = inOut.getOperation().getLocalPart();
-                    } else {
-                        operation = doc.getDocumentElement().getLocalName();
-                    }
-                    String output;
-                    if ("getCreditScore".equals(operation)) {
-                        output = "<getCreditScoreResponse xmlns=\"urn:logicblaze:soa:creditagency\"><score>" + getCreditScore(ssn) + "</score></getCreditScoreResponse>";
-                    } else if ("getCreditHistoryLength".equals(operation)) {
-                        output = "<getCreditHistoryLengthResponse xmlns=\"urn:logicblaze:soa:creditagency\"><length>" + getCreditHistoryLength(ssn) + "</length></getCreditHistoryLengthResponse>";
-                    } else {
-                        throw new UnsupportedOperationException(operation);
-                    }
-                    NormalizedMessage answer = inOut.createMessage();
-                    answer.setContent(new StringSource(output));
-                    answer(inOut, answer);
-                }
-            } catch (Exception e) {
-                throw new MessagingException(e);
-            }
-        }
-        int getCreditScore(String ssn) {
-            //return ((int) (Math.random() * 600) + 300);
-            return 1000;
-        }
-        int getCreditHistoryLength(String ssn) {
-            //return ((int) (Math.random() * 19) + 1);
-            return 10;
-        }
-        
-    }
-    
-    protected static String textValueOfXPath(Node node, String xpath) throws TransformerException {
-        CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
-        NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
-        Node root = iterator.nextNode();
-        if (root instanceof Element) {
-            Element element = (Element) root;
-            if (element == null) {
-                return "";
-            }
-            String text = DOMUtil.getElementText(element);
-            return text;
-        }
-        else if (root != null) {
-            return root.getNodeValue();
-        } else {
-            return null;
-        }
-    }
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URI;
+import java.net.URL;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.Fault;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+import javax.xml.transform.TransformerException;
+
+import junit.framework.TestCase;
+
+import org.apache.servicemix.MessageExchangeListener;
+import org.apache.servicemix.bpe.BPEComponent;
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.client.ServiceMixClient;
+import org.apache.servicemix.components.util.ComponentSupport;
+import org.apache.servicemix.http.HttpEndpoint;
+import org.apache.servicemix.http.HttpSpringComponent;
+import org.apache.servicemix.jbi.container.ActivationSpec;
+import org.apache.servicemix.jbi.container.JBIContainer;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.jbi.messaging.MessageExchangeSupport;
+import org.apache.servicemix.jbi.util.DOMUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+import com.sun.org.apache.xpath.internal.CachedXPathAPI;
+
+public class BPEComponentTest extends TestCase {
+
+    private JBIContainer jbi;
+    private BPEComponent bpe;
+    private ServiceMixClient client;
+    
+    protected void setUp() throws Exception {
+        jbi = new JBIContainer();
+        jbi.setFlowName("st");
+        jbi.setEmbedded(true);
+        jbi.setUseMBeanServer(false);
+        jbi.init();
+        client = new DefaultServiceMixClient(jbi);
+        bpe = new BPEComponent();
+        jbi.activateComponent(bpe, "bpe");
+    }
+    
+    protected void tearDown() throws Exception {
+        if (jbi != null) {
+            jbi.shutDown();
+        }
+    }
+    
+    protected void registerCreditAgency() throws Exception {
+        ActivationSpec creditAgency = new ActivationSpec();
+        creditAgency.setInterfaceName(new QName("urn:logicblaze:soa:creditagency", "CreditAgency"));
+        creditAgency.setComponent(new CreditAgency());
+        jbi.activateComponent(creditAgency);
+    }
+    
+    protected void registerBanks() throws Exception {
+        for (int i = 1; i <= 5; i++) {
+            ActivationSpec bank = new ActivationSpec();
+            bank.setInterfaceName(new QName("urn:logicblaze:soa:bank", "Bank"));
+            bank.setComponent(new Bank(i));
+            jbi.activateComponent(bank);
+        }
+    }
+    
+    
+    protected void registerHttp() throws Exception {
+        HttpSpringComponent http = new HttpSpringComponent();
+        HttpEndpoint ep = new HttpEndpoint();
+        ep.setSoap(true);
+        ep.setDefaultMep(MessageExchangeSupport.IN_OUT);
+        ep.setRoleAsString("consumer");
+        ep.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        ep.setEndpoint("loanbroker");
+        ep.setLocationURI("http://localhost:8192");
+        http.setEndpoints(new HttpEndpoint[] { ep });
+        jbi.activateComponent(http, "http");
+    }
+    
+    public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
+        byte[] buffer = new byte[1024];
+        int len;
+        while ((len = in.read(buffer)) >= 0) {
+            out.write(buffer, 0, len);
+        }
+    }
+    
+    public void testWithHttp() throws Exception {
+        registerCreditAgency();
+        registerBanks();
+        registerHttp();
+        jbi.start();
+        
+        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
+        File path = new File(new URI(url.toString()));
+        path = path.getParentFile();
+        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
+        bpe.getServiceUnitManager().start("loanbroker");
+        
+        HttpURLConnection con = (HttpURLConnection) new URL("http://localhost:8192").openConnection();
+        con.setDoOutput(true);
+        con.setDoInput(true);
+        InputStream is = getClass().getClassLoader().getResourceAsStream("request.xml");
+        OutputStream os = con.getOutputStream();
+        copyInputStream(is, os);
+        copyInputStream(con.getInputStream(), System.out);
+    }
+    
+    public void testBPEOk() throws Exception {
+        registerCreditAgency();
+        registerBanks();
+        jbi.start();
+        
+        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
+        File path = new File(new URI(url.toString()));
+        path = path.getParentFile();
+        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
+        bpe.getServiceUnitManager().start("loanbroker");
+        
+        //
+        // Message for bank1 and bank2
+        //
+        MessageExchange me = client.createInOutExchange();
+        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        me.setOperation(new QName("getLoanQuote"));
+        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>100000.0</amount><duration>12</duration></getLoanQuoteRequest>"));
+        long t0 = System.currentTimeMillis();
+        client.sendSync(me);
+        long t1 = System.currentTimeMillis();
+        if (me.getError() != null) {
+            throw me.getError();
+        }
+        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
+        String out = new SourceTransformer().contentToString(me.getMessage("out"));
+        System.err.println(out);
+        System.err.println("Time: " + (t1 - t0));
+        client.done(me);
+        
+        //
+        // Message for bank3 and bank4
+        //
+        me = client.createInOutExchange();
+        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        me.setOperation(new QName("getLoanQuote"));
+        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>50000.0</amount><duration>12</duration></getLoanQuoteRequest>"));
+        t0 = System.currentTimeMillis();
+        client.sendSync(me);
+        t1 = System.currentTimeMillis();
+        if (me.getError() != null) {
+            throw me.getError();
+        }
+        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
+        out = new SourceTransformer().contentToString(me.getMessage("out"));
+        System.err.println(out);
+        System.err.println("Time: " + (t1 - t0));
+        client.done(me);
+        
+        //
+        // Message for bank5
+        //
+        me = client.createInOutExchange();
+        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        me.setOperation(new QName("getLoanQuote"));
+        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>1234341</ssn><amount>1200.0</amount><duration>12</duration></getLoanQuoteRequest>"));
+        t0 = System.currentTimeMillis();
+        client.sendSync(me);
+        t1 = System.currentTimeMillis();
+        if (me.getError() != null) {
+            throw me.getError();
+        }
+        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
+        out = new SourceTransformer().contentToString(me.getMessage("out"));
+        System.err.println(out);
+        System.err.println("Time: " + (t1 - t0));
+        client.done(me);
+    }
+    
+    public void testBPEWithFault() throws Exception {
+        registerCreditAgency();
+        jbi.start();
+        
+        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
+        File path = new File(new URI(url.toString()));
+        path = path.getParentFile();
+        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
+        bpe.getServiceUnitManager().start("loanbroker");
+        
+        MessageExchange me = client.createInOutExchange();
+        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        me.setOperation(new QName("getLoanQuote"));
+        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn>234341</ssn></getLoanQuoteRequest>"));
+        client.sendSync(me);
+        assertEquals(ExchangeStatus.ERROR, me.getStatus());
+        assertNotNull(me.getFault());
+        client.done(me);
+    }
+    
+    public void testBPEWithException() throws Exception {
+        registerCreditAgency();
+        jbi.start();
+        
+        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
+        File path = new File(new URI(url.toString()));
+        path = path.getParentFile();
+        bpe.getServiceUnitManager().deploy("loanbroker", path.getAbsolutePath());
+        bpe.getServiceUnitManager().start("loanbroker");
+        
+        MessageExchange me = client.createInOutExchange();
+        me.setService(new QName("urn:logicblaze:soa:loanbroker", "LoanBrokerService"));
+        me.setOperation(new QName("getLoanQuote"));
+        me.getMessage("in").setContent(new StringSource("<getLoanQuoteRequest xmlns=\"urn:logicblaze:soa:loanbroker\"><ssn></ssn></getLoanQuoteRequest>"));
+        client.sendSync(me);
+        assertEquals(ExchangeStatus.ERROR, me.getStatus());
+        assertNotNull(me.getError());
+        client.done(me);
+    }
+    
+    public static class Bank extends ComponentSupport implements MessageExchangeListener {
+        
+        public Bank(int number) {
+            setService(new QName("urn:logicblaze:soa:bank", "Bank" + number));
+            setEndpoint("bank");
+        }
+        
+        public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+            InOut inOut = (InOut) exchange;
+            if (inOut.getStatus() == ExchangeStatus.DONE) {
+                return;
+            } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
+                done(inOut);
+                return;
+            }
+            System.err.println(getService().getLocalPart() + " requested");
+            try {
+                String output = "<getLoanQuoteResponse xmlns=\"urn:logicblaze:soa:bank\"><rate>" + (Math.ceil(1000 * Math.random()) / 100) + "</rate></getLoanQuoteResponse>";
+                NormalizedMessage answer = inOut.createMessage();
+                answer.setContent(new StringSource(output));
+                answer(inOut, answer);
+            } catch (Exception e) {
+                throw new MessagingException(e);
+            }
+        }
+    }
+    
+    public static class CreditAgency extends ComponentSupport implements MessageExchangeListener {
+
+        public CreditAgency() {
+            setService(new QName("urn:logicblaze:soa:creditagency", "CreditAgencyService"));
+            setEndpoint("agency");
+        }
+        
+        public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+            InOut inOut = (InOut) exchange;
+            if (inOut.getStatus() == ExchangeStatus.DONE) {
+                return;
+            } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
+                done(inOut);
+                return;
+            }
+            try {
+                Document doc = (Document) new SourceTransformer().toDOMNode(inOut.getInMessage());
+                String ssn = textValueOfXPath(doc, "//*[local-name()='ssn']");
+                if (ssn == null || ssn.length() == 0) {
+                    fail(exchange, new NullPointerException());
+                    return;
+                } 
+                if (!ssn.startsWith("1")) {
+                    Fault fault = inOut.createFault();
+                    fault.setContent(new StringSource("<InvalidSSN xmlns=\"urn:logicblaze:soa:creditagency\"><ssn>" + ssn + "</ssn></InvalidSSN>"));
+                    fail(inOut, fault);
+                } else {
+                    String operation = null;
+                    if (inOut.getOperation() != null) {
+                        operation = inOut.getOperation().getLocalPart();
+                    } else {
+                        operation = doc.getDocumentElement().getLocalName();
+                    }
+                    String output;
+                    if ("getCreditScore".equals(operation)) {
+                        output = "<getCreditScoreResponse xmlns=\"urn:logicblaze:soa:creditagency\"><score>" + getCreditScore(ssn) + "</score></getCreditScoreResponse>";
+                    } else if ("getCreditHistoryLength".equals(operation)) {
+                        output = "<getCreditHistoryLengthResponse xmlns=\"urn:logicblaze:soa:creditagency\"><length>" + getCreditHistoryLength(ssn) + "</length></getCreditHistoryLengthResponse>";
+                    } else {
+                        throw new UnsupportedOperationException(operation);
+                    }
+                    NormalizedMessage answer = inOut.createMessage();
+                    answer.setContent(new StringSource(output));
+                    answer(inOut, answer);
+                }
+            } catch (Exception e) {
+                throw new MessagingException(e);
+            }
+        }
+        int getCreditScore(String ssn) {
+            //return ((int) (Math.random() * 600) + 300);
+            return 1000;
+        }
+        int getCreditHistoryLength(String ssn) {
+            //return ((int) (Math.random() * 19) + 1);
+            return 10;
+        }
+        
+    }
+    
+    protected static String textValueOfXPath(Node node, String xpath) throws TransformerException {
+        CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
+        NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
+        Node root = iterator.nextNode();
+        if (root instanceof Element) {
+            Element element = (Element) root;
+            if (element == null) {
+                return "";
+            }
+            String text = DOMUtil.getElementText(element);
+            return text;
+        }
+        else if (root != null) {
+            return root.getNodeValue();
+        } else {
+            return null;
+        }
+    }
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEComponentTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEDeployerTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEDeployerTest.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEDeployerTest.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEDeployerTest.java Tue Feb 21 15:40:05 2006
@@ -1,44 +1,44 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.servicemix.bpe.BPEComponent;
-import org.apache.servicemix.bpe.BPEDeployer;
-import org.apache.servicemix.common.ServiceUnit;
-
-public class BPEDeployerTest extends TestCase {
-
-	public void testDeploy() throws Exception {
-        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
-        File path = new File(new URI(url.toString()));
-        path = path.getParentFile();
-        
-        BPEComponent bpe = new BPEComponent();
-        ((BPELifeCycle) bpe.getLifeCycle()).doInit();
-		BPEDeployer deployer = new BPEDeployer(bpe);
-		assertTrue(deployer.canDeploy("loanbroker", path.getAbsolutePath()));
-		
-		ServiceUnit su = deployer.deploy("loanbroker", path.getAbsolutePath());
-		assertNotNull(su);
-	}
-	
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.servicemix.bpe.BPEComponent;
+import org.apache.servicemix.bpe.BPEDeployer;
+import org.apache.servicemix.common.ServiceUnit;
+
+public class BPEDeployerTest extends TestCase {
+
+	public void testDeploy() throws Exception {
+        URL url = getClass().getClassLoader().getResource("loanbroker/loanbroker.bpel");
+        File path = new File(new URI(url.toString()));
+        path = path.getParentFile();
+        
+        BPEComponent bpe = new BPEComponent();
+        ((BPELifeCycle) bpe.getLifeCycle()).doInit();
+		BPEDeployer deployer = new BPEDeployer(bpe);
+		assertTrue(deployer.canDeploy("loanbroker", path.getAbsolutePath()));
+		
+		ServiceUnit su = deployer.deploy("loanbroker", path.getAbsolutePath());
+		assertNotNull(su);
+	}
+	
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/BPEDeployerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/util/FileSystemJarInputStreamTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/util/FileSystemJarInputStreamTest.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/util/FileSystemJarInputStreamTest.java (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/util/FileSystemJarInputStreamTest.java Tue Feb 21 15:40:05 2006
@@ -1,65 +1,65 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.servicemix.bpe.util;
-
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-
-import org.apache.servicemix.bpe.util.FileSystemJarInputStream;
-
-import junit.framework.TestCase;
-
-public class FileSystemJarInputStreamTest extends TestCase {
-
-	private static final int BUFFER = 2048;
-
-	public void testInputStream() throws Exception {
-		File f = new File("target/test-data");
-		f.mkdirs();
-		Writer w = new OutputStreamWriter(new FileOutputStream(new File(f, "test.txt")));
-		w.write("<hello>world</hello>");
-		w.close();
-		
-		FileSystemJarInputStream fsjis = new FileSystemJarInputStream(f);
-		JarInputStream jis = new JarInputStream(fsjis);
-
-		JarEntry entry = jis.getNextJarEntry();
-		assertNotNull(entry);
-		assertEquals("test.txt", entry.getName());
-
-		// Copy data from jar file into byte array
-		BufferedOutputStream dest = null;
-		ByteArrayOutputStream baos = null;
-		int count; // buffer counter
-		byte data[] = new byte[BUFFER];
-		baos = new ByteArrayOutputStream();
-		dest = new BufferedOutputStream(baos, BUFFER);
-		while ((count = jis.read(data, 0, BUFFER)) != -1) {
-			dest.write(data, 0, count);
-		}
-		dest.close();
-		System.out.println(entry.getName() + ": " +  baos.toString());
-		
-		assertEquals("<hello>world</hello>", baos.toString());
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bpe.util;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+
+import org.apache.servicemix.bpe.util.FileSystemJarInputStream;
+
+import junit.framework.TestCase;
+
+public class FileSystemJarInputStreamTest extends TestCase {
+
+	private static final int BUFFER = 2048;
+
+	public void testInputStream() throws Exception {
+		File f = new File("target/test-data");
+		f.mkdirs();
+		Writer w = new OutputStreamWriter(new FileOutputStream(new File(f, "test.txt")));
+		w.write("<hello>world</hello>");
+		w.close();
+		
+		FileSystemJarInputStream fsjis = new FileSystemJarInputStream(f);
+		JarInputStream jis = new JarInputStream(fsjis);
+
+		JarEntry entry = jis.getNextJarEntry();
+		assertNotNull(entry);
+		assertEquals("test.txt", entry.getName());
+
+		// Copy data from jar file into byte array
+		BufferedOutputStream dest = null;
+		ByteArrayOutputStream baos = null;
+		int count; // buffer counter
+		byte data[] = new byte[BUFFER];
+		baos = new ByteArrayOutputStream();
+		dest = new BufferedOutputStream(baos, BUFFER);
+		while ((count = jis.read(data, 0, BUFFER)) != -1) {
+			dest.write(data, 0, count);
+		}
+		dest.close();
+		System.out.println(entry.getName() + ": " +  baos.toString());
+		
+		assertEquals("<hello>world</hello>", baos.toString());
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/java/org/apache/servicemix/bpe/util/FileSystemJarInputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j-tests.properties
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j-tests.properties?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j-tests.properties (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j-tests.properties Tue Feb 21 15:40:05 2006
@@ -1,21 +1,21 @@
-#
-# The logging properties used during tests..
-#
-log4j.rootLogger=DEBUG, out
-
-log4j.logger.org.apache.activemq=INFO
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.apache.activemq.store.journal=INFO
-log4j.logger.org.activeio.journal=INFO
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.FileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.out.file=target/servicemix-test.log
-log4j.appender.out.append=true
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, out
+
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+log4j.logger.org.apache.activemq.store.journal=INFO
+log4j.logger.org.activeio.journal=INFO
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j-tests.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j.properties?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j.properties (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j.properties Tue Feb 21 15:40:05 2006
@@ -1,22 +1,22 @@
-#
-# The logging properties used during tests..
-#
-log4j.rootLogger=DEBUG, stdout
-
-log4j.logger.javax.jbi=INFO
-log4j.logger.org.apache.activemq=INFO
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.apache.activemq.store.journal=INFO
-log4j.logger.org.activeio.journal=INFO
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.FileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.out.file=target/servicemix-test.log
-log4j.appender.out.append=true
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, stdout
+
+log4j.logger.javax.jbi=INFO
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+log4j.logger.org.apache.activemq.store.journal=INFO
+log4j.logger.org.activeio.journal=INFO
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/request.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-bpe/src/test/resources/request.xml?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-bpe/src/test/resources/request.xml (original)
+++ incubator/servicemix/trunk/servicemix-bpe/src/test/resources/request.xml Tue Feb 21 15:40:05 2006
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"
-            xmlns:wsa="http://www.w3.org/2005/08/addressing"
-            xmlns:lb="urn:logicblaze:soa:loanbroker">
-  <e:Header>
-    <wsa:Action>
-      urn:logicblaze:soa:loanbroker:LoanBroker:getLoanQuote
-    </wsa:Action>
-  </e:Header>
-  <e:Body>
-    <lb:getLoanQuoteRequest>
-      <lb:ssn>1243</lb:ssn>
-      <lb:amount>1000.0</lb:amount>
-      <lb:duration>12</lb:duration>
-    </lb:getLoanQuoteRequest>
-  </e:Body>
+<?xml version="1.0" encoding="UTF-8"?>
+<e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"
+            xmlns:wsa="http://www.w3.org/2005/08/addressing"
+            xmlns:lb="urn:logicblaze:soa:loanbroker">
+  <e:Header>
+    <wsa:Action>
+      urn:logicblaze:soa:loanbroker:LoanBroker:getLoanQuote
+    </wsa:Action>
+  </e:Header>
+  <e:Body>
+    <lb:getLoanQuoteRequest>
+      <lb:ssn>1243</lb:ssn>
+      <lb:amount>1000.0</lb:amount>
+      <lb:duration>12</lb:duration>
+    </lb:getLoanQuoteRequest>
+  </e:Body>
 </e:Envelope>

Propchange: incubator/servicemix/trunk/servicemix-bpe/src/test/resources/request.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-common/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-common/project.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/project.xml?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/project.xml (original)
+++ incubator/servicemix/trunk/servicemix-common/project.xml Tue Feb 21 15:40:05 2006
@@ -1,117 +1,117 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
-
-    Copyright 2004 The Apache Software Foundation
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-    
--->
-
-<!DOCTYPE project>
-<project>
-    <pomVersion>3</pomVersion>
-    <extend>${basedir}/../etc/project.xml</extend>
-
-    <name>ServiceMix :: Common</name>
-    <id>servicemix-common</id>
-    <shortDescription>Common components library</shortDescription>
-    <description>Common library for binding component and service engines</description>
-  
-    <package>org.apache.servicemix.common</package>
-    <packageGroups>
-      <packageGroup>
-        <title>Common components library</title>
-        <packages>org.apache.servicemix.common</packages>
-      </packageGroup>
-    </packageGroups>
- 
-    <!-- ============ -->
-    <!-- Dependencies -->
-    <!-- ============ -->
-    <dependencies>
-    
-      <dependency>
-        <groupId>${pom.groupId}</groupId>
-        <artifactId>servicemix-jbi</artifactId>
-        <version>${pom.currentVersion}</version>
-        <properties>
-          <eclipse.dependency>true</eclipse.dependency>
-        </properties>
-      </dependency>
-      
-      <!-- J2EE JARs -->
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-        <version>${geronimo_spec_j2ee_connector_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-        <version>${geronimo_spec_jta_version}</version>
-      </dependency>      
-
-      <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>${commons_logging_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>backport-util-concurrent</groupId>
-        <artifactId>backport-util-concurrent</artifactId>
-        <version>${backport_util_concurrent_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>mx4j</groupId>
-        <artifactId>mx4j</artifactId>
-        <version>${mx4j_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>servicemix</groupId>
-        <artifactId>jaxp</artifactId>
-        <version>${jaxp_version}</version>
-      </dependency>
-
-      <!-- WSDL deployment -->
-      <dependency>
-        <groupId>wsdl4j</groupId>
-        <artifactId>wsdl4j</artifactId>
-        <version>${wsdl4j_version}</version>
-      </dependency>
-
-      <!-- XBEAN deployment -->
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-spring</artifactId>
-        <version>${xbean_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-server</artifactId>
-        <version>${xbean_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-kernel</artifactId>
-        <version>${xbean_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>springframework</groupId>
-        <artifactId>spring</artifactId>
-        <version>${spring_version}</version>
-      </dependency>
-
-    </dependencies>  
-
-</project>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    
+-->
+
+<!DOCTYPE project>
+<project>
+    <pomVersion>3</pomVersion>
+    <extend>${basedir}/../etc/project.xml</extend>
+
+    <name>ServiceMix :: Common</name>
+    <id>servicemix-common</id>
+    <shortDescription>Common components library</shortDescription>
+    <description>Common library for binding component and service engines</description>
+  
+    <package>org.apache.servicemix.common</package>
+    <packageGroups>
+      <packageGroup>
+        <title>Common components library</title>
+        <packages>org.apache.servicemix.common</packages>
+      </packageGroup>
+    </packageGroups>
+ 
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+    <dependencies>
+    
+      <dependency>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>servicemix-jbi</artifactId>
+        <version>${pom.currentVersion}</version>
+        <properties>
+          <eclipse.dependency>true</eclipse.dependency>
+        </properties>
+      </dependency>
+      
+      <!-- J2EE JARs -->
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+        <version>${geronimo_spec_j2ee_connector_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
+        <version>${geronimo_spec_jta_version}</version>
+      </dependency>      
+
+      <dependency>
+        <groupId>commons-logging</groupId>
+        <artifactId>commons-logging</artifactId>
+        <version>${commons_logging_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>backport-util-concurrent</groupId>
+        <artifactId>backport-util-concurrent</artifactId>
+        <version>${backport_util_concurrent_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>mx4j</groupId>
+        <artifactId>mx4j</artifactId>
+        <version>${mx4j_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>servicemix</groupId>
+        <artifactId>jaxp</artifactId>
+        <version>${jaxp_version}</version>
+      </dependency>
+
+      <!-- WSDL deployment -->
+      <dependency>
+        <groupId>wsdl4j</groupId>
+        <artifactId>wsdl4j</artifactId>
+        <version>${wsdl4j_version}</version>
+      </dependency>
+
+      <!-- XBEAN deployment -->
+      <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-spring</artifactId>
+        <version>${xbean_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-server</artifactId>
+        <version>${xbean_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-kernel</artifactId>
+        <version>${xbean_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>springframework</groupId>
+        <artifactId>spring</artifactId>
+        <version>${spring_version}</version>
+      </dependency>
+
+    </dependencies>  
+
+</project>

Propchange: incubator/servicemix/trunk/servicemix-common/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/package.html
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/package.html?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/package.html (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/package.html Tue Feb 21 15:40:05 2006
@@ -1,9 +1,9 @@
-<html>
-<head>
-</head>
-<body>
-
-Base classes to write JBI standard Binding Components and Service Engines
-
-</body>
-</html>
+<html>
+<head>
+</head>
+<body>
+
+Base classes to write JBI standard Binding Components and Service Engines
+
+</body>
+</html>

Propchange: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java Tue Feb 21 15:40:05 2006
@@ -1,118 +1,118 @@
-/**
-*
-* Copyright 2005 the original author or authors.
-*
-*  Licensed under the Apache License, Version 2.0 (the "License");
-*  you may not use this file except in compliance with the License.
-*  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-*  Unless required by applicable law or agreed to in writing, software
-*  distributed under the License is distributed on an "AS IS" BASIS,
-*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*  See the License for the specific language governing permissions and
-*  limitations under the License.
-*/
-package org.apache.servicemix.common.xbean;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.apache.xbean.server.classloader.MultiParentClassLoader;
-import org.apache.xbean.server.repository.Repository;
-import org.apache.xbean.server.spring.loader.SpringLoader;
-import org.apache.xbean.spring.context.SpringXmlPreprocessor;
-import org.apache.xbean.spring.context.SpringApplicationContext;
-import org.springframework.beans.FatalBeanException;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
-* ClassLoaderXmlPreprocessor extracts a ClassLoader definition from the xml document, builds a class loader, assigns
-* the class loader to the application context and xml reader, and removes the classpath element from document.
-*
-* @org.apache.xbean.XBean namespace="http://xbean.org/schemas/server" element="class-loader-xml-preprocessor"
-*     description="Extracts a ClassLoader definition from the xml document."
-*
-* @author Dain Sundstrom
-* @version $Id$
-* @since 2.0
-*/
-public class ClassLoaderXmlPreprocessor implements SpringXmlPreprocessor {
-   private final Repository repository;
-
-   /**
-    * Creates a ClassLoaderXmlPreprocessor that uses the specified repository to resolve the class path locations.
-    * @param repository the repository used to resolve the class path locations
-    */
-   public ClassLoaderXmlPreprocessor(Repository repository) {
-       this.repository = repository;
-   }
-
-   /**
-    * Extracts a ClassLoader definition from the xml document, builds a class loader, assigns
-    * the class loader to the application context and xml reader, and removes the classpath element from document.
-    *
-    * @param applicationContext the application context on which the class loader will be set
-    * @param reader the xml reader on which the class loader will be set
-    * @param document the xml document to inspect
-    */
-   public void preprocess(SpringApplicationContext applicationContext, XmlBeanDefinitionReader reader, Document document) {
-       // determine the classLoader
-       ClassLoader classLoader;
-       NodeList classpathElements = document.getDocumentElement().getElementsByTagName("classpath");
-       if (classpathElements.getLength() < 1) {
-           classLoader = getClass().getClassLoader();
-       } else if (classpathElements.getLength() > 1) {
-           throw new FatalBeanException("Expected only classpath element but found " + classpathElements.getLength());
-       } else {
-           Element classpathElement = (Element) classpathElements.item(0);
-
-           // build the classpath
-           List classpath = new ArrayList();
-           NodeList locations = classpathElement.getElementsByTagName("location");
-           for (int i = 0; i < locations.getLength(); i++) {
-               Element locationElement = (Element) locations.item(i);
-
-               String location = ((Text) locationElement.getFirstChild()).getData().trim();
-               classpath.add(location);
-           }
-
-           // convert the paths to URLS
-           URL[] urls = new URL[classpath.size()];
-           for (ListIterator iterator = classpath.listIterator(); iterator.hasNext();) {
-               String location = (String) iterator.next();
-               urls[iterator.previousIndex()] = repository.getResource(location);
-           }
-
-           // create the classloader
-           ClassLoader parentLoader = getClassLoader(applicationContext);
-           classLoader = new MultiParentClassLoader(applicationContext.getDisplayName(), urls, parentLoader);
-
-           // remove the classpath element so Spring doesn't get confused
-           document.getDocumentElement().removeChild(classpathElement);
-       }
-
-       // assign the class loader to the xml reader and the application context
-       reader.setBeanClassLoader(classLoader);
-       applicationContext.setClassLoader(classLoader);
-       Thread.currentThread().setContextClassLoader(classLoader);
-   }
-
-   private static ClassLoader getClassLoader(SpringApplicationContext applicationContext) {
-       ClassLoader classLoader = applicationContext.getClassLoader();
-       if (classLoader == null) {
-           classLoader = Thread.currentThread().getContextClassLoader();
-       }
-       if (classLoader == null) {
-           classLoader = SpringLoader.class.getClassLoader();
-       }
-       return classLoader;
-   }
-}
+/**
+*
+* Copyright 2005 the original author or authors.
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*/
+package org.apache.servicemix.common.xbean;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.xbean.server.classloader.MultiParentClassLoader;
+import org.apache.xbean.server.repository.Repository;
+import org.apache.xbean.server.spring.loader.SpringLoader;
+import org.apache.xbean.spring.context.SpringXmlPreprocessor;
+import org.apache.xbean.spring.context.SpringApplicationContext;
+import org.springframework.beans.FatalBeanException;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/**
+* ClassLoaderXmlPreprocessor extracts a ClassLoader definition from the xml document, builds a class loader, assigns
+* the class loader to the application context and xml reader, and removes the classpath element from document.
+*
+* @org.apache.xbean.XBean namespace="http://xbean.org/schemas/server" element="class-loader-xml-preprocessor"
+*     description="Extracts a ClassLoader definition from the xml document."
+*
+* @author Dain Sundstrom
+* @version $Id$
+* @since 2.0
+*/
+public class ClassLoaderXmlPreprocessor implements SpringXmlPreprocessor {
+   private final Repository repository;
+
+   /**
+    * Creates a ClassLoaderXmlPreprocessor that uses the specified repository to resolve the class path locations.
+    * @param repository the repository used to resolve the class path locations
+    */
+   public ClassLoaderXmlPreprocessor(Repository repository) {
+       this.repository = repository;
+   }
+
+   /**
+    * Extracts a ClassLoader definition from the xml document, builds a class loader, assigns
+    * the class loader to the application context and xml reader, and removes the classpath element from document.
+    *
+    * @param applicationContext the application context on which the class loader will be set
+    * @param reader the xml reader on which the class loader will be set
+    * @param document the xml document to inspect
+    */
+   public void preprocess(SpringApplicationContext applicationContext, XmlBeanDefinitionReader reader, Document document) {
+       // determine the classLoader
+       ClassLoader classLoader;
+       NodeList classpathElements = document.getDocumentElement().getElementsByTagName("classpath");
+       if (classpathElements.getLength() < 1) {
+           classLoader = getClass().getClassLoader();
+       } else if (classpathElements.getLength() > 1) {
+           throw new FatalBeanException("Expected only classpath element but found " + classpathElements.getLength());
+       } else {
+           Element classpathElement = (Element) classpathElements.item(0);
+
+           // build the classpath
+           List classpath = new ArrayList();
+           NodeList locations = classpathElement.getElementsByTagName("location");
+           for (int i = 0; i < locations.getLength(); i++) {
+               Element locationElement = (Element) locations.item(i);
+
+               String location = ((Text) locationElement.getFirstChild()).getData().trim();
+               classpath.add(location);
+           }
+
+           // convert the paths to URLS
+           URL[] urls = new URL[classpath.size()];
+           for (ListIterator iterator = classpath.listIterator(); iterator.hasNext();) {
+               String location = (String) iterator.next();
+               urls[iterator.previousIndex()] = repository.getResource(location);
+           }
+
+           // create the classloader
+           ClassLoader parentLoader = getClassLoader(applicationContext);
+           classLoader = new MultiParentClassLoader(applicationContext.getDisplayName(), urls, parentLoader);
+
+           // remove the classpath element so Spring doesn't get confused
+           document.getDocumentElement().removeChild(classpathElement);
+       }
+
+       // assign the class loader to the xml reader and the application context
+       reader.setBeanClassLoader(classLoader);
+       applicationContext.setClassLoader(classLoader);
+       Thread.currentThread().setContextClassLoader(classLoader);
+   }
+
+   private static ClassLoader getClassLoader(SpringApplicationContext applicationContext) {
+       ClassLoader classLoader = applicationContext.getClassLoader();
+       if (classLoader == null) {
+           classLoader = Thread.currentThread().getContextClassLoader();
+       }
+       if (classLoader == null) {
+           classLoader = SpringLoader.class.getClassLoader();
+       }
+       return classLoader;
+   }
+}

Propchange: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/DISCLAIMER.txt
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/DISCLAIMER.txt?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/DISCLAIMER.txt (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/DISCLAIMER.txt Tue Feb 21 15:40:05 2006
@@ -1,7 +1,7 @@
-ActiveMQ is an effort undergoing incubation at the Apache Software Foundation
-(ASF), sponsored by the Geronimo PMC. Incubation is required of all newly
-accepted projects until a further review indicates that the infrastructure,
-communications, and decision making process have stabilized in a manner
-consistent with other successful ASF projects. While incubation status is not
-necessarily a reflection of the completeness or stability of the code, it does
+ActiveMQ is an effort undergoing incubation at the Apache Software Foundation
+(ASF), sponsored by the Geronimo PMC. Incubation is required of all newly
+accepted projects until a further review indicates that the infrastructure,
+communications, and decision making process have stabilized in a manner
+consistent with other successful ASF projects. While incubation status is not
+necessarily a reflection of the completeness or stability of the code, it does
 indicate that the project has yet to be fully endorsed by the ASF.

Propchange: incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/DISCLAIMER.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-common/src/main/resources/META-INF/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native