Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using the routes as above it's also possible to send and receive any serializable object. The camel component detects that the payload is not a Jini Entry and then it automatically wraps the payload into a Camel Jini Entry. In this way a JavaSpace can be used as a generic transport.

Using JavaSpace as a remote invocation transport

The camel-javaspace component has been tailored to work in combination with the camel-bean component. It's possible, then, to call a remote POJO using JavaSpace as a transport:

No Format

from("direct:input").to("javaspace:jini://localhost?spaceName=mySpace"); //Client side

from("javaspace:jini://localhost?concurrentConsumers=10&spaceName=mySpace").to("pojo:pojo"); //Server side

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

...