Hi James,
2006/5/10, James Carman <[EMAIL PROTECTED]>:
All,
I would like to include AspectJ support into HiveMind. Basically, what I'm
looking to do is inject HiveMind-managed resources (services and maybe even
configurations) into singleton AspectJ aspects. I was wondering how you
guys think I should go about it....
supporting AspectJ is a promissing path to go! AspectJ5 in conjunction
with Java5's annotations feature is very powerfull and combining that
with a container opens very nice ways to design software. Just look on
Spring2 and their effort incorporating AspectJ support. To me,
HiveMind *needs* decent AOP support to remain a container framework of
choice for the next couple of years.
Howard's thoughts on HiveMind 1.2 and Java5 are going in a direction
where direct incorparation of proper AOP features are going to become
possible.
I made some promissing experiments with AspectJ and HiveMind to inject
HiveMind services into aspects. And further to use aspects to inject
HiveMind resources into normal POJOs where creation and configuration
via HiveMind is not possible - think about servlets and such. All of
that using AspectJ's great load time weaving feature. Are you
interested in those examples?
... Here's my idea. Create a configuration
point to let folks contribute to:
<contribution configuration-id="aspectj.aspects">
<aspect class="the aspect class is here">
<!-- BuilderFactory-like stuff here -->
</aspect>
</contribution>
Then, have an eager loaded service with an init method actually perform the
injection(s). What do you guys think?
What I don't get is the example you gave, James. You'd like to
instantiate aspects and provide them via contribution - but for what?
how would you going to use those aspects then?
If you're going to look deeper into AspectJ support, that would be a
pleasing direction for HiveMind to evolve. It would be my pleasure to
provide some help to get it going.
Stefan Hübner