You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/02/21 11:40:19 UTC
svn commit: r1072924 - in /camel/trunk/components/camel-javaspace: README
pom.xml
src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java
Author: davsclaus
Date: Mon Feb 21 10:40:19 2011
New Revision: 1072924
URL: http://svn.apache.org/viewvc?rev=1072924&view=rev
Log:
CAMEL-3687: camel-javaspace now works with latest gigaspaes. Thanks to David Greco for patch.
Modified:
camel/trunk/components/camel-javaspace/README
camel/trunk/components/camel-javaspace/pom.xml
camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java
Modified: camel/trunk/components/camel-javaspace/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/README?rev=1072924&r1=1072923&r2=1072924&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/README (original)
+++ camel/trunk/components/camel-javaspace/README Mon Feb 21 10:40:19 2011
@@ -1,2 +1,9 @@
-This component has been tested with both Gigaspaces and Blitz JavaSpace implementations.
-For running the tests just run Blitz or Gigaspaces and type: mvn install -Dintegration-test
\ No newline at end of file
+This component has been tested with Gigaspaces
+For running the tests just run Gigaspaces setting the NIC_ADDR to localhost:
+1) export NIC_ADDR=localhost
+2) cd $JSHOMEDIR/bin
+3) ./gsInstance.sh
+
+Then in another shell:
+1) export JSHOMEDIR=<home directory of the GS installation>
+2) mvn install -Dintegration-test-gigaspaces
\ No newline at end of file
Modified: camel/trunk/components/camel-javaspace/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/pom.xml?rev=1072924&r1=1072923&r2=1072924&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/pom.xml (original)
+++ camel/trunk/components/camel-javaspace/pom.xml Mon Feb 21 10:40:19 2011
@@ -15,7 +15,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -45,41 +46,67 @@
<artifactId>camel-spring</artifactId>
</dependency>
<dependency>
- <groupId>net.jini</groupId>
+ <groupId>jini</groupId>
<artifactId>jini-core</artifactId>
<version>2.1</version>
+ <scope>compile</scope>
</dependency>
<dependency>
- <groupId>net.jini</groupId>
+ <groupId>jini</groupId>
<artifactId>jini-ext</artifactId>
<version>2.1</version>
+ <scope>compile</scope>
</dependency>
+ <!-- testing -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+
+ <!-- logging -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
- <id>integration-test</id>
+ <id>integration-test-gigaspaces</id>
<activation>
<property>
<name>integration-test</name>
</property>
</activation>
+ <dependencies>
+ <dependency>
+ <groupId>jini</groupId>
+ <artifactId>jini-core</artifactId>
+ <version>2.1</version>
+ <scope>system</scope>
+ <systemPath>${JSHOMEDIR}/lib/required/gs-runtime.jar</systemPath>
+ </dependency>
+ <dependency>
+ <groupId>jini</groupId>
+ <artifactId>jini-ext</artifactId>
+ <version>2.1</version>
+ <scope>system</scope>
+ <systemPath>${JSHOMEDIR}/lib/required/gs-runtime.jar</systemPath>
+ </dependency>
+ </dependencies>
<build>
<plugins>
<plugin>
Modified: camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java?rev=1072924&r1=1072923&r2=1072924&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java (original)
+++ camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java Mon Feb 21 10:40:19 2011
@@ -46,7 +46,7 @@ public class JavaSpaceRequestReplyTest e
ITestPojo proxy = ProxyHelper.createProxy(endpoint, ITestPojo.class);
Request req = new Request();
long start = System.currentTimeMillis();
- for (int i = 0; i < 1000; ++i) {
+ for (int i = 0; i < 100; ++i) {
req.setPayload("REQUEST " + i);
Reply reply = proxy.method(req);
Assert.assertTrue(reply.getPayload().equals("REPLY for REQUEST " + i));
@@ -62,7 +62,7 @@ public class JavaSpaceRequestReplyTest e
Endpoint endpoint = context.getEndpoint("direct:input");
ExecutorService es = Executors.newFixedThreadPool(10);
long start = System.currentTimeMillis();
- for (int i = 0; i < 1000; ++i) {
+ for (int i = 0; i < 100; ++i) {
Request req = new Request();
req.setPayload("REQUEST " + i);
ITestPojo proxy = ProxyHelper.createProxy(endpoint, ITestPojo.class);
@@ -93,11 +93,11 @@ public class JavaSpaceRequestReplyTest e
public void configure() {
from("direct:input").to("javaspace:jini://localhost?spaceName=mySpace");
- from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("pojo:pojo");
+ from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("bean:pojo");
- from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("pojo:pojo");
+ from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("bean:pojo");
- from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("pojo:pojo");
+ from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("bean:pojo");
}
};
}
Modified: camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java?rev=1072924&r1=1072923&r2=1072924&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java (original)
+++ camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaspacesXPathTest.java Mon Feb 21 10:40:19 2011
@@ -61,8 +61,8 @@ public class JavaspacesXPathTest extends
from("javaspace:jini://localhost?spaceName=mySpace&verb=take&concurrentConsumers=1&transactional=false")
.filter().xpath("/person[@name='James']").process(new Processor() {
public void process(Exchange exc) throws Exception {
- byte[] body = exc.getIn().getBody(byte[].class);
- assertEquals("<person name='James' city='London'/>".getBytes(), body);
+ String body = exc.getIn().getBody(String.class);
+ assertEquals("<person name='James' city='London'/>", body);
latch.countDown();
}
});