Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EntityListener not called (SOLVED)
EntityListener not called (SOLVED) [message #958960] Fri, 26 October 2012 10:48
Christian Eugster is currently offline Christian EugsterFriend
Messages: 203
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi,

I use eclipselink with aries and enterprise osgi. I have an entity (Level) with an entitylistener (LevelListener) attached. When I persist an entity, the listener is not called. At startup the entitylistener seems to be instantiated (according to a debug breakpoint set in the constructur of the listener class). The eclipselink logging is set to FINEST. The output is:

org.apache.aries.blueprint[org.apache.aries.blueprint.container.ServiceRecipe] : Retrieving service for bundle org.eclipse.e4.ui.workbench_0.10.3.v20120822-140642 [30] and service registration {ch.eugster.herakles.persistence.service.LevelService}={osgi.service.blueprint.compname=levelBean, service.id=115}
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxComponentMetaDataHelperImpl] : Getting the txAttribute for the component {0} and method {1}
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxComponentMetaDataHelperImpl] : Return the txAttribute {0} for the component and method
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxInterceptorImpl] : Method: public java.lang.String java.lang.Object.toString(), has transaction strategy: REQUIRED
org.apache.aries.blueprint[org.apache.aries.blueprint.container.ServiceRecipe] : Method entry: getService, args ch.eugster.herakles.persistence.jpa.service.LevelServiceComponent@4d50c800
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxComponentMetaDataHelperImpl] : Getting the txAttribute for the component {0} and method {1}
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxComponentMetaDataHelperImpl] : Return the txAttribute {0} for the component and method
org.apache.aries.transaction.blueprint[org.apache.aries.transaction.TxInterceptorImpl] : Method: public abstract void ch.eugster.herakles.persistence.service.LevelService.persist(ch.eugster.herakles.persistence.model.Level), has transaction strategy: REQUIRED
org.ops4j.pax.logging.pax-logging-api[org.apache.aries.jpa.container.context] : Created a new persistence context org.apache.aries.jpa.container.impl.EntityManagerWrapper@2960f0e for transaction [Xid:globalId=800000006f72672e6170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64,branchId=0000000000000000000000000000000000000000000000000000000000000000,length=64].
[EL Finer]: 2012-10-26 12:38:50.203--ServerSession(942373849)--Thread(Thread[Thread-1,5,main])--client acquired: 1236689269
[EL Finer]: 2012-10-26 12:38:50.204--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--TX binding to tx mgr, status=STATUS_ACTIVE
[EL Finer]: 2012-10-26 12:38:50.205--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--acquire unit of work: 1689808417
[EL Finest]: 2012-10-26 12:38:50.205--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--persist() operation called on: ch.eugster.herakles.persistence.model.Level@8466c30.
[EL Finer]: 2012-10-26 12:38:50.206--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--TX beginTransaction, status=STATUS_ACTIVE
[EL Finest]: 2012-10-26 12:38:50.207--ServerSession(942373849)--Connection(1198049166)--Thread(Thread[Thread-1,5,main])--Connection acquired from connection pool [default].
[EL Finest]: 2012-10-26 12:38:50.208--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--Execute query DataModifyQuery(name="SEQUENCE" sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + #PREALLOC_SIZE WHERE SEQ_NAME = #SEQ_NAME")
[EL Finest]: 2012-10-26 12:38:50.209--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--reconnecting to external connection pool
[EL Fine]: 2012-10-26 12:38:50.267--ClientSession(1236689269)--Connection(1029397894)--Thread(Thread[Thread-1,5,main])--UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
	bind => [50, SEQ_GEN]
[EL Finest]: 2012-10-26 12:38:50.275--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--Execute query ValueReadQuery(name="SEQUENCE" sql="SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = #SEQ_NAME")
[EL Fine]: 2012-10-26 12:38:50.276--ClientSession(1236689269)--Connection(1029397894)--Thread(Thread[Thread-1,5,main])--SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = ?
	bind => [SEQ_GEN]
[EL Finest]: 2012-10-26 12:38:50.28--ClientSession(1236689269)--Connection(1029397894)--Thread(Thread[Thread-1,5,main])--local sequencing preallocation for SEQ_GEN: objects: 50 , first: 151, last: 200
[EL Finest]: 2012-10-26 12:38:50.281--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--assign sequence to the object (151 -> ch.eugster.herakles.persistence.model.Level@8466c30)
[EL Finer]: 2012-10-26 12:39:12.547--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--TX beforeCompletion callback, status=STATUS_ACTIVE
[EL Finer]: 2012-10-26 12:39:12.548--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--begin unit of work commit
[EL Finer]: 2012-10-26 12:39:12.549--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--TX beginTransaction, status=STATUS_ACTIVE
[EL Finest]: 2012-10-26 12:39:12.55--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--Execute query InsertObjectQuery(ch.eugster.herakles.persistence.model.Level@8466c30)
[EL Fine]: 2012-10-26 12:39:12.552--ClientSession(1236689269)--Connection(1029397894)--Thread(Thread[Thread-1,5,main])--INSERT INTO HERAKLES_LEVEL (LEVEL_ID, LEVEL_DELETED, LEVEL_DESCRIPTION, LEVEL_IMAGE, LEVEL_NAME, LEVEL_PERSISTED, LEVEL_UPDATED, LEVEL_VERSION, LEVEL_AGENT_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [151, 0, null, null, Stufe4, 2012-10-26 12:38:50.283, null, 1, null]
[EL Finest]: 2012-10-26 12:39:12.564--ServerSession(942373849)--Connection(1198049166)--Thread(Thread[Thread-1,5,main])--Connection released to connection pool [default].
org.ops4j.pax.logging.pax-logging-api[org.apache.aries.jpa.container.context] : Clearing up EntityManager org.apache.aries.jpa.container.impl.EntityManagerWrapper@2960f0e as the transaction has completed.
[EL Finer]: 2012-10-26 12:39:12.569--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--TX afterCompletion callback, status=COMMITTED
[EL Finer]: 2012-10-26 12:39:12.572--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--end unit of work commit
[EL Finer]: 2012-10-26 12:39:12.573--UnitOfWork(1689808417)--Thread(Thread[Thread-1,5,main])--release unit of work
[EL Finer]: 2012-10-26 12:39:12.573--ClientSession(1236689269)--Thread(Thread[Thread-1,5,main])--client released
[EL Finest]: 2012-10-26 12:39:12.574--ServerSession(942373849)--Thread(Thread[Thread-1,5,main])--local sequencing preallocation is copied to preallocation after transaction commit


Does anybody know what I have to do, that the listener is called? Thank you!

Solved: Annotations were missing.

[Updated on: Sat, 27 October 2012 14:49]

Report message to a moderator

Previous Topic:Config Migratin Using Moxy
Next Topic:Weird problems while saving and reading Calendar in jpa
Goto Forum:
  


Current Time: Thu Apr 25 23:15:34 GMT 2024

Powered by FUDForum. Page generated in 0.02466 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top