Home » JDO » Miscellaneous » Constants » Constants.PROPERTY_PREFIX_INSTANCE_LIFECYCLE_LISTENER - JDO static field

Constants.PROPERTY_PREFIX_INSTANCE_LIFECYCLE_LISTENER - JDO static field

Static Field
javax.jdo.Constants
String PROPERTY_PREFIX_INSTANCE_LIFECYCLE_LISTENER

Prefix used to configure javax.jdo.listener.InstanceLifecycleListener instances externally. To configure an InstanceLifecycleListener via properties, create a property name with the prefix of this constant and append the fully qualified listener class name, then set its value to the comma- or whitespace-delimited list of persistence-capable classes whose instances are to be observed. Use no value to indicate that instances of all persistence-capable classes are to be observed.
For example,
javax.jdo.option.InstanceLifecycleListener.com.example.MyListener=com.example.Foo,com.example.Bar
is equivalent to calling
pmf.addInstanceLifecycleListener(new com.example.MyListener(), new Class[] {com.example.Foo.class, com.example.Bar.class});
where pmf is an instance of type PersistenceManagerFactory.
Since:
JDO 2.1
See Also:
javax.jdo.PersistenceManagerFactory.addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener,Class[])

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.