-
1. Re: How to strip AOP Proxy off entity instance
clebert.suconic May 3, 2006 10:57 AM (in response to oglueck)Proxies are created at org.jboss.aop.proxy.ClassProxyFactory
Take a look on how proxies are created at createProxyCtClass, maybe that will give you some hint in what you need.
Proxiles will implement org.jboss.aop.proxy.ClassProxy, and extent the proxied class. Maybe that will give you some hint in what you need. -
2. Re: How to strip AOP Proxy off entity instance
kabirkhan May 3, 2006 11:04 AM (in response to oglueck)Are you talking about proxies YOU have created using JBoss AOP, or the stuff that Hibernate does? Whatever Hibernate does does not come from JBoss AOP, it uses its own weaving mechanism to support the lazy loading stuff
-
3. Re: How to strip AOP Proxy off entity instance
clebert.suconic May 3, 2006 11:06 AM (in response to oglueck)Oh yes... please ignore my message them :-)
-
4. Re: How to strip AOP Proxy off entity instance
oglueck May 3, 2006 11:07 AM (in response to oglueck)I meant the magic that Hibernate does. Sorry for not being accurate. Any ideas?
-
5. Re: How to strip AOP Proxy off entity instance
oglueck May 11, 2006 11:19 AM (in response to oglueck)Would something like this work?
(new org.jboss.serial.io.MarshalledObject(entity)).get() or (new org.jboss.serial.io.MarshalledObjectForLocalCalls(entity)).get()
-
6. Re: How to strip AOP Proxy off entity instance
clebert.suconic May 11, 2006 11:59 AM (in response to oglueck)Work for what?
This should work, but it would return you the exact same object you are serializing. In other words, you won't get the proxy, just a clone of entity. -
7. Re: How to strip AOP Proxy off entity instance
oglueck May 11, 2006 12:01 PM (in response to oglueck)I don't want the proxy, I want the entity bean WITHOUT the proxy.
-
8. Re: How to strip AOP Proxy off entity instance
bill.burke May 11, 2006 4:54 PM (in response to oglueck)this is a hibernate thing...it creates proxies for lazy initialization. Check hibernate documentation. I don't know if there is a switch or not.