subscriber.notifyEvent(eventId, eventInfo);
break;
// Notify to subscriber just before the current transaction completes succesfully.
case Subscriber.TXCONTEXT_BEFORE_COMMIT:
new HibernateTxFragment(false, true) {
protected void beforeCommit() throws Exception {
subscriber.notifyEvent(eventId, eventInfo);
}}.execute();
break;
// Notify to subscriber after the current transaction completes succesfully.
case Subscriber.TXCONTEXT_AFTER_COMMIT:
new HibernateTxFragment(false, true) {
protected void afterCommit() throws Exception {
subscriber.notifyEvent(eventId, eventInfo);
}}.execute();
break;
// Notify to subscriber within a new transaction launched in a separated thread.
case Subscriber.TXCONTEXT_NEW_THREAD:
new HibernateTxFragment(false, true) {
protected void afterCommit() throws Exception {
new Thread(new Runnable() {
public void run() {
subscriber.notifyEvent(eventId, eventInfo);
}}).start();