Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Custom Byte Code Transformer(How to Use Custom Byte Code Transformer with PeristenceProvider)
Custom Byte Code Transformer [message #1234331] Tue, 21 January 2014 18:01
Steve Widom is currently offline Steve WidomFriend
Messages: 1
Registered: January 2014
Junior Member
I would like to add my own custom byte code transformer to the PersistenceUnitInfo used in EclipseLink. I am currently using EclipseLink-2.5.1-RC3 and have read the JPA standard sufficiently well to learn that I should be able to do this (at least I hope I read it sufficiently well).

Essentially, my byte code transformer uses Javassist to add JPA annotations to the entity classes driven from metadata outside of EclipseLink and possibly add fields, methods, etc. to those entity classes.

I have been unsuccessful in getting this to work, and was wondering if you have any examples of this kind of thing. Strangely, I have configured my own JPA PersistenceProvider into my webapp running in Tomcat 7 (which DOES seem to be called by EclipseLink), by adding the name of the custom Provider into the META-INF/services/javax.persistence.spi.PersistenceProvider of my jar file (as specified by the JPA specification). However in the debugger I see that the PersistenceUnitInfo is always null, and I keep getting an error thrown that a PersistenceProvider cannot be found for all the entity classes in my persistence.xml file.

Any ideas? Does EclipseLink support a custom PersistenceProvider, and is there any way I can addTransformer() to my PersistenceUnits so that I can use byte code manipulations with Javassist?


Previous Topic:Eclipselink
Next Topic:virtual mapping for byte[]
Goto Forum:

Current Time: Tue Mar 31 08:33:36 GMT 2020

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

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

Back to the top