|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.search.backend.impl.jms.AbstractJMSHibernateSearchController
public abstract class AbstractJMSHibernateSearchController
Implement the Hibernate Search controller responsible for processing the work send through JMS by the slave nodes.
Constructor Summary | |
---|---|
AbstractJMSHibernateSearchController()
|
Method Summary | |
---|---|
protected abstract void |
cleanSessionIfNeeded(Session session)
Ensure to clean the resources after use. |
protected abstract Session |
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. |
void |
onMessage(Message message)
Process the Hibernate Search work queues received |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractJMSHibernateSearchController()
Method Detail |
---|
protected abstract Session getSession()
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();
}
protected abstract void cleanSessionIfNeeded(Session session)
public void onMessage(Message message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |