Universal Messaging Developer Guide : The Enterprise Client APIs : The Universal Messaging Java Enterprise Developer's Guide : General Features : Universal Messaging Java - Channel Joins
Universal Messaging Java - Channel Joins
Creating Channel Joins
Channel joins can be created using the nmakechanjoin join sample application which is provided in the bin directory of the Universal Messaging installation. For further information on using this example please see the Make Channel Join example page.
Universal Messaging joins are created as follows:

//Obtain a reference to the source channel
nChannel mySrcChannel = mySession.findChannel( nca );

//Obtain a reference to the destination channel
nChannel myDstChannel = mySession.findChannel( dest );

//create the join
mySrcChannel.joinChannel( myDstChannel, true, jhc, SELECTOR );
Channel joins can also be deleted. Please see the Delete Channel Join example for more information.
Archive Joins
It is possible to archive messages from a given channel by using an archive join. To perform an archive join, the destination must be a queue in which the archived messages will be stored. An example of this can be seen below:
Since this is an archive join, all events matching the optional selector parameter(all events if no selector is specified) will be put into the archive queue, by design this includes all duplicate events published to the source.

nChannelAttributes archiveAtr = new nChannelAttributes();
archiveAtr.setName(rchanName);
nQueue archiveQueue = mySession.findQueue(archiveAtr);
mySrcChannel.joinChannelToArchive(archiveQueue);
Inter-Cluster Joins
Inter-cluster joins are added and deleted in almost exactly the same way as normal joins. The only differences are that the two clusters must have an inter-cluster connection in place, and that since the clusters do not share a namespace, ech channel must be retrieved from nodes in their respective clusters, rather than through the same node. For example :

nChannel cluster1chan1 = realmNode1.findChannel(channelattributes1);
nChannel cluster2chan1 = realmNode4.findChannel(channelattributes2);
cluster1chan1.joinChannel(cluster2chan1);
Inter-Cluster joins can also be created through the Enterprise Manager.
Copyright © 2013-2014 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback