geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: org.apache.geronimo.gbean.NoProxy=true
Date Wed, 22 Mar 2006 08:41:55 GMT
If we want to remove proxies, we'll have to consider how to work
around them.  Right now, proxies let you cast anything to a
GeronimoManagedBean, which lets you:

 - Get the ObjectName for the thing
 - Get the GBean state of the thing
 - Get the uptime for the thing
 - Start and stop the thing

While it's possible to do all those things from the kernel, you have
to know the ObjcetName in advance (and the code becomes fairly
unpleasant).  That will make it harder to move away from ObjectName
based navigation toward POJO based navigation.

For example, think about how you'd write code to, for example, stop
all running web containers given a J2EEServer instance.  Currently
you'd iterate the web containers, for each iterate the connectors, and
for each cast it to a GeronimoManagedBean and check the state and if
it's running stop it.  How would that be done without proxies and
without ObjectName based navigation?

Thanks,
    Aaron

On 3/21/06, Vamsavardhana Reddy <c1vamsi1c@gmail.com> wrote:
> Why were proxies introduced at all?
>
>  -Vamsi
>
>
> On 3/22/06, Jeff Genender <jgenender@apache.org> wrote:
> > This is great...debugging with proxies has been a real PITA...this will
> > *really* help.
> >
> > Hiram Chirino wrote:
> > > +1 from me too.  Way back when I was working on the ActiveMQ -
> > > Geronimo integration, the poxies gave me a few headaches.
> > >
> > > Regards,
> > > Hiram
> > >
> > > On 3/19/06, Matt Hogstrom <matt@hogstrom.org> wrote:
> > >> +1...the debugging thing has been a problem.  If for no other reason
> this is the
> > >> right thing to do.  However, there will be users who care less about
> isolation
> > >> and more about memory and speed.  This gives them the choice to run
> exposed to
> > >> get what they want.
> > >>
> > >> Matt
> > >>
> > >> Dain Sundstrom wrote:
> > >>> On Mar 18, 2006, at 5:18 AM, John Sisson wrote:
> > >>>
> > >>>> Dain Sundstrom wrote:
> > >>>>
> > >>>>> Forgot to mention, I added an experimental flag to 1.1 which
will
> > >>>>> turn off proxying in GBean references.  This means that the
> injected
> > >>>>> reference will be the actual service instance and not a  proxy
to
> the
> > >>>>> service.  My guess is this will break a few services  that
use
> > >>>>> ProxyManager.getProxyTarget(Objcet), since the reference  won't
be a
> > >>>>> proxy.  All of these uses will have be rewritten to not  assume
a
> > >>>>> proxy if we want to keep use this flag.
> > >>>>>
> > >>>>> To turn it on, you simply set the system property
> > >>>>> org.apache.geronimo.gbean.NoProxy=true. This is
> property is picked
> > >>>>> up by a static block in the AbstractGBeanReference class, so
the
> > >>>>> property will apply for the life of the kernel class loader
> > >>>>> (normally the life of the vm).
> > >>>>>
> > >>>>> -dain
> > >>>>>
> > >>>>>
> > >>>> What was the reason for this experiment?
> > >>>
> > >>> I'd like to completely remove proxying between gbeans in the future,
> > >>> but I think it would lots break stuff to just flip it over right  now.
> > >>> Proxying between GBeans is problematic because it changes the
> expected
> > >>> programming model of component writers.  When you are giving  out
> > >>> proxies instead of the instance, the user can no longer use ==  for
> > >>> comparison, and the since proxies are so much slower, the  expected
> > >>> overhead of a call is much higher.  Both of these require  require
> > >>> changes to the component for it to run in geronimo, and if we  want
to
> > >>> have the largest component base, we're going to have to change.
> > >>>
> > >>> Besides all of that, it is really a PITA to debug geronimo since you
> > >>> have to step through all of those proxies, for really no reason.
> > >>>
> > >>> -dain
> > >>>
> > >>>
> > >>>
> > >
> > >
> > > --
> > > Regards,
> > > Hiram
> >
>
>

Mime
View raw message