Class AbstractJMSHibernateSearchController
java.lang.Object
org.hibernate.search.backend.impl.jms.AbstractJMSHibernateSearchController
Implement the Hibernate Search controller responsible for processing the
work send through JMS by the slave nodes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidEnsure to clean the resources after use.protected abstract org.hibernate.SessionReturn the current or give a new session This session is not used per se, but is the link to access the Search configuration.voidvoidonMessage(Message message) Process the Hibernate Search work queues receivedvoidshutdown()
-
Constructor Details
-
AbstractJMSHibernateSearchController
public AbstractJMSHibernateSearchController()
-
-
Method Details
-
getSession
Return the current or give a new session This session is not used per se, but is the link to access the Search configuration.A typical EJB 3.0 usecase would be to get the session from the container (injected) eg in JBoss EJB 3.0
@PersistenceContext private Session session;
protected Session getSession() {
return session
}
eg in any container
@PersistenceContext private EntityManager entityManager;
protected Session getSession() {
return (Session) entityManager.getdelegate();
}
-
cleanSessionIfNeeded
Ensure to clean the resources after use. If the session has been directly or indirectly injected, this method is empty -
onMessage
public void onMessage(Message message) Process the Hibernate Search work queues received -
initialize
-
shutdown
-