public Queue getQueue ( String contextUrl , String queueName ) throws ServiceLocatorException { try { String jndiName = null ; if ( contextUrl == null ) { jndiName = namingProvider . qualifyJmsQueueName ( queueName ) ; } else { jndiName = queueName ; // don't qualify remote queue names } return ( Queue ) namingProvider . lookup ( contextUrl , jndiName , Queue . class ) ; } catch ( Exception ex ) { throw new ServiceLocatorException ( - 1 , ex . getMessage ( ) , ex ) ; } }
Looks up and returns a JMS queue .