You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/06/26 08:14:59 UTC
[1/3] git commit: CAMEL-7541 fixed the issue of
RedisIdempotentRepository doesn't work out of box
Repository: camel
Updated Branches:
refs/heads/camel-2.12.x f116069ed -> c25146502
refs/heads/camel-2.13.x 2bc2f1963 -> 91f7e0d10
CAMEL-7541 fixed the issue of RedisIdempotentRepository doesn't work out of box
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4cc8db61
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4cc8db61
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4cc8db61
Branch: refs/heads/camel-2.13.x
Commit: 4cc8db61b199fc6a2f2bad46974d5f345ebe6cd8
Parents: 2bc2f19
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Jun 26 11:17:23 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Jun 26 14:06:07 2014 +0800
----------------------------------------------------------------------
components/camel-spring-redis/pom.xml | 7 ++++++-
.../redis/processor/idempotent/RedisIdempotentRepository.java | 7 ++++++-
.../component/redis/RedisComponentSpringIntegrationTest.java | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4cc8db61/components/camel-spring-redis/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/pom.xml b/components/camel-spring-redis/pom.xml
index 6ad4594..36e8e56 100755
--- a/components/camel-spring-redis/pom.xml
+++ b/components/camel-spring-redis/pom.xml
@@ -46,7 +46,7 @@
<artifactId>spring-data-redis</artifactId>
<version>${spring-data-redis-version}</version>
</dependency>
-
+ <!-- need to add the dependency of jedis as redis client lib -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
@@ -72,6 +72,11 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/4cc8db61/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
index 36c3c98..aad2da8 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
@@ -54,7 +54,11 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
@ManagedOperation(description = "Adds the key to the store")
public boolean add(String key) {
- return setOperations.add(processorName, key) != null;
+ if (!contains(key)) {
+ return setOperations.add(processorName, key) != null;
+ } else {
+ return false;
+ }
}
@ManagedOperation(description = "Does the store contain the given key")
@@ -64,6 +68,7 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
@ManagedOperation(description = "Remove the key from the store")
public boolean remove(String key) {
+ System.out.println("Remove the key" + key);
return setOperations.remove(processorName, key) != null;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/4cc8db61/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
index f2d5758..d8548bd 100755
--- a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
+++ b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
@@ -26,7 +26,7 @@ import org.junit.Ignore;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-@Ignore
+@Ignore ("IntegrationTest")
public class RedisComponentSpringIntegrationTest extends CamelSpringTestSupport {
@EndpointInject(uri = "direct:start")
[3/3] git commit: CAMEL-7541 Removed the System.out
Posted by ni...@apache.org.
CAMEL-7541 Removed the System.out
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/91f7e0d1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/91f7e0d1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/91f7e0d1
Branch: refs/heads/camel-2.13.x
Commit: 91f7e0d10344495da73b33a8a2a24efc24a30394
Parents: 4cc8db6
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Jun 26 14:13:51 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Jun 26 14:14:36 2014 +0800
----------------------------------------------------------------------
.../redis/processor/idempotent/RedisIdempotentRepository.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/91f7e0d1/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
index aad2da8..afe30c7 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
@@ -68,7 +68,6 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
@ManagedOperation(description = "Remove the key from the store")
public boolean remove(String key) {
- System.out.println("Remove the key" + key);
return setOperations.remove(processorName, key) != null;
}
[2/3] git commit: CAMEL-7541 fixed the issue of
RedisIdempotentRepository doesn't work out of box
Posted by ni...@apache.org.
CAMEL-7541 fixed the issue of RedisIdempotentRepository doesn't work out of box
Conflicts:
components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
#
# It looks like you may be committing a cherry-pick.
# If this is not correct, please remove the file
# .git/CHERRY_PICK_HEAD
# and try again.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch camel-2.12.x
# You are currently cherry-picking.
# (all conflicts fixed: run "git cherry-pick --continue")
# (use "git cherry-pick --abort" to cancel the cherry-pick operation)
#
# Changes to be committed:
#
# modified: components/camel-spring-redis/pom.xml
# modified: components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
# modified: components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# components/camel-cxf/activemq-data/
# components/camel-cxf/pom.xml.orig
# components/camel-cxf/pom.xml.rej
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c2514650
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c2514650
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c2514650
Branch: refs/heads/camel-2.12.x
Commit: c25146502512c46db2c3f4c69379dda74b57d1a8
Parents: f116069
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Jun 26 11:17:23 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Jun 26 14:12:51 2014 +0800
----------------------------------------------------------------------
components/camel-spring-redis/pom.xml | 7 ++++++-
.../processor/idempotent/RedisIdempotentRepository.java | 8 ++++++--
.../component/redis/RedisComponentSpringIntegrationTest.java | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/c2514650/components/camel-spring-redis/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/pom.xml b/components/camel-spring-redis/pom.xml
index e381d45..1238dd5 100755
--- a/components/camel-spring-redis/pom.xml
+++ b/components/camel-spring-redis/pom.xml
@@ -46,7 +46,7 @@
<artifactId>spring-data-redis</artifactId>
<version>${spring-data-redis-version}</version>
</dependency>
-
+ <!-- need to add the dependency of jedis as redis client lib -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
@@ -72,6 +72,11 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/c2514650/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
index 82dc57c..ec06081 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
@@ -54,7 +54,11 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
@ManagedOperation(description = "Adds the key to the store")
public boolean add(String key) {
- return setOperations.add(processorName, key);
+ if (!contains(key)) {
+ return setOperations.add(processorName, key) != null;
+ } else {
+ return false;
+ }
}
@ManagedOperation(description = "Does the store contain the given key")
@@ -64,7 +68,7 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
@ManagedOperation(description = "Remove the key from the store")
public boolean remove(String key) {
- return setOperations.remove(processorName, key);
+ return setOperations.remove(processorName, key) != null;
}
@ManagedAttribute(description = "The processor name")
http://git-wip-us.apache.org/repos/asf/camel/blob/c2514650/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
index f2d5758..d8548bd 100755
--- a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
+++ b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisComponentSpringIntegrationTest.java
@@ -26,7 +26,7 @@ import org.junit.Ignore;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-@Ignore
+@Ignore ("IntegrationTest")
public class RedisComponentSpringIntegrationTest extends CamelSpringTestSupport {
@EndpointInject(uri = "direct:start")