1. order of onPostLoad event firing forum.hibernate.orgWe use Hibernate 3.x in a Spring application. I have a problem with the order in which the onPostLoad events are being fired. I have an entity called Customer, that contains two other entities Address and Contract Both are a OneToOne relation using the @OneToOne annotation. The Contract entity contains one entity called BankAccount, also as a OneToOne relation. When I ... |
2. Merge and listeners/events forum.hibernate.orgHello, I have a problem concerning merging. What I need to do, is do a copy-on-save functionality at every modification. I do this by loading the latest object graph and comparing it with the modified version, marking dirty (nulling the ID) all modified objects in the persistent version. Then doing a saveOrUpdate for the persistent version, which saves the modified objects ... |
3. hibernate Events handling, PreUpdateEventListener forum.hibernate.orgI have implemented interface PreUpdateEventListener and override following: public boolean onPreUpdate(PreUpdateEvent preupdateevent) { // TODO Auto-generated method stub log.debug("Entering method 'onPreUpdate'"); if (preupdateevent.getEntity() instanceof PlantGroup) { log.debug("handle 'PlantGroup' update"); } return false; } Everything is working after registering event listener with spring. Question: How do i modify object properties before performing update? How do i get old object properties? Any help ... |
4. Event listeners on collection updates forum.hibernate.orgHi, I'm trying to make a bean level validation mechanism and I encountered a case in which I wanted to validate a property of a bean which is in fact a collection. The problem is that if only the collection is modified, Hibernate won't generate a pre-update event on the entity since the collection is not actually regarded as part of ... |
5. Detecting added rows (Event, Polling, ...) forum.hibernate.orgHi! I'm working with the newest hibernate release and oracle 10g... ... and I'm having the following problem: My application will get an interface to a legacy system through a database-table. If the legacy system writes a record into the table then my application has to do something (transform it and write it into one of my own tables for instance). ... |
6. Save Or Update Event Listener help forum.hibernate.orgI am trying to implement (can you guess?) an auditing function. When I save or update any object I would like to set the userId of the person who made the change and the date. All tables will have these fields. So far I have this in my Spring applicationContext-dao.xml: Code: |
7. StackOverflowException when using onDelete event forum.hibernate.orgNewbie Joined: Fri Sep 15, 2006 2:09 am Posts: 9 Hi. I've got a problem with the hibernate Event system. The following constellation mapping: A->B->C All mappings are implemented as sets with all-delete-orphan cascades. Deleting A deletes all objects related to A (B+C). Now I have an additional mapping D this references the object C with a many-to-one mapping no cascades. ... |
8. EntityUpdateAction and state changing event listeners forum.hibernate.org |
9. Return value of PreInsert event forum.hibernate.org |
10. ehcache event listener with hibernate forum.hibernate.org |
11. problem with event listener on sessionfactory forum.hibernate.orgNewbie Joined: Tue Nov 20, 2007 10:37 am Posts: 4 Hi, I'm new in hibernate... I have a problem... I'm interesting to use the event listener for notify to my class EventManager the create/update/delete on all object of my domain model. We use hibernate 3.2.5ga with spring and postgres. I have my ApplicationService under hibernateTransactionManager with AOP...and the ApplicationService send the ... |
12. Problem with event layer and cascade="save-update" forum.hibernate.org |
13. Problem with event layer and cascade="save-update" forum.hibernate.org |
14. Event triggered even no SQL neccesary (no change at DB) forum.hibernate.orgI connect listeners to events in order to make some table auditing. My problem is that after the merge() (or whatever operation I use) session is flushed and it triggers events for several objects. For example, if my session has 5 objects (connected with some cascades) I get several events triggered, even when only one of them is actually modified. Hibernate ... |
15. Seeking a way to fire an event on a query akin to LoadEvent forum.hibernate.orgIs there a way to use the Hibernate event architecture to fire an event when an object is fetched using a query, the same way a LoadEvent is fired when an object is loaded? I am using hibernate 3.2.5.ga and hibernate-annotations 3.3.0.ga with Spring 2.0.2. I have this in my sessionFactory definition: Code: |
16. Can i use Event Listener with Stateless Session for Audit forum.hibernate.org |
17. Delete event with null entity forum.hibernate.org |
18. Access HTTP session object from an event forum.hibernate.orgHi, I'm need to access the HTTP session object from my implementation of the onDelete() method of a subclass of DefaultDeleteEventListener. More specifically, I need to access an object in the session. I need to do this because the session contains the details of the user who is performing the record deletion. Does anyone know if this is possible? If not, ... |
19. Preload Pattern implementation using an event listener forum.hibernate.orgFor our projects I developed a so called preload pattern. In short, with the preload pattern the client tells the backend which entities to preload via an additional parameter. At this point I don't want to discuss the pros and cons of the preload pattern. For us the pattern works perfectly well for all kind of GUIs. Below is the most ... |
20. Appropriate event listener to capture *all* merge/persists forum.hibernate.orgHibernate 3.3.0 Snapshot I have a fairly involved association graph for my entities and I need to hook in to the appropriate event handler to post-process all entities as they are saved. All my relationships are bi-directional, with the "one" side owning the relationship For example: Document has many LineItems has many SupplierProducts has Supplier has Manufacturer has many Shipments has ... |
21. How to Monitor Events ? forum.hibernate.org |
22. Documentation for hibernate events? forum.hibernate.orgdoes anybody know where to find complete hibernate event documentation? the javadocs for all the event interfaces (e.g. PreInsertEventListener) are missing all function documentation, and the reference manual seems to leave all that out as well (and doesn't include an explanation of the event types either, e.g delete, pre-delete, post-delete). thanks, jason |
23. Events and queries question forum.hibernate.org |
24. Hibernate search: update-insert-delete events not firing forum.hibernate.orgSenior Joined: Wed Nov 05, 2003 7:22 pm Posts: 124 Hi, I'm using Hibernate/Spring through Appfuse and since Appfuse "hides" the sessionFactory, I have to use some tricks to register the search event handlers. However, it seems that this works. Debugging it, I can see that they are registered but they are not firing. I think this is because Appfuse uses ... |
25. Duplicate cache events forum.hibernate.orgvyre.core.cache.oscache.CacheBroadcaster.sendNotification(CacheBroadcaster.java:32) at com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener.cacheEntryFlushed(AbstractBroadcastingListener.java:49) at com.opensymphony.oscache.base.Cache.dispatchCacheEntryEvent(Cache.java:856) at com.opensymphony.oscache.base.Cache.flushEntry(Cache.java:982) at com.opensymphony.oscache.base.Cache.flushEntry(Cache.java:491) at com.opensymphony.oscache.base.Cache.flushEntry(Cache.java:478) at com.opensymphony.oscache.general.GeneralCacheAdministrator.flushEntry(GeneralCacheAdministrator.java:216) at vyre.core.cache.oscache.OSCache.remove(OSCache.java:91) at org.hibernate.cache.NonstrictReadWriteCache.evict(NonstrictReadWriteCache.java:119) at org.hibernate.cache.NonstrictReadWriteCache.update(NonstrictReadWriteCache.java:133) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:154) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1,000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy50.create(Unknown Source:-1) |
26. Hibernate Search Event listeners not configured forum.hibernate.org |
27. Event listeners forum.hibernate.org |
28. duplicate class: org.hibernate.tutorial.domain.Event forum.hibernate.orgHello, I have problems when trying to learn Hibernate and I am a newbie to this and not senior of Java either. Hope anyone can help out. Thanks in advance! The short version of the problem is "duplicate class: org.hibernate.tutorial.domain.Event" when I am trying to build the tutorial ( http://www.hibernate.org/hib_docs/v3/re ... stapp.html ) with Ant. It gets stuck on the "Compile" ... |
29. Event listeners not fired after configured programmatically forum.hibernate.orgAuthor Message yeow Post subject: Event listeners not fired after configured programmatically Posted: Fri Jun 26, 2009 3:06 am Newbie Joined: Fri Jun 26, 2009 2:39 am Posts: 1 Hi, I am here looking for help on the event listeners. The version i am using is hibernate 3.0. Below are the configurations of my codes. I initialized the objects ... |
30. SessionFactory closed and events for Seam app forum.hibernate.orgBeginner Joined: Thu Apr 03, 2008 2:34 pm Posts: 31 How can my Seam app know when the Hibernate SessionFactory is closed in the org.hibernate.impl.SessionFactoryImpl class? I am using JPA 1.0 (EntityManager interface) with Hibernate as my persistence provider in a Seam 2.0.2 app. I want to perform an operation when the SessionFactory/EntityManagerFactory is closed. How can I implement this? In ... |
31. just one Listener instance for different event types forum.hibernate.orgHi, I have an application running with some properties in my persistence.xml similar to: |
32. Audit: define classes and events to be audited forum.hibernate.orgHi friends. I need to Audit several classes and to say to hibernate that the class TEST1 need to audit when its INSERT, but the TEST2 need to audit when INSERT AND UPDATE. When in the HIBERNATE file I set the following source all is ok and the hibernate to audit all (insert, update, delete) of Test1 and Test2: |