hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Francois Poilpret" <>
Subject RE: Non-interface beans
Date Wed, 11 May 2005 00:22:44 GMT
Hello Brian,

If you need to create beans without interceptors, then the
hiveutils.ObjectBuilder service that I created in the HiveMind Utilities
project ( could be useful to you.

ObjectBuilder allows you to:
- configure objects to be created (in a quite straightforward xml syntax)
- declare DI (constructor or setter or mixed) for your objects (you can
inject anything that can already be injected in HiveMind through the
"object" translator, ie almost everything you may want)
- cache objects if you need (configuration attribute)
- inject such defined objects into other objects, services or configurations
(thanks to a new ObjectProvider "object:<name>"
- to pass additional runtime arguments to the constructor at object
instantiation time

I have used this stuff a lot in HiveGUI where it is important to:
- be able to instantiate any kind of Swing objects
- make it easy to declare lots of objects

Please note that in its current version (0.4.0) the HiveMind Utilities
modules only work with HiveMind 1.0.



-----Original Message-----
From: Hensley, Richard [] 
Sent: Wednesday, May 11, 2005 1:46 AM
Subject: RE: Non-interface beans


I ran into a similar problem with the fact that Bean Services must have a
public no argument constructor. I worked around my issue by using the
"primitive" model, which just creates the bean. Maybe this could work for
you and avoid this whole issue. As I recall, bean services were a reluctant
feature added by Howard. I believe the reason he was reluctant is because of
all the issues surrounding figuring out a good interface so that Hivemind is
happy. I really do not think that hivemind should be changing the model on
the user, I think it should error out so the user can make a proper
determination and configuration.


-----Original Message-----
From: Brian K. Wallace [] 
Sent: Tuesday, May 10, 2005 11:25 AM
Subject: Non-interface beans

Hash: SHA1

~  I've documented this in HIVEMIND-120, but wanted to post this here as
it appears it is a more fundamental problem than I first saw. At
present, Hivemind allows me to declare a class as the interface. It then
proceeds to create the proxies around it and I can use it normally both
in configuration and code.

~  The problem arises when the class (or any of its superclasses)
implements a "public final" method. The proxy creation fails due to the
attempt to override a final method, and a quick look at returning simply
the class, thereby avoiding the proxy issue, causes problems elsewhere
that expect it to have proxy methods. It would be ideal for the proxy to
be attempted (unless it were possible to declare it in the configuration
to be 'real' all the time), but failing that for the reason above just
create the bean. I'm just not sure where this change would impact to
avoid problems with missing methods expected to be in the proxy.

~  If there is another methodology for doing the same thing with all
beans (to include those that have final methods), I'd love to hear it.
Version: GnuPG v1.2.5 (MingW32)


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message