* version of this method to retrieve a DataDestination if you are not in the
* context of processing a current message when you need the RemotingDestination.
*/
public static RemotingDestination getRemotingDestination(String serverId, String destinationName)
{
MessageBroker broker = MessageBroker.getMessageBroker(serverId);
if (broker == null)
{
// Unable to locate a MessageBroker initialized with server id ''{0}''
MessageException me = new MessageException();
me.setMessage(NO_MESSAGE_BROKER, new Object[] { serverId });
throw me;
}
RemotingService rs = (RemotingService) broker.getServiceByType(REMOTING_SERVICE_CLASS);
if (rs == null)
{
// MessageBroker with server id ''{0}'' does not contain a service with class flex.messaging.remoting.RemotingService
MessageException me = new MessageException();
me.setMessage(NO_REMOTING_SERVICE, new Object[] { serverId });