About listener

tutorial

Step 3: Add a Context Listener Class

Explains how to add a servlet context listener (to manage an application scope EntityManagerFactory) in an Eclipse Web Application.... a ServletContextListener : Open the [New Listener] dialog box by right clicking the guest package node (in the [Package ... window), selecting New > Other... > Web > Listener and clicking Next . The Java package name should be guest. ...

 
manual

JPA Lifecycle Events

Explains how to use JPA lifecycle events (client side triggers) with callback methods and listener classes.... methods are defined outside entity classes in a special listener class: public class MyListener { ... } External callback methods (in a listener class) should always return void and take one argument that ... Object can be replaced by a more specific type). The listener class should be stateless and should have a public no-arg constructor ...

 
tutorial

Step 3: Add a Context Listener Class

Explains how to add a servlet context listener (to manage an application scope EntityManagerFactory) in a NetBeans Web Application.... New > Other... Select Web > Web Application Listener and click Next . Enter GuestListener as the class ... be guest. Click Finish to create the new listener class. Now replace the content of the new source file ...

 
manual

Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events. This section discusses advanced JPA topics: Detached Entity Objects Locking in JPA JPA Lifecycle Events Shared (L2) Entity Cache JPA Metamodel API ...

 
api-jdo

JDO External Listeners

The following types can be used to implement external listener classes for JDO lifecycle events: javax.jdo.listener.AttachLifecycleListener javax.jdo.listener.ClearLifecycleListener ...

 
forum_thread

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

I am using JPA programaticaly..ie without xml file, and i would like to define Default Entity Listeners. How to do ? Here my init code: ... in chapter 3 of the manual. You may also register listener using the JDO API, which is not documented but supported by ObjectDB. ...

 
forum_thread

listening on a particular IP aside localhost

I have being searching all around for how to do this but still no luck. I want objectdb to be able to listen in server mode to other connections from another machine where client is installed. I will like to have objectdb on machine A, while B,C, D can access the database in a using code like this emf = Persistence.createEntityManagerFactory("objectdb://192.168.50.56:8888/myapp6136.odb"); emf.createEntityManager(); #1 2015-10-17 15:58 I have being searching all around for how to do this but still no luck. I want objectdb to be able to lis ...

 
forum_thread

Entity listener - event instead of object

Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated entity. There is a problem however with accessing "old" version of object stored in database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains ... Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated ... Do you need to obtain an EntityManager from a listener class? You may use the JDO getPersistenceManager ... subscribed. The main problem for me was to get EM inside listener class. Hibernate uses Session instead of Object as method parameter ...

 
forum_thread

Safe to monitor listening port by connect/disconnect?

I wish to monitor our instances of ObjectDB using an automated tool that simply connects and then disconnects from the ObjectDB listening port once per second (frequency is configurable).  Will this cause any issue with the normal operation of ObjectDB? #1 2016-11-14 11:48 I wish to monitor our instances of ObjectDB using an automated tool that simply connects and then disconnects fro ...

 
api-jpa

javax.persistence.EntityListeners

Specifies the callback listener classes to be used for an entity or mapped superclass.(Annotation of JPA)