-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Extended instrumentation? Not in the manual.
PostPosted: Wed Aug 17, 2011 5:22 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
The Javadocs for the InstrumentTask class mention a feature called extended instrumentation. They say:

Quote:
Optionally you can chose to enable "Extended Instrumentation" if desired by specifying the extended attribute on the task


And then:

Quote:
See the Hibernate manual regarding this option.


But the manual says nothing about this option. What does it do?

If it matters, I'm looking at Hibernate 3.6.6.Final.

Thanks,
Laird


Top
 Profile  
 
 Post subject: Re: Extended instrumentation? Not in the manual.
PostPosted: Sun Sep 04, 2011 9:02 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
OK; thanks!

Best,
Laird


Top
 Profile  
 
 Post subject: Re: Extended instrumentation? Not in the manual.
PostPosted: Wed Aug 07, 2013 3:35 am 
Newbie

Joined: Wed Aug 07, 2013 3:31 am
Posts: 1
I believe that this property allows to instrument not only entity classes but other code as well in order to intercept field access.
Consider following code:
Code:
@Entity public class MyEntityClass {
    @Id public long id;
    @Basic public String data;
}

In case of extended instrumentation it will transform this method:
Code:
@PersistenceContext em;

void businessMethod() {
    MyEntityClass mec = em.find(1l);
    System.out.println(mec.data);
}

To something like this:
In case of extended instrumentation it will transform this method:
Code:
@PersistenceContext em;

void businessMethod() {
    MyEntityClass mec = em.find(1l);
    System.out.println(mec.$javassist_read_data());
}

This will allow lazy loading work even for public field access strategies


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.