Home » Search

About listener

1-10 of 134Refresh
Tutorial
251

Step 3: Add a Context Listener Class

closing that EntityManagerFactory. To register a ServletContextListener: Open the [New Listener] dialog ... > Other... > Web > Listener and clicking Next. The Java package name should be guest. Enter GuestListener ... All to enable the Finish button. Click Finish to create the new listener class. Now replace the content
Tutorial
246

Step 3: Add a Context Listener Class

> Other... Select Web > Web Application Listener and click Next. Enter GuestListener as the class name - use exactly ... the new listener class. Now replace the content of the new source file with the following code: package
JDO Doc
198

JDO External Listeners

The following types can be used to implement external listener classes for JDO lifecycle events: Listener objects can be bound to one or more persistence capable classes by invoking the addInstanceLifecycleListner method either at the PersistenceManagerFactory level or the PersistenceManager level.
Manual
120

JPA Lifecycle Events

and no more callback methods are invoked for that operation. Listeners and External Callback Methods External callback methods are defined outside entity classes in a special listener class: public class ... ) {} @PostRemove void onPostRemove(Object o) {} } External callback methods (in a listener class
JDO Doc
84

Constants.INSTANCE_LIFECYCLE_LISTENER_ATTRIBUTE_LISTENER

Static Field javax.jdo.Constants String INSTANCE_LIFECYCLE_LISTENER_ATTRIBUTE_LISTENER The name of the instance lifecycle listener element's "listener" attribute. Since: JDO 2.1
JDO Doc
66

addInstanceLifecycleListener(listener, classes)

(   InstanceLifecycleListener listener,   Class[] classes ) Add the parameter listener to the list of instance lifecycle event listeners set as the initial listeners for each PersistenceManager created by ... for all persistent classes and interfaces will be sent to the listener. The listener will be called for each event
JDO Doc
64

addInstanceLifecycleListener(listener, classes)

Method javax.jdo.PersistenceManager void addInstanceLifecycleListener(   InstanceLifecycleListener listener,   Class... classes ) Adds the listener instance to the list of lifecycle event listeners ... listenerInstance interface. Parameters: listener - the lifecycle listener classes - the classes of interest to the listener Since: JDO 2.0
JDO Doc
64

removeInstanceLifecycleListener(listener)

(   InstanceLifecycleListener listener ) Remove the parameter listener instance from the list of instance lifecycle event listeners set as the initial listeners for each PersistenceManager created by ... is configurable (before the first time getPersistenceManager is called). Parameters: listener - the listener instance to be removed Since: JDO 2.0
JDO Doc
63

removeInstanceLifecycleListener(listener)

Method javax.jdo.PersistenceManager void removeInstanceLifecycleListener(   InstanceLifecycleListener listener ) Removes the listener instance from the list of lifecycle event listeners. Parameters: listener - the listener instance to be removed Since: JDO 2.0
JDO Doc
62

Constants.PROPERTY_INSTANCE_LIFECYCLE_LISTENER

Static Field javax.jdo.Constants String PROPERTY_INSTANCE_LIFECYCLE_LISTENER "javax.jdo.listener.InstanceLifecycleListener" Since: JDO 2.1 See Also: PersistenceManagerFactory.addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener,Class[]) PersistenceManagerFactory.removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener)