}
final ObjectMessage objectMessage = (ObjectMessage) message;
final String indexName;
final List<LuceneWork> queue;
final IndexManager indexManager;
SearchFactoryImplementor factory = getSearchFactory().unwrap( SearchFactoryImplementor.class );
try {
indexName = objectMessage.getStringProperty( Environment.INDEX_NAME_JMS_PROPERTY );
indexManager = factory.getIndexManagerHolder().getIndexManager( indexName );
if ( indexManager == null ) {
log.messageReceivedForUndefinedIndex( indexName );
return;
}
queue = indexManager.getSerializer().toLuceneWorks( (byte[]) objectMessage.getObject() );