code: public final void checkTemporaryDestinationScope( Destination destination ) throws JMSException
      {
      	if (destination instanceof LocalQueue)
      	{
      		LocalQueue localQueue = (LocalQueue)destination; 
  	        if (localQueue.isTemporary() && !connection.isRegisteredTemporaryQueue(localQueue.getQueueName()))
  	       		throw new IllegalStateException("Temporary queue does not belong to session's connection.");
      	}
      	else
      	if (destination instanceof LocalTopic)
      	{	
      		LocalTopic localTopic = (LocalTopic)destination; 
  	        if (localTopic.isTemporary() && !connection.isRegisteredTemporaryTopic(localTopic.getTopicName()))
  	       		throw new IllegalStateException("Temporary topic does not belong to session's connection.");
      	}
      	else
      		throw new FFMQException("Unexpected destination type : "+destination,"INTERNAL_ERROR");
      }
docs: Check temporary destinations scope (JMS Spec 4.4.3 p2)
  @param destination destination to check