public void prepareJMSTools() {
if ( jmsQueue != null && factory != null ) return;
try {
InitialContext initialContext = getInitialContext( properties );
factory = (QueueConnectionFactory) initialContext.lookup( jmsConnectionFactoryName );
jmsQueue = (Queue) initialContext.lookup( jmsQueueName );
}
catch (NamingException e) {
throw new SearchException( "Unable to lookup Search queue ("
+ ( jmsQueueName != null ?
jmsQueueName :
"null" ) + ") and connection factory ("
+ ( jmsConnectionFactoryName != null ?
jmsConnectionFactoryName :
"null" ) + ")",
e
);
}
}
|