private Ejb3Configuration configuration;
private boolean isSecurity;
public EventListenerConfigurator(Ejb3Configuration configuration) {
this.configuration = configuration;
EventListeners listenerConfig = configuration.getEventListeners();
//Action event
//EJB3-specific ops listeners
listenerConfig.setFlushEventListeners( new FlushEventListener[]{EJB3FlushEventListener.INSTANCE} );
//EJB3-specific ops listeners
listenerConfig.setAutoFlushEventListeners( new AutoFlushEventListener[]{EJB3AutoFlushEventListener.INSTANCE} );
listenerConfig.setDeleteEventListeners( new DeleteEventListener[]{new EJB3DeleteEventListener()} );
listenerConfig.setFlushEntityEventListeners(
new FlushEntityEventListener[]{new EJB3FlushEntityEventListener()}
);
listenerConfig.setMergeEventListeners( new MergeEventListener[]{new EJB3MergeEventListener()} );
listenerConfig.setPersistEventListeners( new PersistEventListener[]{new EJB3PersistEventListener()} );
listenerConfig.setPersistOnFlushEventListeners(
new PersistEventListener[]{new EJB3PersistOnFlushEventListener()}
);
listenerConfig.setSaveEventListeners( new SaveOrUpdateEventListener[]{new EJB3SaveEventListener()} );
listenerConfig.setSaveOrUpdateEventListeners(
new SaveOrUpdateEventListener[]{new EJB3SaveOrUpdateEventListener()}
);
//Pre events
listenerConfig.setPreInsertEventListeners(
new PreInsertEventListener[]{
new JACCPreInsertEventListener(),
}
);
listenerConfig.setPreUpdateEventListeners(
new PreUpdateEventListener[]{
new JACCPreUpdateEventListener(),
}
);
listenerConfig.setPreDeleteEventListeners(
new PreDeleteEventListener[]{
new JACCPreDeleteEventListener()
}
);
listenerConfig.setPreLoadEventListeners(
new PreLoadEventListener[]{
new JACCPreLoadEventListener()
}
);
//post events
listenerConfig.setPostDeleteEventListeners(
new PostDeleteEventListener[]{new EJB3PostDeleteEventListener()}
);
listenerConfig.setPostInsertEventListeners(
new PostInsertEventListener[]{new EJB3PostInsertEventListener()}
);
listenerConfig.setPostLoadEventListeners(
new PostLoadEventListener[]{new EJB3PostLoadEventListener()}
);
listenerConfig.setPostUpdateEventListeners(
new PostUpdateEventListener[]{new EJB3PostUpdateEventListener()}
);
}