Skip to content
Browse files

Working around deprecations in Camel 2.10.x API

  • Loading branch information...
1 parent e80278b commit df45fc9bae189aa193025a980f2d4c83c12a67bd @alaz alaz committed Sep 25, 2012
View
2 .gitignore
@@ -1,2 +1,4 @@
+/.idea
/target
+*.iml
*~
View
1 pom.xml
@@ -105,6 +105,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
+ <showDeprecation>true</showDeprecation>
<source>${java.src.version}</source>
<target>${java.src.version}</target>
<optimise>true</optimise>
View
2 src/main/java/com/osinka/camel/beanstalk/BeanstalkConsumer.java
@@ -154,7 +154,7 @@ public BeanstalkEndpoint getEndpoint() {
@Override
protected void doStart() throws Exception {
- executor = getEndpoint().getCamelContext().getExecutorServiceStrategy().newSingleThreadExecutor(this, "Beanstalk");
+ executor = getEndpoint().getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this, "Beanstalk-Consumer");
executor.execute(initTask);
sync = new Sync();
super.doStart();
View
2 src/main/java/com/osinka/camel/beanstalk/BeanstalkProducer.java
@@ -75,7 +75,7 @@ protected void initClient() {
@Override
protected void doStart() throws Exception {
super.doStart();
- executor = getEndpoint().getCamelContext().getExecutorServiceStrategy().newSingleThreadExecutor(this, "Beanstalk");
+ executor = getEndpoint().getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this, "Beanstalk-Producer");
executor.execute(new Runnable() {
public void run() {
initClient();
View
3 src/main/java/com/osinka/camel/beanstalk/processors/KickCommand.java
@@ -21,7 +21,6 @@
import org.apache.camel.InvalidPayloadException;
import org.apache.camel.Message;
import org.apache.camel.NoSuchHeaderException;
-import org.apache.camel.util.ExchangeHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,7 +33,7 @@ public KickCommand(BeanstalkEndpoint endpoint) {
@Override
public void act(final Client client, final Exchange exchange) throws NoSuchHeaderException, InvalidPayloadException {
- final Integer jobs = ExchangeHelper.getMandatoryInBody(exchange, Integer.class);
+ final Integer jobs = exchange.getIn().getMandatoryBody(Integer.class);
final int result = client.kick(jobs);
if (log.isDebugEnabled())
log.debug(String.format("Kick %d jobs. Kicked %d actually.", jobs, result));

0 comments on commit df45fc9

Please sign in to comment.
Something went wrong with that request. Please try again.