-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Architecture Question
PostPosted: Sat Oct 01, 2005 10:38 pm 
Beginner
Beginner

Joined: Sun Jul 31, 2005 1:23 pm
Posts: 35
How does Hibernate "hook" persistent Java objects?

When I call a property "get" method on my Java object, Hibernate code somehow gets called. How does this happen? This violates my traditional Java mindset.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 10:48 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
reflection


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 11:11 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
pull a "Customer" from the database. do a toString() and you'll see that the class type is not really your Customer. It's an instance of a class that is generated at runtime. google "Proxy Design Patern" to learn more about these classes .

to anyone, I'm sure plenty of you have looked under the "work" directory in Tomcat . You can see the servlet a JSP is translated to by Catalina. Is there any way to see the proxy a POJO is translated to by CGLIB?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 1:48 am 
Beginner
Beginner

Joined: Sun Jul 31, 2005 1:23 pm
Posts: 35
dennisbyrne wrote:
pull a "Customer" from the database. do a toString() and you'll see that the class type is not really your Customer. It's an instance of a class that is generated at runtime. google "Proxy Design Patern" to learn more about these classes .

to anyone, I'm sure plenty of you have looked under the "work" directory in Tomcat . You can see the servlet a JSP is translated to by Catalina. Is there any way to see the proxy a POJO is translated to by CGLIB?


Ahh.... Now that makes sense. Very interesting. Yes, it would be interesting if I could see this generated class. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.