Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 51923 invoked by uid 500); 7 Aug 2003 14:45:02 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list geronimo-dev@incubator.apache.org Delivered-To: moderator for geronimo-dev@incubator.apache.org Received: (qmail 15555 invoked from network); 7 Aug 2003 14:32:29 -0000 From: Bavo De Ridder Reply-To: bderidder@novell.com Organization: Novell Inc. To: Alex Blewitt , "Justin Ju" Subject: Re: Dynamic proxies Date: Thu, 7 Aug 2003 16:24:37 +0200 User-Agent: KMail/1.5.2 Cc: "Lyytinen Joonas" , References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308071624.38682.bderidder@novell.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Don't forget the classloading issues you can have with dynamic proxies.=20 Interface and implementing class (target) have to be in the same classloade= r. This currently gives me serious headaches with JBoss. Oh yes, please make a= =20 better classloading architecture compared to JBoss! B. On Thursday 07 August 2003 16:17, Alex Blewitt wrote: > Dynamic Proxies in Java allowed developers to say: > > "Give me a new class that implements interface X so that all method > calls are actually routed through to this piece of code" > > Essentially, a Dynamic Proxy allows you to have: > > public interface Thing { > public void doMethod(); > public void doAntoherMethod(); > } > > and your code > > public class Processor implements InvocationHandler { > public void invoke(Object target, Method method, Object args) { > // do anything > } > } > > and then say > > Thing t =3D Proxy.getProxyClass(Thing.class, new Processor()); > > so that t.doMethod() and t.doAnotherMethod() both end up with your > Processor method. > > See > http://java.sun.com/j2se/1.4.1/docs/api/java/lang/reflect/Proxy.html > for more info. > > Unfortunately, the ProxyClass is a bit knackered in that it only works > with interfaces, not with all abstract types (i.e. abstract classes as > well). Had it been designed to deal with all abstract types (like the > inner classes do) then it'd have been much nicer. > > PS There are syntax errors above; this is from memory. > > On Thursday, Aug 7, 2003, at 15:09 Europe/London, Justin Ju wrote: > > What do you mean about dynamic proxies? > > Is it one of the design patterns? > > ----- Original Message ----- > > From: "Lyytinen Joonas" > > To: <> > > Sent: Thursday, August 07, 2003 7:43 PM > > Subject: RE: how about maven? > > > > > > Hi everyone, > > > > I'm new to the list and don't know how much general discussion around > > this has allready been had, but before starting the implementation of > > the EJB container a good deal of though probably should be given to the > > implementation architecture of the EJB container. > > > > AFAIK currently there are three approaches to the EJB problem domain > > > > 1. Managing the EJB's using reflection > > 2. Managing the EJB's through dynamic proxies > > 3. Managing the EJB's using JMX > > > > Of these, the last one is newest and thus has the least references. > > There is a good > > academic study on the first two approaches > > (http://www.cs.rice.edu/CS/Systems/DynaServer/> perf_scalability_ejb.pd= f) > > which states that there is no major performance differences between > > the two. > > > > > > Has anyone any experiences with the JMX approach and data of it's > > performance? > > Maybe it would be beneficial to build small POC's of each before > > starting the proper > > implementation? > > > >> how about MX4J code, I see the code is > >> under License: Apache Software License > >> that a good thing :-) =2D --=20 2003-01-07 07:49:34 DEBUG [org.geek.Bootstrap] Init 2003-01-07 07:49:35 DEBUG [org.geek.Bootstrap] Life support systems 2003-01-07 07:49:36 FATAL [org.geek.Bootstrap] no caffeine detected 2003-01-07 07:49:37 FATAL [org.geek.Bootstrap] halting system System Halted =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/MmElp1F1uut6FtQRAo7HAJ4yKeIZdwO1im4ouir8xaKzmcDtLACePmYd tsNMb1GEjeH+vezd+QkCALw=3D =3Dxdls =2D----END PGP SIGNATURE-----