ObjectDB ObjectDB

Internal Website Search

1-10 of 142 resultsRefresh
66

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
43

Step 3: Add a Context Listener Class

closing the 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
42

Step 3: Add a Context Listener Class

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

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.
8

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
6

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 ... classes and interfaces will be sent to the listener. The listener will be called for each event
6

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
6

addInstanceLifecycleListener(listener, classes)

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

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
6

Constants.PROPERTY_PREFIX_INSTANCE_LIFECYCLE_LISTENER

Static Field javax.jdo.Constants String PROPERTY_PREFIX_INSTANCE_LIFECYCLE_LISTENER Prefix used to configure javax.jdo.listener.InstanceLifecycleListener instances externally. To configure ... and append the fully qualified listener class name, then set its value to the comma- or whitespace-delimited

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support