[TENEO][EMF] EMFInterceptor + Session in callbacks [message #620873] |
Mon, 27 April 2009 13:47 |
Liviu-Marian Negrila Messages: 53 Registered: July 2009 |
Member |
|
|
Hello,
I need to be able to do some database related stuff in any of the
following callbacks described by the Interceptor interface:
- onLoad
- onFlushDirty
- onSave
- onDelete
- beforeTransactionCompletion
- afterTransactionCompletion
- onPrepareStatement
In the Interceptor javadoc it says: "The Session may not be invoked from
a callback (nor may a callback cause a collection or proxy to be lazily
initialized)"
I think this is exactly what I'd like to do; for instance, say a user
saves some modifications to the database then I whant to create a ligne
in another table (create en EObject of some other type than that
currently being modified by the user for that matter) and persist that
within the same session and make sure that should anything "roll back"
than everything is rolled back.
Ideas?
Note: I've read Martin's post dated 06/04/2007 (Re: [Teneo] setting
Hibernate Interceptor) and I've managed to create my own derived
EMFInterceptor.
|
|
|
Powered by
FUDForum. Page generated in 0.03519 seconds