On 3/26/10 12:03 AM, Stefan Zoerner wrote:
Hi Emmanuel!
Thanks for your quick response.
Emmanuel Lecharny wrote:
I will respond in detail to you mail, but first, why not using the
annotations to start a server ?
It's way easier, you don't have to worry about what's going on and
what needs to be initialized first.
I'm also wondering if this should not be the standard way to start
the server.
I am not 100% convinced by this approach. IMHO the standard way should be
ApacheDS myServer = new ApacheDS();
myServer.start();
(simplified ;-)
You can do that, of course, but it's not that simple, as you still have
to get your config either from Spring (yuk), or though a long and
painful Java declaration.
Although annotations are technically interesting, IMHO using
annotations in this place will make it more difficult for people who
simply try to embed the server. Within spring configurations, within
Groovy scripts, etc. Too much magic.
That's the beauty of Annotations : you don't have to deal with the
magic, it's already wrapped for you. Now, that does not change a thing,
as it just creates the beans you will use, and that you can extend.
The fact is that you can declare everything in one single place (on top
of your class or method), it's controlled (the syntax is checked at
compile time), and documented (hmm, well, it should be ;).
Also you don't need anymore Spring or whatever.
If a user plans to extend the server (like the simple custom partition
in the example, or a custom interceptor), the JavaBeans approach will
always work. It is possible to readjust the Spring config etc.
True : it's not as dynamic than a Spring approach. Now, we do think that
OSGi is the way to go in this area.
I guess, it is not possible to add a custom partition with the current
annotations.
Of course it's possible ! :) Well, you just have to define the
Annotation to do that ;)
Anyway, I was just trying to give you some mind food, and I do think
that this way to do will cover a large part of our users base. Now, we
also need a way to embed the server not using Annotations ...
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com