• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bytecode instrumentation, Entites and Java EE

 
Grega Krajnc
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I hope, this is correct category.

For our projects, we have entity classes where we add some technical code into all getters and setters. We would like to use javassist or similar library for bytecode instrumentation, to generate this code automatically.

Is there a way to do this during class loading time, since our ear project is running inside Java EE application server (J2EE 5 or more)? If not, I know, that similar problems are solved using dynamic proxies. But here I crash into another problem, how to do that, if entities will be used by JPA, because JPA vendors (such as Hibernate) create their own proxies on same entities.

Right now we are using JBoss, but I'm interested about portable solution.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!