if (destination == null) { throw new InvalidDestinationException("No such destination: " + jmsDestination); }
	public BrowserDelegate createBrowserDelegate(Destination jmsDestination, String messageSelector)   	throws JMSException	{      if (closed)      {         throw new IllegalStateException("Session is closed");      }      if (jmsDestination == null)      {         throw new InvalidDestinationException("null destination");      }	   // look-up destination	   DestinationManagerImpl dm = serverPeer.getDestinationManager();	        Distributor destination = dm.getCoreDestination(jmsDestination);            if (!(destination instanceof Queue))      {         throw new IllegalStateException("Cannot browse a topic");      }		   BrowserDelegate bd = null;	   Serializable oid = serverPeer.getBrowserAdvisor().getName();	   String stackName = "BrowserStack";	   AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);		   Interceptor[] interceptors = stack.createInterceptors(serverPeer.getBrowserAdvisor(), null);	   	   JMSInvocationHandler h = new JMSInvocationHandler(interceptors);		   String browserID = generateBrowserID();		   SimpleMetaData metadata = new SimpleMetaData();      	   metadata.addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, oid, PayloadKey.AS_IS);	   metadata.addMetaData(RemotingClientInterceptor.REMOTING,            RemotingClientInterceptor.INVOKER_LOCATOR,	                        serverPeer.getLocator(),	                        PayloadKey.AS_IS);	   metadata.addMetaData(RemotingClientInterceptor.REMOTING,            RemotingClientInterceptor.SUBSYSTEM,	                        "JMS",	                        PayloadKey.AS_IS);	  	   metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.CONNECTION_ID, connectionEndpoint.getConnectionID(), PayloadKey.AS_IS);	   metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.SESSION_ID, sessionID, PayloadKey.AS_IS);	   metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.BROWSER_ID, browserID, PayloadKey.AS_IS);	   	   h.getMetaData().mergeIn(metadata);		   	   ClassLoader loader = getClass().getClassLoader();	   Class[] interfaces = new Class[] { BrowserDelegate.class };	   bd = (BrowserDelegate)Proxy.newProxyInstance(loader, interfaces, h);		   // create the corresponding "server-side" BrowserDelegate and register it with this	   // BrowserDelegate instance	   ServerBrowserDelegate sbd =	         new ServerBrowserDelegate(this, browserID, (Channel)destination, messageSelector);	   putBrowserDelegate(browserID, sbd);		   return bd;	}