Home » Search

About context listener

1-10 of 200Refresh
Tutorial
373

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
370

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 ... context - when the web application starts (contextInitialized). Retrieves the EntityManagerFactory
JDO Doc
66

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.
JDO Doc
41

javax.jdo.listener.LoadCallback

javax.jdo.listener Interface LoadCallback Subinterfaces: InstanceCallbacks This interface is used to notify instances of load events. Since: JDO 2.0 void jdoPostLoad() Called after the values ... in this method. The context in which this call is made does not allow access to other persistent JDO instances. Since: JDO 2.0
JDO Doc
41

javax.jdo.listener.StoreCallback

javax.jdo.listener Interface StoreCallback Subinterfaces: InstanceCallbacks This interface is used to notify instances of store events. Since: JDO 2.0 void jdoPreStore() Called before the values ... to persistent fields will be reflected in the data store. The context in which this call is made allows
Manual
39

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
Manual
31

Working with JPA Entity Objects

. The Persistence Context The persistence context is the collection of all the managed objects of an EntityManager. If an entity object that has to be retrieved already exists in the persistence context ... context is to make sure that a database entity object is represented by no more than one in-memory entity
JDO Doc
28

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
28

getPersistenceManagerFactory(jndiLocation, context)

 jndiLocation,   Context context ) Returns a PersistenceManagerFactory at the JNDI location specified by jndiLocation in the context context. If context is null, new InitialContext() will be used. This method is equivalent to invoking getPersistenceManagerFactory(String,Context,ClassLoader
JDO Doc
27

getPersistenceManagerFactory(jndiLocation, context, loader)

 jndiLocation,   Context context,   ClassLoader loader ) Returns a PersistenceManagerFactory at the JNDI location specified by jndiLocation in the context context. If context is null, new ... the PersistenceManagerFactory context - the context in which to find the named PersistenceManagerFactory