added refactor to make it easier to create endpoint instances from a spring.xml with minimal constructors for https://issues.apache.org/activemq/browse/CAMEL-505

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@655516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2008-05-12 15:18:52 +00:00
parent 2532f5c4f1
commit 2eefd150f0
2 changed files with 6 additions and 1 deletions

View File

@ -87,7 +87,7 @@ public class CamelMessageProducer extends ActiveMQMessageProducerSupport {
throw new IllegalArgumentException("Invalid destination setting: " + destination + " when expected: " + this.destination);
}
try {
JmsExchange exchange = new JmsExchange(endpoint.getContext(), ExchangePattern.InOnly, camelDestination.getBinding(), message);
JmsExchange exchange = new JmsExchange(endpoint.getCamelContext(), ExchangePattern.InOnly, camelDestination.getBinding(), message);
producer.process(exchange);
} catch (JMSException e) {
throw e;

View File

@ -58,6 +58,11 @@ public class JournalEndpoint extends DefaultEndpoint<Exchange> {
this.directory = directory;
}
public JournalEndpoint(String endpointUri, File directory) {
super(endpointUri);
this.directory = directory;
}
public boolean isSingleton() {
return true;
}