Internal Website Search

1-50 of 59 results

JPA Annotations for Callback Methods

The following annotations can mark methods as JPA callback methods: The Lifecycle Events section of the ObjectDB Manual explains how to use all these annotations on callback methods and with listener classes.

JPA Lifecycle Events

Callback methods are user defined methods that are attached to entity lifecycle events and are invoked automatically by JPA when these events occur. Internal Callback Methods Internal callback ... defines all the supported callback methods with empty implementations: @Entity public static class

javax.persistence.ValidationMode.CALLBACK

JPA Enum Constant in javax.persistence.ValidationMode CALLBACK The persistence provider must perform the lifecycle event validation. It is an error if there is no Bean Validation provider present in the environment. Since: JPA 2.0

JDO Internal Callbacks

All about JDO Internal Callbacks in Java/JPA database - explanations, examples, references, links and related information.

ObjectDB Object Database Features

callback methods and listener classes . JDO callback methods and listener classes. Primary Keys

JPA Annotations

JPA defines dozens of annotations that can be divided into the following groups: Annotations for JPA aware classes: Annotations for fields in JPA persistable classes: Annotations for additional JPA configuration: Annotations for JPA lifecycle event callbacks : Java EE container annotations: Many

openejb jpa jaas module

.security.auth. callback .*; import javax.security.auth.login.LoginException; import javax.security.auth.spi ... authentication information from the user"); final Callback [] callbacks = new Callback [2]; callbacks [0] = new NameCallback(null); callbacks [1] = new PasswordCallback(null, false); try { callbackHandler

Best practice: Database update/migration of embedded databases in products

a JPA event callback to make the conversion. In V1.1 your class will include the following fields ... a PostLoad callback (if not null ) to name . Only name will be used by the application (except in the conversion callback method). Similarly, in v2.0, your class will include the following fields

Working with a cleared cache

well. carr.onstott Carr Onstott It is unclear from the stack trace which callback is invoked ... event callbacks . ObjectDB should produce better error messages, but if the same code works outside the callback method - the solution should be based on using it not in a callback method. support Support

turn off auto-serialization

; moreover that exception is raised before any preStore callback or listener so I could not check field structure and I'm unable to change for example instance of Class into their names in jdoPreStore() callback Tomasz ... ;  Yes, you are right, wrong config file and I waited for callback i embeded entity, my fault.   Tomasz Tomasz Wozniak

javax.persistence.PostLoad

JPA Annotation PostLoad Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.EntityListeners

JPA Annotation EntityListeners Target: TYPE Implemented Interfaces: Annotation Specifies the callback listener classes to be used for an entity or mapped superclass. This annotation may be applied ... how to use EntityListeners . Public Annotation Attributes Class[] value default null The callback listener classes Since: JPA 1.0

javax.persistence.PrePersist

JPA Annotation PrePersist Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.PostUpdate

JPA Annotation PostUpdate Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.PostRemove

JPA Annotation PostRemove Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.PostPersist

JPA Annotation PostPersist Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.PreUpdate

JPA Annotation PreUpdate Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

javax.persistence.PreRemove

JPA Annotation PreRemove Target: METHOD Implemented Interfaces: Annotation Specifies a callback method for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 The JPA Lifecycle Events

@Column length is not working.

a lifecycle event callback . support Support i think implementation of lifecycle event callback is expensive

auto generate timestamp

the timestamp in an ordinary Date / Timestamp field and update it in an event callback method ... future versions. You can, however, use the server time in the event callback by running a query (not very efficient but should work). support Support

javax.persistence.EntityListeners.value

JPA Annotation Attribute in javax.persistence.EntityListeners Class[] value default null The callback listener classes Since: JPA 1.0

javax.persistence.ValidationMode

.0 CALLBACK The persistence provider must perform the lifecycle event validation. It is an error

LifeCycle Event with Embeddable classes

callback for the containing entity and use it to handle embedded objects in the entity object. support Support

Does ObjectDB create one instance of each entity class on (web app) load ?

