You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Sutic <le...@inspireinfrastructure.com> on 2003/02/14 15:35:00 UTC

ServiceManager and ORBs (was: RE: Swing Component)


> From: Vjeran Marcinko [mailto:marcinko@jware.net] 
> 
> ----- Original Message ----- 
> From: "Peter Royal" <pr...@apache.org>
> To: "Avalon framework users" <us...@avalon.apache.org>
> Sent: Friday, February 14, 2003 1:25 PM
> Subject: Re: Swing Component
> 
> 
> > On Friday, February 14, 2003, at 12:46  AM, Vjeran Marcinko wrote:
> 
> > I would encourage the use of the Proxy objects, because if your code
> > works with them in place then you will be in a better position going

> > forward to migrate (if want/needed) to future containers. I do
realize 
> > that there are some cases where the proxies are not desirable, and
thus 
> > the ability to disable that feature.
> 
> Maybe it would be great to have built-in option to turn off 
> proxying if need raises ? Of course, overriding the method in 
> a way that you described earlier would work also, it's just 
> slightly more complex solution ...

I'm slightly against such an option - I think it is very similar to
the Flexibility Syndrome. I see no need to add an option to the
config whose only purpose is to enable the container to be used
in ways that it explicitely isn't supposed to be used.

I'd put in a 

  SwingComponent getSwingComponent ()

method in the MyComponent interface and be done with it.


                      -oOo-


That said, the proxying results in other problems. We moved to
the service.* classes due to the need of putting non-component
objects in the service manager, such as a CORBA ORB.

Since the ORB doesn't have an interface - i.e. there is no
ORB interface, only an ORB class - proxying *will* fail.

This goes for all classes that don't have an interface.

Is this a problem, or am I overreacting?

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: ServiceManager and ORBs (was: RE: Swing Component)

Posted by Neeme Praks <ne...@apache.org>.
Leo Sutic ::
>                       -oOo-
> 
> That said, the proxying results in other problems. We moved to
> the service.* classes due to the need of putting non-component
> objects in the service manager, such as a CORBA ORB.
> 
> Since the ORB doesn't have an interface - i.e. there is no
> ORB interface, only an ORB class - proxying *will* fail.
> 
> This goes for all classes that don't have an interface.
> 
> Is this a problem, or am I overreacting?

Well, if we would use CGLIB for enhancing (note that I used the word 
"enhancing", instead of "proxying"), then this is not an issue.

CGLIB enhancer functionality does not require class/interface 
separation, it can generate a class that extends some base class and 
implements any number of additional interfaces...

For some more details, check this out:
http://cglib.sourceforge.net/apidocs/net/sf/cglib/Enhancer.html

Rgds,
Neeme


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: ServiceManager and ORBs (was: RE: Swing Component)

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Peter Donald [mailto:peter@realityforge.org] 
> 
> On Mon, 17 Feb 2003 20:45, Leo Sutic wrote:
> > I agree. It's just that the ORB case was one of the use cases that 
> > caused the switch from ComponentManager to ServiceManager -
> 
> I would say it was an excuse and not a use case ;) 

A so-called excuse-case, then.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: ServiceManager and ORBs (was: RE: Swing Component)

Posted by Peter Donald <pe...@realityforge.org>.
On Mon, 17 Feb 2003 20:45, Leo Sutic wrote:
> I agree. It's just that the ORB case was one of the use cases
> that caused the switch from ComponentManager to ServiceManager -

I would say it was an excuse and not a use case ;) 

I had argued for that change for years but didn't have a good enough excuse 
and low coupling was not considered worth it.

-- 
Cheers,

Peter Donald
*-------------------------------------------------*
|   An eye for eye only ends up making the whole  | 
|      world blind.  - Gandhi                     |
*-------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: ServiceManager and ORBs (was: RE: Swing Component)

Posted by Leo Sutic <le...@inspireinfrastructure.com>.

> From: Peter Donald [mailto:peter@realityforge.org] 
> 
> On Sat, 15 Feb 2003 01:35, Leo Sutic wrote:
> > That said, the proxying results in other problems. We moved to the 
> > service.* classes due to the need of putting non-component 
> objects in 
> > the service manager, such as a CORBA ORB.
> >
> > Since the ORB doesn't have an interface - i.e. there is no ORB 
> > interface, only an ORB class - proxying *will* fail.
> >
> > This goes for all classes that don't have an interface.
> 
> I don't think we really support components without 
> interfaces. 

I agree. It's just that the ORB case was one of the use cases
that caused the switch from ComponentManager to ServiceManager - 
and it seemed silly that we're now back into not supporting ORBs
(without bytecode hackery).

Overreacting again, I guess.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: ServiceManager and ORBs (was: RE: Swing Component)

Posted by Peter Donald <pe...@realityforge.org>.
On Sat, 15 Feb 2003 01:35, Leo Sutic wrote:
> That said, the proxying results in other problems. We moved to
> the service.* classes due to the need of putting non-component
> objects in the service manager, such as a CORBA ORB.
>
> Since the ORB doesn't have an interface - i.e. there is no
> ORB interface, only an ORB class - proxying *will* fail.
>
> This goes for all classes that don't have an interface.

I don't think we really support components without interfaces. One of the 
basic assumptions of COP is that there is a separation of interface and 
implementation and in java that reflects itself vi interface/class 
separation. I don't believe that any released container supports this 
behaviour.

And FWIW you would be surprised what you can do with bytecode hackery to 
"proxy" classes like ORBs. It is more than possible when you control the 
classloader tree.
-- 
Cheers,

Peter Donald
---------------------------------------------------
"Therefore it can be said that victorious warriors 
win first, and then go to battle, while defeated 
warriors go to battle first, and then seek to win." 
              - Sun Tzu, the Art Of War
--------------------------------------------------- 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org