mirror of https://github.com/apache/activemq.git
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:
parent
2532f5c4f1
commit
2eefd150f0
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue