Re: Proxies without ASM/CGLIB

2008-11-25 Thread Stuart McCulloch
2008/11/25 Stuart McCulloch [EMAIL PROTECTED] 2008/11/25 Gili [EMAIL PROTECTED] Johan Haleby brought up an interesting approach to proxing classes without the limitations introduced by ASM/CGLIB such as: - requiring no-op constructors - preventing the use of final or private methods -

Re: Getting the underlying object behind a proxy

2008-11-25 Thread Gili Tzabari
That's essentially what I'm doing, but first I need to understand if CGLIB proxies work the way I understand or not. That is, do they contain the data or do they redirect calls to another instance as Hibernate does (at least, I remember it doing so)? Gili tzwoenn wrote: A simpler

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Stuart McCulloch
2008/11/26 Gili [EMAIL PROTECTED] Hi Stuart, It is my understanding that all of the difficulties come from proxing concrete classes, not interfaces (the latter can be proxied quite easily using the core API). that's why I always prefer to program to interfaces ;) I think it's well

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Gili Tzabari
Stuart McCulloch wrote: my main concern is how you'd handle the situation where someone else is using class (A) but Guice wants to proxy it by rewriting - the new definition (A') would need to be loaded into another classloader, but that means that class A and class A' are incompatible, and

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread jordi
I'm having similar problems using Guice with Struts 2 + Hibernate. I dunno if Guice is part of the problem, when the PermGen error appears always is related to C3P0 pool created by Hibernate and the Logger stuff. jordi On Tue, Nov 25, 2008 at 7:41 PM, Dhanji R. Prasanna [EMAIL PROTECTED]wrote:

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread Dhanji R. Prasanna
It's not Guice. It's because an instance of something (like a logger) from your application is being referenced by something outside your application. jordi's webapp classloader - class - *instance* - something - something's class - a parent classloader As long as this strong reference chain

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Stuart McCulloch
2008/11/26 Gili Tzabari [EMAIL PROTECTED] Stuart McCulloch wrote: my main concern is how you'd handle the situation where someone else is using class (A) but Guice wants to proxy it by rewriting - the new definition (A') would need to be loaded into another classloader, but that means

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Gili Tzabari
Stuart McCulloch wrote: it's the eager proxying that I'm worried about - could get hairy for example: how do I tell Guice about the class that should be proxied without actually loading that class (as Guice works primarily on types) Alternatively you could register the Guice

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread Dhanji R. Prasanna
On Tue, Nov 25, 2008 at 11:22 AM, jordi [EMAIL PROTECTED] wrote: ... Looking at the console log i see this message when redeploying: A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior

Re: Google Guice Peformance: CPU and Memory

2008-11-25 Thread jordi
Right now i'm restarting jordi's webapp server when changes happen. There's no doubt that's the easier thing to do, but for seconds you got a 403 on the main page. Just one server at this time... i'll do some fancy 403 twitter-style page and no problem with that. On Tue, Nov 25, 2008 at 8:27 PM,

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Stuart McCulloch
2008/11/26 Gili Tzabari [EMAIL PROTECTED] Stuart McCulloch wrote: it's the eager proxying that I'm worried about - could get hairy for example: how do I tell Guice about the class that should be proxied without actually loading that class (as Guice works primarily on types)

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Gili Tzabari
I guess I agree with you for the most part. Thing is, for all this talk about how it's all fixable no one actually done so... I don't recall hearing of a single project that tried to improve the situation. I might sound silly saying this... but it really ticks me off. I hate using

Re: Proxies without ASM/CGLIB

2008-11-25 Thread Johan Haleby
Perhaps I'm mistaken but mabey aspectj would be able to help you here? AJDT works in the Eclipse environment and thus should work in OSGi as well and afaik it would be possible to do delegation without proxying the classes using this approach? I think Spring uses aspectj to inject beans to

[google-guice commit] r700 - in trunk: extensions/privatemodules/src/com/google/inject/privatemodules src/com/google/in...

2008-11-25 Thread codesite-noreply
Author: limpbizkit Date: Tue Nov 25 00:43:49 2008 New Revision: 700 Added: trunk/src/com/google/inject/binder/AnnotatedElementBuilder.java trunk/src/com/google/inject/binder/PrivateBinder.java trunk/src/com/google/inject/spi/Exposure.java