. (I've also checked am not loading any entities using JPA callbacks .) If I take a heap dump

Soft Reference Object Cache Recommendation

; Perhaps setting ObjectDB to use weak references but then using persistent object callback /listeners to track

newbie - lots of exeptions

exception in afterCompletion() callback : [ObjectDB 2.4.4_06] javax.persistence.PersistenceException Failed

How to package orm.xml when using EJB in WAR?

: Caught exception in beforeCompletion() callback : [ObjectDB 2.2.9_08] javax.persistence

How to define Default Entity Listeners without persistence.xml and orm.xml

. mgangat Mahmoud If you use JPA you will need either listeners or callback methods as explained in

Auto Date for Creation and Update

@PostPersist and other callbacks as well.  it would be MUCH more simple

Automatic schema evolution causes ArrayOutOfBoundsException

, and write code to convert from List to List , possibly in a PostLoad callback method . The second

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

: Caught exception in beforeCompletion() callback : [ObjectDB 2.6.9_06] javax.persistence ... .run(Thread.java:745) Warning: DTX5015: Caught exception in afterCompletion() callback : [ObjectDB 2.6 ... afterCompletion() callback : [ObjectDB 2.6.9_06] javax.persistence.TransactionRequiredException

javax.jdo.InstanceCallbacks

, StoreCallback A PersistenceCapable class that provides callback methods for life cycle events ... over callbacks , for example to allow a class to implement the load callback without implementing any of the other callbacks . For backward compatibility with JDO 1.0, the InstanceCallbacks interface is preserved

com.objectdb.o.InternalException: null

the database should not be corrupted because of an exception in a callback method. An exception in

Blocked by find

callback event rbccm.felix.framework.ApplicationException: Error flushing data container at rbccm

javax.jdo.spi.PersistenceCapable

- the field whose value is to be provided by a callback to the StateManager's providedXXXField method ... . Parameters: fieldNumbers - the fields whose values are to be provided by multiple callbacks ... identified by number. Parameters: fieldNumber - the field whose value is to be replaced by a callback

javax.jdo.PersistenceManager

, the application should use the jdoPostAttach callback or the postAttach lifecycle event listener ... . During attachment of detached instances, the attach callbacks and attach life cycle listeners ... the fetch plan is done after calling the user's beforeCompletion callback . During afterCompletion

PersistenceManager.setDetachAllOnCommit(flag) - JDO Method

is done after calling the user's beforeCompletion callback . During afterCompletion , before calling the user's afterCompletion callback , all detachable persistent instances in the cache transition

Query.deletePersistentAll() - JDO Method

implements the delete callback interface, the corresponding callback methods are called on the deleted

javax.jdo.Query

the delete callback interface, the corresponding callback methods are called on the deleted instances

javax.jdo.listener.InstanceLifecycleListener

JDO Interface InstanceLifecycleListener All lifecycle listeners extend from this base interface. In order to minimize the impact on domain classes, instance callbacks can be defined to use a life-cycle listener pattern instead of having the domain class implement the callback interface(s). Since: JDO 2.0

InstanceLifecycleEvent.getSource() - JDO Method

() and getDetachedInstance() be used instead. Return: The persistent instance on any pre- callback except preAttach, or the detached instance for a postDetach or preAttach callback

PersistenceManager.makePersistent(pc) - JDO Method

should use the jdoPostAttach callback or the postAttach lifecycle event listener. Any references ... instances, the attach callbacks and attach life cycle listeners are called. During application

javax.jdo.listener.InstanceLifecycleEvent

- callback except preAttach, or the detached instance for a postDetach or preAttach callback

javax.jdo.JDOUserCallbackException

This class represents exceptions caused by exceptions thrown during execution of callbacks or listeners

DeleteLifecycleListener.preDelete(event) - JDO Method

. This method is called before the instance callback DeleteCallback.jdoPreDelete . Parameters: event - the delete event. Since: JDO 2.0

javax.jdo.listener.DeleteLifecycleListener

callback DeleteCallback.jdoPreDelete . Parameters: event - the delete event. Since: JDO 2.0

PersistenceCapable.jdoReplaceFields(fieldNumbers) - JDO Method

are to be replaced by multiple callbacks to the StateManager's replacingXXXField method Since: JDO 1.0

PersistenceCapable.jdoReplaceField(fieldNumber) - JDO Method

a callback to the StateManager's replacingXXXField method Since: JDO 1.0

PersistenceCapable.jdoProvideFields(fieldNumbers) - JDO Method

are to be provided by multiple callbacks to the StateManager's providedXXXField method Since: JDO 1.0

PersistenceCapable.jdoProvideField(fieldNumber) - JDO Method

is to be provided by a callback to the StateManager's providedXXXField method Since: JDO 1.0