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). I think it's well worth using two different implementations for interfaces and concrete classes so long as the differences can be abstracted away from end-users and it really overcomes all the limitations I and you listed (i.e. EJB containers).
Let's ask Johan, perhaps he's already investigated EJB space. Gili On Nov 25, 4:01 am, "Stuart McCulloch" <[EMAIL PROTECTED]> wrote: > 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 > > - losing annotations on the original class > > > I would love to get your opinion on it because frankly if we can get > > rid of these limitations I would be *that* much happier :) Take a > > look: > >http://groups.google.com/group/mockito/browse_thread/thread/2a85cace2... > > FWIW, I wouldn't call this a proxy per se - this is bytecode manipulation > which requires access to the original bytes (it uses javassist to do this) > and only works on non-interface classes... but you can easily fall back > to using standard proxies for interfaces - downside is you end up with > two approaches to maintain > > however I would be wary of calling this a 'silver' bullet because there are > several limitations wrt. bytecode manipulation (security notwithstanding) > - for example, I don't know if javassist works with custom classloaders as > used in EJB containers (and OSGi, etc.) where the original class bytes > may not be available, or where the original class may already be in-use > elsewhere in the JVM > > just warning we may be jumping from known issues into the unknown ;) > > Gili > > > > -- > Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to google-guice@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---