You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

JavaSpace Component

The javaspace: component is a transport for working with any JavaSpace compliant implementation, this component has been tested with both the Blitz implementation and the GigaSpace implementation .
This component can be used for sending and receiving any object inheriting from the Jini Entry class, it's also possible to pass an id (Spring Bean) of a template that can be used for reading/taking the entries from the space.
This component can be also used for sending/receiving any serializable object acting as a sort of generic transport. The JavaSpace component contains a special optimization for dealing with the BeanExchange. It can be used, then, for invoking remotely a POJO using as a transport a JavaSpace.
This latter feature can be used for an easy implementation of the master/worker pattern where a POJO provides the business logic for the worker.
Look at the test cases for seeing the various usage option for this component.

URI format

javaspace:jini://host?options

Examples

 

Options

Name

Default Value

Description

spaceName

null

This is the JavaSpace name

verb

take

This is the verb for getting JavaSpace entries, it can be: take or read

transactional

false

if true, sending and receiving of entries is performed under a transaction

transactionalTimeout

Long.MAX_VALUE

the transaction timeout

concurrentConsumers

1

the number of concurrent consumer getting entries from the JavaSpace

templateId

null

if present, this option it's a Spring Bean id to be used as a template for reading/taking entries

Using camel-javaspace

To use this module you need to use the FUSE Mediation Router distribution. Or you could just add the following to your pom.xml, substituting the version number for the latest & greatest release.

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-parent</artifactId>
  <version>1.4.0.0-fuse</version>
</dependency>

And ensure you are pointing at the maven repo

   <repository>
     <id>open.iona.m2</id>
     <name>IONA Open Source Community Release Repository</name>
     <url>http://repo.open.iona.com/maven2</url>
     <snapshots>
       <enabled>false</enabled>
     </snapshots>
     <releases>
       <enabled>true</enabled>
     </releases>
   </repository>

Building From Source

The source for camel-javaspace is available here: https://projects.open.iona.com/projects/svn/iona/camel/trunk/components/camel-javaspace/

You'll need to register with http://open.iona.com to be able to access subversion.

The full FUSE distro is here: https://projects.open.iona.com/projects/svn/iona/camel/trunk/

  • No labels