You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/08/02 15:14:04 UTC
svn commit: r681964 -
/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
Author: ffang
Date: Sat Aug 2 06:14:04 2008
New Revision: 681964
URL: http://svn.apache.org/viewvc?rev=681964&view=rev
Log:
[SM-1489]revert changes for performance reason
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java?rev=681964&r1=681963&r2=681964&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java Sat Aug 2 06:14:04 2008
@@ -16,28 +16,18 @@
*/
package org.apache.servicemix.camel;
-import java.io.IOException;
import javax.jbi.messaging.ExchangeStatus;
import javax.jbi.messaging.InOnly;
import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessagingException;
-import javax.jbi.messaging.NormalizedMessage;
import javax.jbi.messaging.RobustInOnly;
import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamSource;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
import org.apache.camel.Endpoint;
import org.apache.camel.Processor;
import org.apache.servicemix.JbiConstants;
import org.apache.servicemix.common.ServiceUnit;
import org.apache.servicemix.common.endpoints.ProviderEndpoint;
-import org.apache.servicemix.jbi.jaxp.SourceTransformer;
/**
* A JBI endpoint which when invoked will delegate to a Camel endpoint
@@ -70,9 +60,6 @@
// The component acts as a provider, this means that another component has requested our service
// As this exchange is active, this is either an in or a fault (out are sent by this component)
- //firstly need transform the content in NormalizedMessage from StreamSource to DomSource
- //which is supposed to be consumed multiple times
- transformContent(exchange.getMessage("in"));
if (exchange.getRole() == MessageExchange.Role.PROVIDER) {
// Exchange is finished
if (exchange.getStatus() == ExchangeStatus.DONE) {
@@ -91,14 +78,6 @@
}
}
- private void transformContent(NormalizedMessage message) throws MessagingException,
- TransformerException, ParserConfigurationException, IOException, SAXException {
- if (message.getContent() instanceof StreamSource) {
- SourceTransformer st = new SourceTransformer();
- Node node = st.toDOMNode(message.getContent());
- message.setContent(new DOMSource(node));
- }
- }
protected void handleActiveProviderExchange(MessageExchange exchange) throws Exception {
// Fault message