* <p>
* Creates the channels. Channels persist across server restarts,
* so they only need to be created here in {@code initialize}.
*/
public void initialize(Properties props) {
ChannelManager channelMgr = AppContext.getChannelManager();
// Create and keep a reference to the first channel.
Channel c1 = channelMgr.createChannel(CHANNEL_1_NAME,
null,
Delivery.RELIABLE);
channel1 = AppContext.getDataManager().createReference(c1);
// We don't keep a reference to the second channel, to demonstrate
// looking it up by name when needed. Also, this channel uses a
// {@link ChannelListener} to filter messages.
channelMgr.createChannel(CHANNEL_2_NAME,
new HelloChannelsChannelListener(),
Delivery.RELIABLE);
}