|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractQueue<E>
com.caucho.jms.queue.AbstractDestination<E>
com.caucho.jms.queue.AbstractTopic<E>
com.caucho.jms.cluster.ClusterTopicImpl<X>
com.caucho.jms.ClusterTopic<X>
@Service @Configurable public class ClusterTopic<X extends java.io.Serializable>
ClusterTopic provides reliable Publish/Subscribe message model communication between the nodes in the Resin cluster.
Following example shows how to make two nodes in resin cluster communicate between each other using cluster topic. This example makes use of Candi Resin's dependency injection implementation.
<registry>
<resin xmlns="http://caucho.com/ns/resin"
xmlns:jms="urn:java:com.caucho.jms">
<cluster id="">
<server id="a" port="6700"/>
<server id="b" port="6701"/>
<host id="">
<web-app id="">
<jms:ClusterTopic>
<jms:name>server_topic</jms:name>
</jms:ClusterTopic>
</web-app>
</host>
</cluster>
</resin>
</registry>
Above configurations would make ClusterTopic to run on nodes 'a' and 'b'.
2. Executing following lines of code on node 'a', would make node 'a' as
the subscriber to the Topic:
| Constructor Summary | |
|---|---|
ClusterTopic()
|
|
| Method Summary |
|---|
| Methods inherited from class com.caucho.jms.cluster.ClusterTopicImpl |
|---|
acknowledge, close, closeSubscriber, createSubscriber, destroy, getUrl, hasMessage, init, notifyMessageAvailable, receiveLocal, removeCluster, rollback, send, sendLocal, sendLocalAsBackup, setCluster, setPath, subscribeTopic |
| Methods inherited from class com.caucho.jms.queue.AbstractTopic |
|---|
drainTo, drainTo, iterator, offer, offer, peek, poll, poll, postConstruct, put, receive, remainingCapacity, setTopicName, size, take |
| Methods inherited from class com.caucho.jms.queue.AbstractDestination |
|---|
generateMessageID, generateMessageID, getJMSDestination, getName, getQueueName, getTopicName, hasMessage, setName, setSerializationHandle, toString |
| Methods inherited from class java.util.AbstractQueue |
|---|
add, addAll, clear, element, remove |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jms.Topic |
|---|
getTopicName, toString |
| Methods inherited from interface java.util.concurrent.BlockingQueue |
|---|
add, contains, remove |
| Methods inherited from interface java.util.Queue |
|---|
element, remove |
| Methods inherited from interface java.util.Collection |
|---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public ClusterTopic()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||