About listener

61-70 of 139Refresh
Forum
4

Database is erased after deploying a new web application version

automatically when stopping the web-app from Tomcat's manager? Should I set some kind of listener? You can set a listener for creating and destroying the EntityManagerFactory: http://www.objectdb.com/tutorial/jpa/eclipse/web/listener When the application is stopped by the Tomcat manager
JPA Doc
3

EntityListeners.value

Annotation Element javax.persistence.EntityListeners Class[] value The callback listener classes Since: JPA 1.0
JDO Doc
3

getDetachedInstance()

Method javax.jdo.listener.InstanceLifecycleEvent Object getDetachedInstance() Returns the detached instance involved in the event. Returns: The detached instance involved in the event, or null if there was none. Since: JDO 2.0 See Also: "Section 12.15, Java Data Objects 2.0 Specification"
JDO Doc
3

getEventType()

Method javax.jdo.listener.InstanceLifecycleEvent int getEventType() Returns the event type that triggered this event. Returns: the event type Since: JDO 2.0
JDO Doc
3

getPersistentInstance()

Method javax.jdo.listener.InstanceLifecycleEvent Object getPersistentInstance() Returns the persistent instance involved in the event. Returns: The persistent instance involved in the event, or null if there was none. Since: JDO 2.0 See Also: "Section 12.15, Java Data Objects 2.0 Specification"
JDO Doc
3

getSource()

Method javax.jdo.listener.InstanceLifecycleEvent Object getSource() The source object of the Event. Although not deprecated, it is recommended that the the methods getPersistentInstance() and getDetachedInstance() be used instead. Returns: The persistent instance on any pre- callback
JDO Doc
3

getTarget()

Method javax.jdo.listener.InstanceLifecycleEvent Object getTarget() The target object of the Event. Although not deprecated, it is recommended that the the methods getPersistentInstance() and getDetachedInstance() be used instead. Returns: The detached instance for preDetach and postAttach
JDO Doc
3

InstanceLifecycleEvent(source, type)

Constructor javax.jdo.listener.InstanceLifecycleEvent InstanceLifecycleEvent(   Object source,   int type ) Creates a new event object with the specified source and type. Parameters: source - the instance that triggered the event type - the event type Since: JDO 2.0
JDO Doc
3

InstanceLifecycleEvent(source, type, target)

Constructor javax.jdo.listener.InstanceLifecycleEvent InstanceLifecycleEvent(   Object source,   int type,   Object target ) Creates a new event object with the specified source, type, and target. Parameters: source - the instance that triggered the event type - the event type target - the "other" instance Since: JDO 2.0
JDO Doc
3

InstanceLifecycleEvent.ATTACH

Static Field javax.jdo.listener.InstanceLifecycleEvent int ATTACH Since: JDO 2.0