Glossary:
Nirvana J2ME : Finding a Channel
Once the session has been established with the Nirvana realm server, the session object can be used to locate an existing Nirvana Channel (nChannel) by specifying the channel's name.
Note that you can use the Enterprise Manager GUI to create a Nirvana Channel.
This J2ME code snippet demonstrates how to find a channel (for example /eur/rates):
// Create a channel attributes nObject
nObject ratesca = nObject.createChannelAttributes();
// Set the name of the channel
nObject.setChannelAttributesName(ratesca,"/eur/rates");
nObject myRatesChannel= nObject.findChannel(mySession,ratesca);
The findChannel method is synchronous; it returns the channel nObject if the channel exists, or throws an exception if a validation or other error occurs.
