You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Alan Cabrera <ad...@panix.com> on 2006/04/04 19:55:16 UTC
Maven 2 and XBean
I'm going to investigate what it takes to convert James to maven 2 and
XBean. I realize that others may not like that idea. My thinking is to
convert a small piece and solicit comments.
It would make sense if I did this in a sandbox. Would it be ok if I had
a little corner to play in?
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>> When we were looking for an ORB for Geronimo, I tried to embed
>> OpenORB. This project uses Avalon. Because Avalon courses through
>> the veins of every aspect of OpenORB, it was impossible to embed an
>> ORB into Geronimo w/out bringing in everything but the kitchen sink.
>>
>> I think that we're saying the same thing and that we are narrowing
>> things down to common terms. Do you agree?
>
> I agree that every container has its own limit and needs.
> I agree that we could change James to be more easily managed by other
> containers.
> I don't agree on avalon interfaces being "Container code".
>
> I think that James is embeddable in "non avalon compliant containers"
> by writing/porting few services from one of the current avalon
> compliant containers and writing a wrapper for the avalon lifecycle.
>
> In any environment James objects depends on services like
> "Configuration" and "Logger" that are not bundled with James itself,
> but provided by the container.
> I know that a Log4jLogger exists, and it can be used if we move away
> from phoenix.
> Configuration could be probably provided by a wrapper on
> Common-configuration and so on.
>
> We should make 1 step at a time and *keep* avalon compatibility at
> least until we'll have a working, stable, full featured, container
> alternative.
If I can take the james core server and only require 1 single Avalon
jar, the one that contains the interfaces, to embed the server I'm
happy. Like I said before, that wasn't the case for OpenORB but I could
have been doing something wrong.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
> When we were looking for an ORB for Geronimo, I tried to embed OpenORB.
> This project uses Avalon. Because Avalon courses through the veins of
> every aspect of OpenORB, it was impossible to embed an ORB into Geronimo
> w/out bringing in everything but the kitchen sink.
>
> I think that we're saying the same thing and that we are narrowing
> things down to common terms. Do you agree?
I agree that every container has its own limit and needs.
I agree that we could change James to be more easily managed by other
containers.
I don't agree on avalon interfaces being "Container code".
I think that James is embeddable in "non avalon compliant containers" by
writing/porting few services from one of the current avalon compliant
containers and writing a wrapper for the avalon lifecycle.
In any environment James objects depends on services like
"Configuration" and "Logger" that are not bundled with James itself, but
provided by the container.
I know that a Log4jLogger exists, and it can be used if we move away
from phoenix.
Configuration could be probably provided by a wrapper on
Common-configuration and so on.
We should make 1 step at a time and *keep* avalon compatibility at least
until we'll have a working, stable, full featured, container alternative.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>> Bernd Fondermann wrote:
>>> wouldn't it be best to POJO-fy _first_ without a specific container
>>> in mind (a larger task on its own) and then afterwards look at all
>>> the mature containers to integrate with?
>>
>> My thoughts exactly. IMHO, if the container makes you do weird
>> things with your design at the start, then it's not a good container.
>
> I agree that we can change but I don't think that Interface Injection
> and Service Locator patterns are "weird things".
> Webwork, for example, uses this patterns without being tied to a
> container.
> I think that using "AwareInterfaces" in addiction to setter injection
> helps developers (help IDEs to provide better code browsing) and
> doesn't bind me to something specific.
> A modern pojo container should not have problems if my POJO implements
> interfaces.
I think that we agree here. What I was thinking was if we had to add
interfaces from external containers to the core code, that would be bad.
>>> for example the parent class hiearchie for core components like
>>> org.apache.james.James is based on classes like
>>> org.apache.avalon.framework.logger.LogEnabled.
>>
>> IMHO, to put it politely, yuck. This is an example of why container
>> software should not be so invasive in your code. To be sure Avalon
>> was on the cutting edge and investigated a lot of good ideas. I
>> think that we've learned a bit since then.
>
> LogEnabled is simply an interface that says that the component has an
> "enableLogging(Logger l)" method. Nothing else.
> If you refactor it to "setLogger(Logger l)" is a standard setter DI
> way to componentize logging management.
As mentioned above, it's the inclusion of external container code into
the James server core code that I object to. I'll explain why below.
>
>>> LogEnabled provides functionality for what is called an 'aspect'
>>> today. modern IoC frameworks weave those aspects into the components
>>> by 'crosscutting' them - the component has no direct notion of it
>>> happening.
>>>
>>> this and similar refactoring steps would make James components much
>>> more POJOs and thus more easily portable into new containers.
>>
>> I am of the same opinion.
>
> I this I'm reading most projects using many components finish up
> creating their own Logger interface and creating wrappers for the
> variour components so to have a centralized way to receive logs.
>
> This is IoC applied to logging, nothing more.
When we were looking for an ORB for Geronimo, I tried to embed OpenORB.
This project uses Avalon. Because Avalon courses through the veins of
every aspect of OpenORB, it was impossible to embed an ORB into Geronimo
w/out bringing in everything but the kitchen sink.
I think that we're saying the same thing and that we are narrowing
things down to common terms. Do you agree?
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
> Bernd Fondermann wrote:
>> wouldn't it be best to POJO-fy _first_ without a specific container in
>> mind (a larger task on its own) and then afterwards look at all the
>> mature containers to integrate with?
>
> My thoughts exactly. IMHO, if the container makes you do weird things
> with your design at the start, then it's not a good container.
I agree that we can change but I don't think that Interface Injection
and Service Locator patterns are "weird things".
Webwork, for example, uses this patterns without being tied to a container.
I think that using "AwareInterfaces" in addiction to setter injection
helps developers (help IDEs to provide better code browsing) and doesn't
bind me to something specific.
A modern pojo container should not have problems if my POJO implements
interfaces.
>> for example the parent class hiearchie for core components like
>> org.apache.james.James is based on classes like
>> org.apache.avalon.framework.logger.LogEnabled.
>
> IMHO, to put it politely, yuck. This is an example of why container
> software should not be so invasive in your code. To be sure Avalon was
> on the cutting edge and investigated a lot of good ideas. I think that
> we've learned a bit since then.
LogEnabled is simply an interface that says that the component has an
"enableLogging(Logger l)" method. Nothing else.
If you refactor it to "setLogger(Logger l)" is a standard setter DI way
to componentize logging management.
>> LogEnabled provides functionality for what is called an 'aspect'
>> today. modern IoC frameworks weave those aspects into the components
>> by 'crosscutting' them - the component has no direct notion of it
>> happening.
>>
>> this and similar refactoring steps would make James components much
>> more POJOs and thus more easily portable into new containers.
>
> I am of the same opinion.
I this I'm reading most projects using many components finish up
creating their own Logger interface and creating wrappers for the
variour components so to have a centralized way to receive logs.
This is IoC applied to logging, nothing more.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Bernd Fondermann wrote:
> wouldn't it be best to POJO-fy _first_ without a specific container in
> mind (a larger task on its own) and then afterwards look at all the
> mature containers to integrate with?
My thoughts exactly. IMHO, if the container makes you do weird things
with your design at the start, then it's not a good container.
>
> for example the parent class hiearchie for core components like
> org.apache.james.James is based on classes like
> org.apache.avalon.framework.logger.LogEnabled.
IMHO, to put it politely, yuck. This is an example of why container
software should not be so invasive in your code. To be sure Avalon was
on the cutting edge and investigated a lot of good ideas. I think that
we've learned a bit since then.
>
> LogEnabled provides functionality for what is called an 'aspect'
> today. modern IoC frameworks weave those aspects into the components
> by 'crosscutting' them - the component has no direct notion of it
> happening.
>
> this and similar refactoring steps would make James components much
> more POJOs and thus more easily portable into new containers.
I am of the same opinion.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann wrote:
> mmhh. I am religiously against religion in programming, too. ;-)
> Earlier you proposed to get rid of abstract discussions like POJO vs.
> Avalon. At least, please don't put me in a corner. This is only for
> discussion.
Sorry Bernd, I didn't want to put you in a corner :-)
> On the interface topic:
>
> Some James code forensic:
> Disposable declares one method with no arguments, dispose().
> There is no single variable declared of type Disposable.
> Instead, all current uses of Disposable are
>
> if (obj instanceof Disposable) (Disposable) obj).dispose();
>
> and could very well be replaced by ContainerUtil.dispose();
Most of James should use ContainerUtil instead of the instanceof. I
change the "instanceof" method with the ContainerUtil call each time I
work on a james object :-).
> So, Disposable is a marker interface.
Exactly.
> AFAIK, there is no enforcement of calling dispose() for Disposable
> objects which are not handled by Avalon itself through a central
> lifecycle handler or something alike.
>
> Who knows if Disposable instances really are disposed? Or if the class I
> am calling ContainerUtil.dispose() on is really disposable?
Exactly we can't be sure this will happen. It is simply a contract.
Also in SDI IoC you can't be sure that your dependencies will be followed.
The lifecycle methods, by their nature, are only a contract and it is
left to the container to call them.
> So all the interface says is: This class is ready/expecting to be
> disposed. (Which is ok.)
> But if you read: "This class will get disposed" you are on the wrong
> track. The class contract would promise you something the application
> can not hold.
Ok, but this is really a common issue in ANY container. I still don't
get the point.
If you don't expect the container and your code to do what it is
supposed to do then you could even expect it could even not start your
application :-)
> Pls take a look at the instance variable
> Mail mail
> in SMTPHandler.
> interface Mail extends Serializable, Cloneable (not Disposable)
>
> SMTPHandler receives a Mail instance and at some point calls dispose().
> But if it does not get a MailImpl (implementing Disposable) but some
> other implementation (not implementing Disposable)?
> Nothing happens. (Which is: bad things happen ;-) )
@SMTPHandler:417
if (mail instanceof Disposable) {
((Disposable) mail).dispose();
}
So if the Mail is not a MailImpl and does not implement disposable won't
be disposed. And this is GOOD thing.
I don't see where the bad things happen: the mail will be garbage collected.
It seems to me an acceptable contract: you send me disposable stuff I
dispose it, otherwise not.
Furthermore, this kind of lifecycle on "non top level objects" cannot be
delegated to the container. So James have to manually manage the
lifecycle of that objects (mails for example).
Can you explain me how it can work better with no "Disposable" interface?
[note to me: remember to change it to ContainerUtil.dispose(mail)]
> The use of lifecycle marker interfaces tries to improve the 'overall
> contract' of a class in a specific container environment on one hand but
> is hindering class reuse on the other hand.
I don't see how an interface limit an object in any way.
Can you tell me something you can do on the object not implementing
Disposable that you cannot do on the object implementing Disposable?
As you said, Disposable is a marker interface, you can think at it as
something similar to a marker annotation.
> On topic reflection:
> I really don't see why using reflection is a bad thing compared to the
> current cast-to-call invocation of Disposable. They seem more or less
> equivalent.
1) reflections reduce the code browsability.
2) if I use a third party object that implement a dispose method called
by itself in its own lifecycle and not intended to be called by me (or
the avalon container) I would do the wrong thing.
3) you can use reflections also with the Disposable interface there, but
you can't do the opposite.
> James currently already uses dynamic invocation, so this is no big deal,
> isn't it? (Or do you think that should be removed eventually?)
The fact that we already have possible bottlenecks is not a good reason
to introduce new ones :-)
Can you list the advantages of removing the Disposable interface?
Here is the only one I see:
1) reduce the size of James by 162bytes (the size of the
Disposable.class) + something like 40 bytes for each implementing
object. Maybe 2Kb in total.
Any other pro?
>>> for example, a container could be configured to call the dispose()
>>> method declarative where Avalon uses Disposable casts.
>>> pseudocode: <component class="X" onDestroy="dispose" />
>>> (while dispose calls from within James still use the
>>> ContainerUtils-approach.)
>>
>> We can do this without removing the Disposable interface.
>
> Probably, but it will always get in your way.
>
> Again, these are just thoughts to comparing the current approach to
> things Spring framework or XBean are doing. Everyone with its strengths
> and weaknesses.
I never read that Spring and XBean suggest to remove interfaces from
objects.
In fact I always thought that Spring/XBean and "current approach to
things" was programming against interfaces and "leave the reflection job
to the container".
> And, I'd still prefer to put a release out _before_ starting any
> branches for container replacement.
>
> Bernd
I agree.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Stefano Bagnara wrote:
> Bernd Fondermann wrote:
>
>> Stefano Bagnara wrote:
>>
>>> MailImpl objects have references to MimeMessageWrappers and are
>>> Disposable too. When we destroy MailImpls we call
>>> ContainerUtil.dispose(mail) or if you prefer we write this code:
>>> --
>>> if (mail instanceof Disposable) ((Disposable) mail).dispose();
>>> --
>>
>> [...]
>>
>>> 2) This kind of pattern is used in many places in James: btw, how
>>> would you change it?
>>
>>
>> one strategy would be to make the current indirection even more indirect:
>>
>> change ContainerUtils.dispose() so that it looks up a method dispose()
>> on the parameter object and calls it, instead of typecasting.
>>
>> then remove the Disposable interface from all James classes.
>
>
> IMHO this is a step in the wrong direction.
>
> The interface is not a limitation of James portability.
>
> I'm -1 on removing our working interfaces in favor of reflections. THis
> is not good programming. I'm against bad practice to follow the POJO
> religion.
>
mmhh. I am religiously against religion in programming, too. ;-)
Earlier you proposed to get rid of abstract discussions like POJO vs.
Avalon. At least, please don't put me in a corner. This is only for
discussion.
On the interface topic:
Some James code forensic:
Disposable declares one method with no arguments, dispose().
There is no single variable declared of type Disposable.
Instead, all current uses of Disposable are
if (obj instanceof Disposable) (Disposable) obj).dispose();
and could very well be replaced by ContainerUtil.dispose();
So, Disposable is a marker interface.
AFAIK, there is no enforcement of calling dispose() for Disposable
objects which are not handled by Avalon itself through a central
lifecycle handler or something alike.
Who knows if Disposable instances really are disposed? Or if the class I
am calling ContainerUtil.dispose() on is really disposable?
So all the interface says is: This class is ready/expecting to be
disposed. (Which is ok.)
But if you read: "This class will get disposed" you are on the wrong
track. The class contract would promise you something the application
can not hold.
Pls take a look at the instance variable
Mail mail
in SMTPHandler.
interface Mail extends Serializable, Cloneable (not Disposable)
SMTPHandler receives a Mail instance and at some point calls dispose().
But if it does not get a MailImpl (implementing Disposable) but some
other implementation (not implementing Disposable)?
Nothing happens. (Which is: bad things happen ;-) )
The use of lifecycle marker interfaces tries to improve the 'overall
contract' of a class in a specific container environment on one hand but
is hindering class reuse on the other hand.
On topic reflection:
I really don't see why using reflection is a bad thing compared to the
current cast-to-call invocation of Disposable. They seem more or less
equivalent.
James currently already uses dynamic invocation, so this is no big deal,
isn't it? (Or do you think that should be removed eventually?)
>> for example, a container could be configured to call the dispose()
>> method declarative where Avalon uses Disposable casts.
>> pseudocode: <component class="X" onDestroy="dispose" />
>> (while dispose calls from within James still use the
>> ContainerUtils-approach.)
>
> We can do this without removing the Disposable interface.
Probably, but it will always get in your way.
Again, these are just thoughts to comparing the current approach to
things Spring framework or XBean are doing. Everyone with its strengths
and weaknesses.
And, I'd still prefer to put a release out _before_ starting any
branches for container replacement.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann wrote:
> Stefano Bagnara wrote:
>> MailImpl objects have references to MimeMessageWrappers and are
>> Disposable too. When we destroy MailImpls we call
>> ContainerUtil.dispose(mail) or if you prefer we write this code:
>> --
>> if (mail instanceof Disposable) ((Disposable) mail).dispose();
>> --
> [...]
>> 2) This kind of pattern is used in many places in James: btw, how
>> would you change it?
>
> one strategy would be to make the current indirection even more indirect:
>
> change ContainerUtils.dispose() so that it looks up a method dispose()
> on the parameter object and calls it, instead of typecasting.
>
> then remove the Disposable interface from all James classes.
IMHO this is a step in the wrong direction.
The interface is not a limitation of James portability.
I'm -1 on removing our working interfaces in favor of reflections. THis
is not good programming. I'm against bad practice to follow the POJO
religion.
> should work quite well. but it of course fails for those dispose() calls
> from within Avalon which rely on the Disposable interface.
>
> (another approach would be proxying)
>
> --
>
> if this refactoring could be iterated over the code base the components
> could be more easily put in a different container because they are free
> from Avalon marker interfaces.
>
> for example, a container could be configured to call the dispose()
> method declarative where Avalon uses Disposable casts.
> pseudocode: <component class="X" onDestroy="dispose" />
> (while dispose calls from within James still use the
> ContainerUtils-approach.)
>
> Bernd
We can do this without removing the Disposable interface.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Stefano Bagnara wrote:
> Alan,
>
> I think that we should start by steps, and I'm sure we'll find a few
> problems in the first refactorings. Then we'll have some concrete things
> to talk about and to decide.
>
> Removing Avalon is like removing the "concurrency.jar" framework: it is
> a framework and not "container code". If you want to remove it you have
> to replace it with something else.
>
> One example:
>
> Disposable is an Avalon interface meaning the object has a "dispose()"
> method that should be called when disposing it.
>
> Our MimeMessageWrapper depends on this dispose() method being called.
>
> MailImpl objects have references to MimeMessageWrappers and are
> Disposable too. When we destroy MailImpls we call
> ContainerUtil.dispose(mail) or if you prefer we write this code:
> --
> if (mail instanceof Disposable) ((Disposable) mail).dispose();
> --
>
> To remove the Disposable interface you have 2 options:
> 1) clone the Disposable interface in a james package and keep the same
> behaviour code (change only the import)
> 2) change the whole behaviour/pattern used.
>
> That said, about the 2 solutions:
> 1) I'm currently AGAINST this code cloning: I don't get the advantages
> of cloning the avalon.jar code to the james sources. I would switch to
> custom interfaces ONLY if we need different interfaces.
> 2) This kind of pattern is used in many places in James: btw, how would
> you change it?
one strategy would be to make the current indirection even more indirect:
change ContainerUtils.dispose() so that it looks up a method dispose()
on the parameter object and calls it, instead of typecasting.
then remove the Disposable interface from all James classes.
should work quite well. but it of course fails for those dispose() calls
from within Avalon which rely on the Disposable interface.
(another approach would be proxying)
--
if this refactoring could be iterated over the code base the components
could be more easily put in a different container because they are free
from Avalon marker interfaces.
for example, a container could be configured to call the dispose()
method declarative where Avalon uses Disposable casts.
pseudocode: <component class="X" onDestroy="dispose" />
(while dispose calls from within James still use the
ContainerUtils-approach.)
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan,
I think that we should start by steps, and I'm sure we'll find a few
problems in the first refactorings. Then we'll have some concrete things
to talk about and to decide.
Removing Avalon is like removing the "concurrency.jar" framework: it is
a framework and not "container code". If you want to remove it you have
to replace it with something else.
One example:
Disposable is an Avalon interface meaning the object has a "dispose()"
method that should be called when disposing it.
Our MimeMessageWrapper depends on this dispose() method being called.
MailImpl objects have references to MimeMessageWrappers and are
Disposable too. When we destroy MailImpls we call
ContainerUtil.dispose(mail) or if you prefer we write this code:
--
if (mail instanceof Disposable) ((Disposable) mail).dispose();
--
To remove the Disposable interface you have 2 options:
1) clone the Disposable interface in a james package and keep the same
behaviour code (change only the import)
2) change the whole behaviour/pattern used.
That said, about the 2 solutions:
1) I'm currently AGAINST this code cloning: I don't get the advantages
of cloning the avalon.jar code to the james sources. I would switch to
custom interfaces ONLY if we need different interfaces.
2) This kind of pattern is used in many places in James: btw, how would
you change it?
If you want to find out where we use this pattern you should search for
"ContainerUtil" in James sourcecode.
ContainerUtil is an avalon utility that simply call the method only when
the object implements the given interface.
ContainerUtil.configure(Object object, Configuration config)
is the same as
if (object instanceof Configurable) {
object.configure(config);
}
The same for the other ContainerUtil methods.
Stefano
Alan D. Cabrera wrote:
> While my understanding as to the functionality of Avalon and Phoenix may
> not be accurate, I've had plenty of experience with embedding
> Avalon-ized servers and it has been horrible. Maybe it's the fault of
> of the projects that used it. I just would not want to subject the
> developers who want to embed James to the same thing I went through.
> Please take a look at OpenORB. Maybe they abused Avalon. Maybe, my
> wife says more likely, I didn't properly understand what's going on.
>
> I buy the concepts that you mention above. I'm not sure that we have to
> use Avalon to get the job done.
>
> I'm going to take your advice and start tinkering w/ James.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>>> We don't depend on the container itself.
>>> We don't have dependencies on phoenix in our code.
>>> We depend on the avalon-framework: think at it as a set of mostly
>>> interfaces and basic classes that helps starting up a new project (a
>>> common way to define things).
>> It's the last bit that I have an aversion to. We should have no
>> container specific code in James' core.
>
> I don't know what is your knowledge about avalon/phoenix.
>
> You can think at avalon like a set of interfaces. Avalon itself is not
> a container, but only a set of (good) interfaces to promote certain
> "patterns".
>
> James does not have container specific code in its core. In fact, the
> james code is build with no dependencies on phoenix.
> We just include the avalon interfaces.
>
> The fact that james objects implements interfaces should not be a
> limitation otherwise it would mean that we have to change our object
> to put them in a different container: this would mean that the new
> container has requirements and doesn't handle agnostic components.
>
> That said I'm +1 to remove the service locator pattern in favor of SDI
> and changing the way we configure components.
>
>>> The other depedencies excalibur+cornerstone jars are components, and
>>> provide services to our code: they are not imposed by the container
>>> but needed by our code.
>>
>> Sorry, my opinion has not been swayed. Please note that this is not
>> a commentary on they way Avalon has been architected. It's just that
>> I strongly believe that container specific code should not be in a
>> project's core code.
>
> Again, I don't understand if you say this things having a good
> knowledge of what avalon is and what phoenix is, or if you say this
> things only because you know XBean and you don't know Avalon. (people
> always reject things we don't know/understand)
>
>>>> I will restate my opinion that I mentioned in an earlier email.
>>>> IMO, if you must decide ahead of time what container to choose
>>>> before you start coding, that container is too invasive.
>>>
>>> We already have code. So to move to another container we HAVE TO
>>> write wiring/configuration data and unfortunately this is container
>>> specific.
>>
>> I don't think so. You do not have to move it to a specific
>> container. You can write simple POJOs then, in other jars, have
>> container specific adapters. If the container does not allow this
>> paradigm then, IMO, it is too invasive.
>
> Take a POJO, let it implement and interface: is it a POJO ? Can't POJO
> implement interfaces??
>
> James objects simply implements interfaces. The AbstractLogEnabled
> object we extends is really a simple object and we can move that in
> the james core, if this make you feel better. (Avalon is all about IoC)
>
>>> PS: please note that if you look at this archives I had the same
>>> identical ideas you're defending now, then I looked at and
>>> understood avalon and I now I think I was wrong.
>>
>> I refer the readers of this thread to my experiences embedding
>> OpenORB. I would be interested in hearing other peoples' experiences
>> embedding Avalon servers into existing non-Avalon servers.
>
> I think that Avalon itself is not a problem and removing it is only
> time lost if we don't have a good reason to remove it.
>
> There is no such thing "Avalon servers": there are "avalon compliant"
> objects. Phoenix is a server that handle "avalon compliant" objects.
>
> Btw, if you are working on Maven2 or Xbean around James I'm sure you
> will have a better understanding of james soon, and we can continue
> this interesting thread with more "concrete" facts and less "pojo"
> words :-)
While my understanding as to the functionality of Avalon and Phoenix may
not be accurate, I've had plenty of experience with embedding
Avalon-ized servers and it has been horrible. Maybe it's the fault of
of the projects that used it. I just would not want to subject the
developers who want to embed James to the same thing I went through.
Please take a look at OpenORB. Maybe they abused Avalon. Maybe, my
wife says more likely, I didn't properly understand what's going on.
I buy the concepts that you mention above. I'm not sure that we have to
use Avalon to get the job done.
I'm going to take your advice and start tinkering w/ James.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
>> We don't depend on the container itself.
>> We don't have dependencies on phoenix in our code.
>> We depend on the avalon-framework: think at it as a set of mostly
>> interfaces and basic classes that helps starting up a new project (a
>> common way to define things).
> It's the last bit that I have an aversion to. We should have no
> container specific code in James' core.
I don't know what is your knowledge about avalon/phoenix.
You can think at avalon like a set of interfaces. Avalon itself is not a
container, but only a set of (good) interfaces to promote certain
"patterns".
James does not have container specific code in its core. In fact, the
james code is build with no dependencies on phoenix.
We just include the avalon interfaces.
The fact that james objects implements interfaces should not be a
limitation otherwise it would mean that we have to change our object to
put them in a different container: this would mean that the new
container has requirements and doesn't handle agnostic components.
That said I'm +1 to remove the service locator pattern in favor of SDI
and changing the way we configure components.
>> The other depedencies excalibur+cornerstone jars are components, and
>> provide services to our code: they are not imposed by the container
>> but needed by our code.
>
> Sorry, my opinion has not been swayed. Please note that this is not a
> commentary on they way Avalon has been architected. It's just that I
> strongly believe that container specific code should not be in a
> project's core code.
Again, I don't understand if you say this things having a good knowledge
of what avalon is and what phoenix is, or if you say this things only
because you know XBean and you don't know Avalon. (people always reject
things we don't know/understand)
>>> I will restate my opinion that I mentioned in an earlier email. IMO,
>>> if you must decide ahead of time what container to choose before you
>>> start coding, that container is too invasive.
>>
>> We already have code. So to move to another container we HAVE TO write
>> wiring/configuration data and unfortunately this is container specific.
>
> I don't think so. You do not have to move it to a specific container.
> You can write simple POJOs then, in other jars, have container specific
> adapters. If the container does not allow this paradigm then, IMO, it
> is too invasive.
Take a POJO, let it implement and interface: is it a POJO ? Can't POJO
implement interfaces??
James objects simply implements interfaces. The AbstractLogEnabled
object we extends is really a simple object and we can move that in the
james core, if this make you feel better. (Avalon is all about IoC)
>> PS: please note that if you look at this archives I had the same
>> identical ideas you're defending now, then I looked at and understood
>> avalon and I now I think I was wrong.
>
> I refer the readers of this thread to my experiences embedding OpenORB.
> I would be interested in hearing other peoples' experiences embedding
> Avalon servers into existing non-Avalon servers.
I think that Avalon itself is not a problem and removing it is only time
lost if we don't have a good reason to remove it.
There is no such thing "Avalon servers": there are "avalon compliant"
objects. Phoenix is a server that handle "avalon compliant" objects.
Btw, if you are working on Maven2 or Xbean around James I'm sure you
will have a better understanding of james soon, and we can continue this
interesting thread with more "concrete" facts and less "pojo" words :-)
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>> Bernd Fondermann wrote:
>>> Stefano Bagnara wrote:
>>>
>>>> I currently don't have an opinion on what it is better for us
>>>> between j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I
>>>> think that we should choose one. This is way I'm really interested
>>>> in pro/cons of XBean.
>>>
>>> AFAIK, XBean is to become the 'next generation core' for Geronimo
>>> (can't find the thread over on geron-dev ATM).
>>
>> I want to add some color to this particular thread. Getting James
>> ready for XBean will make it totally container agnostic in that it
>> will not be dependent on any XBean code. What we will have are,
>> literally, POJOs that can be wired together by hand, if desired. The
>> beauty of this is that people can use and embed James w/out dragging
>> in the pantheon of server container jar dependencies that it
>> currently requires.
>
> We don't depend on the container itself.
> We don't have dependencies on phoenix in our code.
> We depend on the avalon-framework: think at it as a set of mostly
> interfaces and basic classes that helps starting up a new project (a
> common way to define things).
It's the last bit that I have an aversion to. We should have no
container specific code in James' core.
>
> This is the same thing as ant vs maven2: maven2 power is because it
> standardize the way you handle a project.
> Well, IMHO, Avalon:POJO is like Maven2:ant. Just think to them as a
> core of James. We could have written our own
> org.apache.james.Startable interface but we preferred to use an
> already existing org.apache.avalon.framework.activity.Startable
> interface already existing.
>
> I invite you to look at the avalon-framework-api-4.3.jar contents and
> what interfaces are declared in that jar. I think this could help this
> conversation.
>
> The other depedencies excalibur+cornerstone jars are components, and
> provide services to our code: they are not imposed by the container
> but needed by our code.
Sorry, my opinion has not been swayed. Please note that this is not a
commentary on they way Avalon has been architected. It's just that I
strongly believe that container specific code should not be in a
project's core code.
>
>> I will restate my opinion that I mentioned in an earlier email. IMO,
>> if you must decide ahead of time what container to choose before you
>> start coding, that container is too invasive.
>
> We already have code. So to move to another container we HAVE TO write
> wiring/configuration data and unfortunately this is container specific.
I don't think so. You do not have to move it to a specific container.
You can write simple POJOs then, in other jars, have container specific
adapters. If the container does not allow this paradigm then, IMO, it
is too invasive.
>
> Stefano
>
> PS: please note that if you look at this archives I had the same
> identical ideas you're defending now, then I looked at and understood
> avalon and I now I think I was wrong.
I refer the readers of this thread to my experiences embedding OpenORB.
I would be interested in hearing other peoples' experiences embedding
Avalon servers into existing non-Avalon servers.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
> Bernd Fondermann wrote:
>> Stefano Bagnara wrote:
>>
>>> I currently don't have an opinion on what it is better for us between
>>> j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I think
>>> that we should choose one. This is way I'm really interested in
>>> pro/cons of XBean.
>>
>> AFAIK, XBean is to become the 'next generation core' for Geronimo
>> (can't find the thread over on geron-dev ATM).
>
> I want to add some color to this particular thread. Getting James ready
> for XBean will make it totally container agnostic in that it will not be
> dependent on any XBean code. What we will have are, literally, POJOs
> that can be wired together by hand, if desired. The beauty of this is
> that people can use and embed James w/out dragging in the pantheon of
> server container jar dependencies that it currently requires.
We don't depend on the container itself.
We don't have dependencies on phoenix in our code.
We depend on the avalon-framework: think at it as a set of mostly
interfaces and basic classes that helps starting up a new project (a
common way to define things).
This is the same thing as ant vs maven2: maven2 power is because it
standardize the way you handle a project.
Well, IMHO, Avalon:POJO is like Maven2:ant. Just think to them as a core
of James. We could have written our own org.apache.james.Startable
interface but we preferred to use an already existing
org.apache.avalon.framework.activity.Startable interface already existing.
I invite you to look at the avalon-framework-api-4.3.jar contents and
what interfaces are declared in that jar. I think this could help this
conversation.
The other depedencies excalibur+cornerstone jars are components, and
provide services to our code: they are not imposed by the container but
needed by our code.
> I will restate my opinion that I mentioned in an earlier email. IMO, if
> you must decide ahead of time what container to choose before you start
> coding, that container is too invasive.
We already have code. So to move to another container we HAVE TO write
wiring/configuration data and unfortunately this is container specific.
Stefano
PS: please note that if you look at this archives I had the same
identical ideas you're defending now, then I looked at and understood
avalon and I now I think I was wrong.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Bernd Fondermann wrote:
> Stefano Bagnara wrote:
>
>> I currently don't have an opinion on what it is better for us between
>> j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I think
>> that we should choose one. This is way I'm really interested in
>> pro/cons of XBean.
>
> AFAIK, XBean is to become the 'next generation core' for Geronimo
> (can't find the thread over on geron-dev ATM).
I want to add some color to this particular thread. Getting James ready
for XBean will make it totally container agnostic in that it will not be
dependent on any XBean code. What we will have are, literally, POJOs
that can be wired together by hand, if desired. The beauty of this is
that people can use and embed James w/out dragging in the pantheon of
server container jar dependencies that it currently requires.
I will restate my opinion that I mentioned in an earlier email. IMO, if
you must decide ahead of time what container to choose before you start
coding, that container is too invasive.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann wrote:
> by just moving the codebase into the project? what would that change?
> in my understanding, a class implementing container-specific lifecycle
> interfaces like Servicable, Configurable, etc. is not a plain POJO anymore.
You could think to Startable, Disposable, Configureable as our own
interfaces. You can ignore those interfaces if you prefer to declare
that informations in xml files: you're not tied to the interfaces.
>> IMHO we should find a way to run our avalon based components in a
>> non-avalon container (remove Phoenix). Then we can also remove avalon,
>> but I don't think this would be a big step forward.
>
> maybe its not a very big step in terms of code-changes. but it is in
> terms of QA and testing (unless you have full unit test coverage). you
> pull away the base and replace with something else. that sounds like
> quite a bit could break here.
I agree, but we have this issue with every single step towards pojos, so
this is not an input variable in my considerations.
>> Eventually we could change the way "Serviceable" works now to remove
>> the Service Locator part of the Avalon framework by creating
>> specialized "Interfaces/Setter/Constructor parameters" for every james
>> component. I tend to think that Serviceable is the only thing our
>> components use that most container would not handle in a clean way. It
>> could be solved by publishing the Avalon ServiceManager as a component
>> but we would loose the wiring capabilities of the new container.
>
> In James, the whole component lifecycle including configuration is
> closely interwoven with the application-specific logic.
>
> this is not a bad thing, but it makes the task of changing the container
> more difficult.
I would like to see real world example on how to change a few James
classes so that we can change container without writing full length
configuration files and/or specific adapters/wrappers.
IMHO we should not fall in the Utopia of a POJO world: if you remove
wiring/configuration/logging/workflow/lifecycle from classes you have to
add the same information in container specific configuration files.
Sometime is faster to port to different containers applications with
much hardcoded behaviour/wiring than application with great granularity
of the components and big container configuration files.
IMHO porting container configurations is not easier than refactoring
java classes.
>> One more thing: I don't think that the "let's make POJOs and ship with
>> any container" is a winning strategy. In fact when you have POJOs
>> there is a lot of work to do to create container specific
>> configurations and I don't think that we'll ever ship james with more
>> that one container choice.
>
> yes, i agree. but look at Tomcat: it's a very mature stand-alone server
> and a highly embeddable servlet container. this is something I fancy a
> lot for James -- just dreaming... ;-)
Tomcat is an "highly embeddable servlet container", yes, but I don't get
the point. Embeddable doesn't mean that you can wire tomcat components
using different containers: it simply means that you can embed the whole
tomcat into other systems. This is easier and doesn't need POJOs.
There are embeddable avalon containers around (fortress), but I don't
think the main goal is to improve embeddability.
>> I currently don't have an opinion on what it is better for us between
>> j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I think that
>> we should choose one. This is way I'm really interested in pro/cons of
>> XBean.
>
> AFAIK, XBean is to become the 'next generation core' for Geronimo (can't
> find the thread over on geron-dev ATM).
I read only 3 messages in the geronimo list, but I think this has not
been voted yet. They simply voted to accept the XBean codebase. They
could never use it.
>> A server container is much more than dependency management/component
>> wiring: component monitoring/management (JMX), logging services,
>> configuration (and re-configuration) services, component
>> deploy/undeploy, datasource/jdbcpool management, and more. All of this
>> are "Container Specific" and not "James Specific" but are part of the
>> final James distribution.
>
> yeah, and probably improving all that is more user-friendly than
> changing containers ;-).
> but nevertheless, to make 'the whole James framework' more lean, more
> testable, would help the project to improve its codebase. If this
> requires a container change, someone of the modern containers would do
> it, I reckon.
I don't uderstand what do you mean with "more testable": James is all
about IoC and you can test every component by assembly it the way you
prefer.
What kind of test you would be able to write with objects not extending
AbstractLogEnabled?
I really don't understand this point.
The tests you provided are the proof that James is testable. You did a
good job understanding what the dependencies between components was, and
providing mock implementations for that dependencies.
The main problem with tests is, IMHO, the multithreaded/multitier nature
of the server itself.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Stefano Bagnara wrote:
> Bernd Fondermann wrote:
>
>> for example the parent class hiearchie for core components like
>> org.apache.james.James is based on classes like
>> org.apache.avalon.framework.logger.LogEnabled.
>>
>> LogEnabled provides functionality for what is called an 'aspect'
>> today. modern IoC frameworks weave those aspects into the components
>> by 'crosscutting' them - the component has no direct notion of it
>> happening.
>>
>> this and similar refactoring steps would make James components much
>> more POJOs and thus more easily portable into new containers.
>>
>> Bernd
>
>
> AbstractLogEnabled is not a special class. Most james components already
> are POJOs: they simply implements interfaces that declare the
> dependencies (Interface injection). This is not so different from the
> Settern Injection IOC style.
its not so very different (both is 'inversion of control') but it is
different. interface injection and subclassing has the downside of
making unit testing much more difficult.
>
> The fact that we extends from an AbstractLogEnabled class doesn't make
> them special classes: we can simply repackage the AbstractLogEnabled
> from avalon to james and the dependency declaration interfaces from
> avalon to james and they are pojos.
by just moving the codebase into the project? what would that change?
in my understanding, a class implementing container-specific lifecycle
interfaces like Servicable, Configurable, etc. is not a plain POJO anymore.
> You can safely ignore their interfaces if you add the needed code to
> manually assembly the components in another container.
>
> The problem with POJOification of James is not the LogEnabled interface
> or the AbstractLogEnabled abstract class.
>
> IMHO we should find a way to run our avalon based components in a
> non-avalon container (remove Phoenix). Then we can also remove avalon,
> but I don't think this would be a big step forward.
maybe its not a very big step in terms of code-changes. but it is in
terms of QA and testing (unless you have full unit test coverage). you
pull away the base and replace with something else. that sounds like
quite a bit could break here.
(by the way, this was the original motivation behind me getting into
unit testing and end-to-end testing. first things first.)
>
> Phoenix is old and unsupported code and we should get rid of it.
>
> Avalon is a good set of "standard" interfaces that help standardizing a
> set of components. If we remove the Avalon "startable" interface we'll
> need to add a new convention or declare the call of the start() method
> in the container way.
>
> Eventually we could change the way "Serviceable" works now to remove the
> Service Locator part of the Avalon framework by creating specialized
> "Interfaces/Setter/Constructor parameters" for every james component. I
> tend to think that Serviceable is the only thing our components use that
> most container would not handle in a clean way. It could be solved by
> publishing the Avalon ServiceManager as a component but we would loose
> the wiring capabilities of the new container.
In James, the whole component lifecycle including configuration is
closely interwoven with the application-specific logic.
this is not a bad thing, but it makes the task of changing the container
more difficult.
>
> One more thing: I don't think that the "let's make POJOs and ship with
> any container" is a winning strategy. In fact when you have POJOs there
> is a lot of work to do to create container specific configurations and I
> don't think that we'll ever ship james with more that one container choice.
yes, i agree. but look at Tomcat: it's a very mature stand-alone server
and a highly embeddable servlet container. this is something I fancy a
lot for James -- just dreaming... ;-)
> I currently don't have an opinion on what it is better for us between
> j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I think that
> we should choose one. This is way I'm really interested in pro/cons of
> XBean.
AFAIK, XBean is to become the 'next generation core' for Geronimo (can't
find the thread over on geron-dev ATM).
>
> A server container is much more than dependency management/component
> wiring: component monitoring/management (JMX), logging services,
> configuration (and re-configuration) services, component
> deploy/undeploy, datasource/jdbcpool management, and more. All of this
> are "Container Specific" and not "James Specific" but are part of the
> final James distribution.
yeah, and probably improving all that is more user-friendly than
changing containers ;-).
but nevertheless, to make 'the whole James framework' more lean, more
testable, would help the project to improve its codebase. If this
requires a container change, someone of the modern containers would do
it, I reckon.
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Bernd Fondermann wrote:
>> I've just downloaded sources from here:
>> http://svn.xbean.org/trunk/
>> Is this the current official/updated repository? I see no changes
>> after february.
>
> that must have been the point in time where xbean moved to Apache
> Geronimo and disappeared from the Codehaus projects list.
>
> see: http://issues.apache.org/jira/browse/GERONIMO-1478
>
> you can check it out from G's SVN. but the source code seems to be the
> only thing you get.
Ok, I saw that.
I can't find messages/documentation on the integration plans between
XBean and Geronimo. I would like to read more about this.
I also don't understand what projects are currently using XBean or what
server components have been supported by writing wrappers on XBean.
> wouldn't it be best to POJO-fy _first_ without a specific container in
> mind (a larger task on its own) and then afterwards look at all the
> mature containers to integrate with?
>
> for example the parent class hiearchie for core components like
> org.apache.james.James is based on classes like
> org.apache.avalon.framework.logger.LogEnabled.
>
> LogEnabled provides functionality for what is called an 'aspect' today.
> modern IoC frameworks weave those aspects into the components by
> 'crosscutting' them - the component has no direct notion of it happening.
>
> this and similar refactoring steps would make James components much more
> POJOs and thus more easily portable into new containers.
>
> Bernd
AbstractLogEnabled is not a special class. Most james components already
are POJOs: they simply implements interfaces that declare the
dependencies (Interface injection). This is not so different from the
Settern Injection IOC style.
The fact that we extends from an AbstractLogEnabled class doesn't make
them special classes: we can simply repackage the AbstractLogEnabled
from avalon to james and the dependency declaration interfaces from
avalon to james and they are pojos.
You can safely ignore their interfaces if you add the needed code to
manually assembly the components in another container.
The problem with POJOification of James is not the LogEnabled interface
or the AbstractLogEnabled abstract class.
IMHO we should find a way to run our avalon based components in a
non-avalon container (remove Phoenix). Then we can also remove avalon,
but I don't think this would be a big step forward.
Phoenix is old and unsupported code and we should get rid of it.
Avalon is a good set of "standard" interfaces that help standardizing a
set of components. If we remove the Avalon "startable" interface we'll
need to add a new convention or declare the call of the start() method
in the container way.
Eventually we could change the way "Serviceable" works now to remove the
Service Locator part of the Avalon framework by creating specialized
"Interfaces/Setter/Constructor parameters" for every james component. I
tend to think that Serviceable is the only thing our components use that
most container would not handle in a clean way. It could be solved by
publishing the Avalon ServiceManager as a component but we would loose
the wiring capabilities of the new container.
One more thing: I don't think that the "let's make POJOs and ship with
any container" is a winning strategy. In fact when you have POJOs there
is a lot of work to do to create container specific configurations and I
don't think that we'll ever ship james with more that one container choice.
I currently don't have an opinion on what it is better for us between
j2ee, OSGi, XBean, Phoenix, <put what you want here>, but I think that
we should choose one. This is way I'm really interested in pro/cons of
XBean. I have a good knowledge of J2EE and Phoenix and I think Phoenix
is better to James than J2EE, but, as I already said, I think that
phenix is not actively supported and we should move forward. I still
consider other Avalon containers an option: unfortunately there are no
complete/updated/supported avalon containers around.
A server container is much more than dependency management/component
wiring: component monitoring/management (JMX), logging services,
configuration (and re-configuration) services, component
deploy/undeploy, datasource/jdbcpool management, and more. All of this
are "Container Specific" and not "James Specific" but are part of the
final James distribution.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>
> I can't find many informations about what xbean-kernel is and
> xbean-server is, how to use them, and more.
>
> I've just downloaded sources from here:
> http://svn.xbean.org/trunk/
> Is this the current official/updated repository? I see no changes after
> february.
that must have been the point in time where xbean moved to Apache
Geronimo and disappeared from the Codehaus projects list.
see: http://issues.apache.org/jira/browse/GERONIMO-1478
you can check it out from G's SVN. but the source code seems to be the
only thing you get.
wouldn't it be best to POJO-fy _first_ without a specific container in
mind (a larger task on its own) and then afterwards look at all the
mature containers to integrate with?
for example the parent class hiearchie for core components like
org.apache.james.James is based on classes like
org.apache.avalon.framework.logger.LogEnabled.
LogEnabled provides functionality for what is called an 'aspect' today.
modern IoC frameworks weave those aspects into the components by
'crosscutting' them - the component has no direct notion of it happening.
this and similar refactoring steps would make James components much more
POJOs and thus more easily portable into new containers.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
I'm all for starting maven2 first. Others have found the current Ant
system obtuse. It would be good to start fresh and clean.
We can kill two birds w/ one stone? Why not make the new server branch
an m2 branch. We keep the Avalon interfaces and, if we did it right, we
can drop the jar into a Phoenix container.
Regards,
Alan
Stefano Bagnara wrote:
> The best place would be a james-server specific branch.
>
> I would prefer if you start from the maven2 thing. Having branches
> with different project structure from the trunk is not a good thing.
>
> IMHO if we start pojo/xbean branch it would mean leave maven2 behind.
>
> So, my idea is:
> 1) let's evaluate the maven2 port and vote on its adoption.
> 2) After the vote we can safely start refactorings in branches.
>
> Stefano
>
> Alan D. Cabrera wrote:
>>> I insist that pojoification itself is "almost meaningless" and
>>> utopistic: we should discuss on the real steps that each one would
>>> include in a concrete roadmap.
>>> If we intend to discuss this now, we should start a new thread ;-)
>>
>> A new thread, agreed. But let me say this. A picture is worth a
>> thousand words and in our domain, that's code. I think that a
>> sandbox w/ some sample "conversions" would facilitate discussions.
>> I'm happy to host those samples in the xbean sandbox. I'm happy to
>> have them hosted else where. Thoughts?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
The best place would be a james-server specific branch.
I would prefer if you start from the maven2 thing. Having branches with
different project structure from the trunk is not a good thing.
IMHO if we start pojo/xbean branch it would mean leave maven2 behind.
So, my idea is:
1) let's evaluate the maven2 port and vote on its adoption.
2) After the vote we can safely start refactorings in branches.
Stefano
Alan D. Cabrera wrote:
>> I insist that pojoification itself is "almost meaningless" and
>> utopistic: we should discuss on the real steps that each one would
>> include in a concrete roadmap.
>> If we intend to discuss this now, we should start a new thread ;-)
>
> A new thread, agreed. But let me say this. A picture is worth a
> thousand words and in our domain, that's code. I think that a sandbox
> w/ some sample "conversions" would facilitate discussions. I'm happy to
> host those samples in the xbean sandbox. I'm happy to have them hosted
> else where. Thoughts?
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>>> Can XBean split the configuration in 2 multiple files?
>>> We currently have assembly.xml to declare how the component
>>> dependencies/wiring and config.xml to fill in configurations for
>>> that components.
>>
>> I don't think so. I've had some experience w/ having deps and
>> configs in separate files and it has not been pretty. I've always
>> liked having the whole gestalt, right there in front of me.
>
> We have non-programmer users: they only change the config.xml and they
> probably never look at the assembly.xml. Only advanced users and
> mainly developers will change the assembly.
>
> I think we should keep this separation, but, at the moment, I only
> would like to know wether we can keep this separation or not.
Good point. I am now of the same opinion as you. We can support this
scenario separation of assembly and configuration.
>
>>> Phoenix currently provide this services to James:
>>> 1) Lifecycle (start / dispose / stop)
>>> 2) Dependency management (Service wiring)
>>> 3) Centralized Services configuration
>>> 4) Centralized Logging management
>>> 5) Multiple James instances in a single JVM
>>>
>>> Does XBean provide all of this?
>>
>> 1) Yes
>> 2) Yes
>> 3) Yes, I think. Can you explain in detail?
>
> Phoenix provide this functionality:
> in assembly.xml you declare and wire components and dependencies.
> The components are then configured in a centralized configuration file
> names config.xml where you have <component-name>component
> configuration</component-name> sections.
Yes, this can be supported.
>
>> 4) No, thank goodness. Not that logging isn't critical. I like the
>> fact that XBean stays focused on a single area and doesn't try to be
>> the Swiss Army knife of server software. JMHO.
>
> I think that we can deploy a logger service and let other components
> depend on this logger service, is this correct?
> Phoenix already provide a good logger service, we could port it, or
> switch to another logging service (IIRC there is a log4j adapter that
> expose log4j as an Avalon Logger, and this would work with no code
> change)
I am just adverse to putting container specific code into the James core
code.
>> 5) Yes
>>
>>> [...]
>>> If you expect any of this to be included in the official James
>>> distribution we should split the conversation for each change (XBean
>>> / Maven2) and analyze the pros/cons of the change proposed and vote
>>> about this.
>>
>> I'm going to work in teeney steps anyway. I think that I'll probably
>> convert to Maven 2. This will help me understand James' setup and
>> architecture.
>
> I'm happy for this choice because I'm really interested in maven2 and
> I think this is a more clear task than pojoification.
>
> I insist that pojoification itself is "almost meaningless" and
> utopistic: we should discuss on the real steps that each one would
> include in a concrete roadmap.
> If we intend to discuss this now, we should start a new thread ;-)
A new thread, agreed. But let me say this. A picture is worth a
thousand words and in our domain, that's code. I think that a sandbox
w/ some sample "conversions" would facilitate discussions. I'm happy to
host those samples in the xbean sandbox. I'm happy to have them hosted
else where. Thoughts?
>
>>> Stefano
>>>
>>> PS: Would the usage of Maven2 simplify the introduction of an
>>> installer similar to the one used in the Apache Directory project
>>> (InnoSetup)? I think James windows distribution should have a
>>> similar installer/service wrapper.
>>
>> Geronimo has an installer that is built using Maven 2. I don't know
>> too much about it.
>
> It seems they have removed the installer before the 1.0 final. I
> downloaded genorimo but I can't see the installer. It comes as a zip
> or tar.gz. I see an M4 distribution as "installer".
>
> I, instead, downloaded apache directory sources and from a *really*
> fast review it seems that it should not be a difficult task to port
> their installer to another maven2 "server" project.
Cool. How shall we proceed w/ the maven 2 effort? Should we convert a
teeny bit in a sandbox and let people throw darts at it?
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
>> Can XBean split the configuration in 2 multiple files?
>> We currently have assembly.xml to declare how the component
>> dependencies/wiring and config.xml to fill in configurations for that
>> components.
>
> I don't think so. I've had some experience w/ having deps and configs
> in separate files and it has not been pretty. I've always liked having
> the whole gestalt, right there in front of me.
We have non-programmer users: they only change the config.xml and they
probably never look at the assembly.xml. Only advanced users and mainly
developers will change the assembly.
I think we should keep this separation, but, at the moment, I only would
like to know wether we can keep this separation or not.
>> Phoenix currently provide this services to James:
>> 1) Lifecycle (start / dispose / stop)
>> 2) Dependency management (Service wiring)
>> 3) Centralized Services configuration
>> 4) Centralized Logging management
>> 5) Multiple James instances in a single JVM
>>
>> Does XBean provide all of this?
>
> 1) Yes
> 2) Yes
> 3) Yes, I think. Can you explain in detail?
Phoenix provide this functionality:
in assembly.xml you declare and wire components and dependencies.
The components are then configured in a centralized configuration file
names config.xml where you have <component-name>component
configuration</component-name> sections.
> 4) No, thank goodness. Not that logging isn't critical. I like the
> fact that XBean stays focused on a single area and doesn't try to be the
> Swiss Army knife of server software. JMHO.
I think that we can deploy a logger service and let other components
depend on this logger service, is this correct?
Phoenix already provide a good logger service, we could port it, or
switch to another logging service (IIRC there is a log4j adapter that
expose log4j as an Avalon Logger, and this would work with no code change)
> 5) Yes
>
>> [...]
>> If you expect any of this to be included in the official James
>> distribution we should split the conversation for each change (XBean /
>> Maven2) and analyze the pros/cons of the change proposed and vote
>> about this.
>
> I'm going to work in teeney steps anyway. I think that I'll probably
> convert to Maven 2. This will help me understand James' setup and
> architecture.
I'm happy for this choice because I'm really interested in maven2 and I
think this is a more clear task than pojoification.
I insist that pojoification itself is "almost meaningless" and
utopistic: we should discuss on the real steps that each one would
include in a concrete roadmap.
If we intend to discuss this now, we should start a new thread ;-)
>> Stefano
>>
>> PS: Would the usage of Maven2 simplify the introduction of an
>> installer similar to the one used in the Apache Directory project
>> (InnoSetup)? I think James windows distribution should have a similar
>> installer/service wrapper.
>
> Geronimo has an installer that is built using Maven 2. I don't know too
> much about it.
It seems they have removed the installer before the 1.0 final. I
downloaded genorimo but I can't see the installer. It comes as a zip or
tar.gz. I see an M4 distribution as "installer".
I, instead, downloaded apache directory sources and from a *really* fast
review it seems that it should not be a difficult task to port their
installer to another maven2 "server" project.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote:
> Alan D. Cabrera wrote:
>
> Can XBean split the configuration in 2 multiple files?
> We currently have assembly.xml to declare how the component
> dependencies/wiring and config.xml to fill in configurations for that
> components.
I don't think so. I've had some experience w/ having deps and configs
in separate files and it has not been pretty. I've always liked having
the whole gestalt, right there in front of me.
>>> I can't find much docs/informations about it.
>>
>> http://www.xbean.org/Home has some info.
>
> I can't find many informations about what xbean-kernel is and
> xbean-server is, how to use them, and more.
>
> I've just downloaded sources from here:
> http://svn.xbean.org/trunk/
> Is this the current official/updated repository? I see no changes
> after february.
It moved to Geronimo.
>
> Phoenix currently provide this services to James:
> 1) Lifecycle (start / dispose / stop)
> 2) Dependency management (Service wiring)
> 3) Centralized Services configuration
> 4) Centralized Logging management
> 5) Multiple James instances in a single JVM
>
> Does XBean provide all of this?
1) Yes
2) Yes
3) Yes, I think. Can you explain in detail?
4) No, thank goodness. Not that logging isn't critical. I like the
fact that XBean stays focused on a single area and doesn't try to be the
Swiss Army knife of server software. JMHO.
5) Yes
>>> I would like to have more informations on XBeans and your plan and
>>> know the opinion of the James PMC about maven2 and xbeans before to
>>> tell my preference on the sandbox location.
>>
>> Cool. It seems like there are three efforts that we are discussing.
>> XBean, Maven 2, and cornerstone conversion.
>
> If you're going to try any of those steps anyway then we just need to
> discuss (vote) wether give you repository access to work on a public
> sandbox.
>
> If you expect any of this to be included in the official James
> distribution we should split the conversation for each change (XBean /
> Maven2) and analyze the pros/cons of the change proposed and vote
> about this.
I'm going to work in teeney steps anyway. I think that I'll probably
convert to Maven 2. This will help me understand James' setup and
architecture.
>
> Stefano
>
> PS: Would the usage of Maven2 simplify the introduction of an
> installer similar to the one used in the Apache Directory project
> (InnoSetup)? I think James windows distribution should have a similar
> installer/service wrapper.
>
Geronimo has an installer that is built using Maven 2. I don't know too
much about it.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
> Stefano Bagnara wrote, On 4/5/2006 3:19 PM:
>> What type of IOC is used by XBeans ?
>> Is it based on the Service Locator pattern like Avalon or Dependency
>> Injection? In the latter case, what DI type? Constructor, Setter or
>> Interface injection?
>
> Constructor and Setter DI.
Currently James components uses a mix of Service Locator and Interface
injection.
In fact the "Service locator" pattern is activated by "Interface
injection" by the "Serviceable" interface that provide a
"ServiceManager" that provide dependencies lookup.
Lifecycle, Configuration, Logging and Context are provided via Interface
Injection to components implementing the specific interfaces (Startable,
Disposable, Configurable, LogEnabled, Contextualizable, etc)
>> How is the assembly declared? XML / Naming conventions / Annotations /
>> Other?
>
> XML
Can XBean split the configuration in 2 multiple files?
We currently have assembly.xml to declare how the component
dependencies/wiring and config.xml to fill in configurations for that
components.
>> I can't find much docs/informations about it.
>
> http://www.xbean.org/Home has some info.
I can't find many informations about what xbean-kernel is and
xbean-server is, how to use them, and more.
I've just downloaded sources from here:
http://svn.xbean.org/trunk/
Is this the current official/updated repository? I see no changes after
february.
Phoenix currently provide this services to James:
1) Lifecycle (start / dispose / stop)
2) Dependency management (Service wiring)
3) Centralized Services configuration
4) Centralized Logging management
5) Multiple James instances in a single JVM
Does XBean provide all of this?
>> I would like to have more informations on XBeans and your plan and
>> know the opinion of the James PMC about maven2 and xbeans before to
>> tell my preference on the sandbox location.
>
> Cool. It seems like there are three efforts that we are discussing.
> XBean, Maven 2, and cornerstone conversion.
If you're going to try any of those steps anyway then we just need to
discuss (vote) wether give you repository access to work on a public
sandbox.
If you expect any of this to be included in the official James
distribution we should split the conversation for each change (XBean /
Maven2) and analyze the pros/cons of the change proposed and vote about
this.
Stefano
PS: Would the usage of Maven2 simplify the introduction of an installer
similar to the one used in the Apache Directory project (InnoSetup)? I
think James windows distribution should have a similar installer/service
wrapper.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Alan D. Cabrera wrote, On 4/6/2006 8:52 AM:
> Stefano Bagnara wrote, On 4/5/2006 3:19 PM:
>
>> Alan D. Cabrera wrote:
>>
>>> I think that what the work will entail is POJO-ifying James. XBean
>>> is just a way of stitching the POJOs in an IOC type of way. I think
>>> that one could add some OSGi adapters on top, if one wanted to. The
>>> nice thing about this way of organization is that one does not have
>>> to use OSGi if one doesn't want to.
>>
>>
>>
>> What type of IOC is used by XBeans ?
>> Is it based on the Service Locator pattern like Avalon or Dependency
>> Injection? In the latter case, what DI type? Constructor, Setter or
>> Interface injection?
>
>
>
> Constructor and Setter DI.
>
>> How is the assembly declared? XML / Naming conventions / Annotations
>> / Other?
>
>
> XML
and annotations, if you want but it's not necessary.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote, On 4/5/2006 3:19 PM:
> Alan D. Cabrera wrote:
>
>> I think that what the work will entail is POJO-ifying James. XBean
>> is just a way of stitching the POJOs in an IOC type of way. I think
>> that one could add some OSGi adapters on top, if one wanted to. The
>> nice thing about this way of organization is that one does not have
>> to use OSGi if one doesn't want to.
>
>
> What type of IOC is used by XBeans ?
> Is it based on the Service Locator pattern like Avalon or Dependency
> Injection? In the latter case, what DI type? Constructor, Setter or
> Interface injection?
Constructor and Setter DI.
> How is the assembly declared? XML / Naming conventions / Annotations /
> Other?
XML
>
> I can't find much docs/informations about it.
http://www.xbean.org/Home has some info.
>>> I don't think there is a way to give you access to a branch or a
>>> particular folder of the james subversion repository.
>>>
>>> Maybe you should start working in your local sandbox and eventually
>>> add a jira issue where submit your work for review.
>>
>>
>> No worries. Maybe I should do the work in a Geronimo sandbox then?
>
>
> I would like to have more informations on XBeans and your plan and
> know the opinion of the James PMC about maven2 and xbeans before to
> tell my preference on the sandbox location.
Cool. It seems like there are three efforts that we are discussing.
XBean, Maven 2, and cornerstone conversion.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan D. Cabrera wrote:
> I think that what the work will entail is POJO-ifying James. XBean is
> just a way of stitching the POJOs in an IOC type of way. I think that
> one could add some OSGi adapters on top, if one wanted to. The nice
> thing about this way of organization is that one does not have to use
> OSGi if one doesn't want to.
What type of IOC is used by XBeans ?
Is it based on the Service Locator pattern like Avalon or Dependency
Injection? In the latter case, what DI type? Constructor, Setter or
Interface injection?
How is the assembly declared? XML / Naming conventions / Annotations /
Other?
I can't find much docs/informations about it.
>> Another step would be to replace cornerstone components in favor of
>> "jakarta-commons" components.
>
> Interesting, can you explain what these cornerstone componets are?
Here you can find an overview on Phoenix/Avalon/Cornerstone/Excalibur:
http://loom.codehaus.org/History
We currently depends on:
avalon-framework (api + impl)
avalon-logkit
cornerstone-connection (api + impl)
cornerstone-datasources (api + impl)
cornerstone-scheduler (api + impl)
cornerstone-sockets (api + impl)
cornerstone-store (api + impl)
cornerstone-threads (api + impl)
excalibur-datasource
excalibur-pool (api + impl)
excalibur-thread (api + impl)
>> I don't think there is a way to give you access to a branch or a
>> particular folder of the james subversion repository.
>>
>> Maybe you should start working in your local sandbox and eventually
>> add a jira issue where submit your work for review.
>
> No worries. Maybe I should do the work in a Geronimo sandbox then?
I would like to have more informations on XBeans and your plan and know
the opinion of the James PMC about maven2 and xbeans before to tell my
preference on the sandbox location.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Stefano Bagnara wrote, On 4/5/2006 2:07 PM:
> Alan Cabrera wrote:
>
>> I'm going to investigate what it takes to convert James to maven 2
>> and XBean. I realize that others may not like that idea. My
>> thinking is to convert a small piece and solicit comments.
>
>
> I think that you should try to split the 2 processes (maven2 / xbean).
That might be a good idea.
> Our documentation and our build process is outdated and difficult to
> keep updated so I would be happy to evaluate different solutions
> (maven2). Other James committers (Noel, for example) don't like the
> idea to switch to maven2 (a search in the mailing list archives should
> return results for this).
>
> About containers/components I don't know anything about XBeans.
> Noel suggested to try to move to OSGi.
> I think we should try to move away from Phoenix but we can safely keep
> avalon: I read something done by Cocoon to run avalon inside an OSGi
> container.
I think that what the work will entail is POJO-ifying James. XBean is
just a way of stitching the POJOs in an IOC type of way. I think that
one could add some OSGi adapters on top, if one wanted to. The nice
thing about this way of organization is that one does not have to use
OSGi if one doesn't want to.
> Another step would be to replace cornerstone components in favor of
> "jakarta-commons" components.
Interesting, can you explain what these cornerstone componets are?
> I also investigated on using ActiveMQ in place of the spoolmanager of
> James but I stopped because I think we should change our repository
> interface before and we can't do that before 2.3.0 final will be out.
>
>> It would make sense if I did this in a sandbox. Would it be ok if I
>> had a little corner to play in?
>
>
> I don't think there is a way to give you access to a branch or a
> particular folder of the james subversion repository.
>
> Maybe you should start working in your local sandbox and eventually
> add a jira issue where submit your work for review.
No worries. Maybe I should do the work in a Geronimo sandbox then?
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Alan Cabrera wrote:
> I'm going to investigate what it takes to convert James to maven 2 and
> XBean. I realize that others may not like that idea. My thinking is to
> convert a small piece and solicit comments.
I think that you should try to split the 2 processes (maven2 / xbean).
Our documentation and our build process is outdated and difficult to
keep updated so I would be happy to evaluate different solutions
(maven2). Other James committers (Noel, for example) don't like the idea
to switch to maven2 (a search in the mailing list archives should return
results for this).
About containers/components I don't know anything about XBeans.
Noel suggested to try to move to OSGi.
I think we should try to move away from Phoenix but we can safely keep
avalon: I read something done by Cocoon to run avalon inside an OSGi
container.
Another step would be to replace cornerstone components in favor of
"jakarta-commons" components.
I also investigated on using ActiveMQ in place of the spoolmanager of
James but I stopped because I think we should change our repository
interface before and we can't do that before 2.3.0 final will be out.
> It would make sense if I did this in a sandbox. Would it be ok if I had
> a little corner to play in?
I don't think there is a way to give you access to a branch or a
particular folder of the james subversion repository.
Maybe you should start working in your local sandbox and eventually add
a jira issue where submit your work for review.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Bernd Fondermann wrote, On 4/5/2006 1:08 PM:
> Alan Cabrera wrote:
>
>> I'm going to investigate what it takes to convert James to maven 2
>> and XBean. I realize that others may not like that idea. My
>> thinking is to convert a small piece and solicit comments.
>
>
> In general, I'd like the idea of James becoming more Container
> agnostic very much. There are more than only one framework/container
> which could spring to ones mind. (One of them even could be wrapping
> James into a JCA)
>
> I tried to dig up more information about (Geronimo) XBean's current
> state (having briefly scanned the project somewhere in 2005 while it
> was still at Codehaus). But there seems to be no real discussion on
> any list or documentation how to use it. There are 'release'-tags in
> Geronimo SVN but no downloads. What did I miss? Where is all the
> development going on? Is it mature enough yet to deploy it in other
> project's codebases like James?
>
> Just taking James code into account, I think embedding it into another
> container would be second after making James more POJO-ish or
> otherwise decoupling its components from its current container.
>
> Another question: maven-izing and XBean-izing - are these two separate
> efforts or are they somehow interdependent?
>
> Anyway, I'd like to know what comes out of this XBean experiment!
XBean is all about making James more POJO-ish. The resulting classes
will be container agnostic and should make James embeddable.
These efforts are not interdependent.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Alan Cabrera wrote:
> I'm going to investigate what it takes to convert James to maven 2 and
> XBean. I realize that others may not like that idea. My thinking is to
> convert a small piece and solicit comments.
In general, I'd like the idea of James becoming more Container agnostic
very much. There are more than only one framework/container which could
spring to ones mind. (One of them even could be wrapping James into a JCA)
I tried to dig up more information about (Geronimo) XBean's current
state (having briefly scanned the project somewhere in 2005 while it was
still at Codehaus). But there seems to be no real discussion on any list
or documentation how to use it. There are 'release'-tags in Geronimo SVN
but no downloads. What did I miss? Where is all the development going
on? Is it mature enough yet to deploy it in other project's codebases
like James?
Just taking James code into account, I think embedding it into another
container would be second after making James more POJO-ish or otherwise
decoupling its components from its current container.
Another question: maven-izing and XBean-izing - are these two separate
efforts or are they somehow interdependent?
Anyway, I'd like to know what comes out of this XBean experiment!
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Serge Knystautas <sk...@gmail.com>.
On 4/11/06, Noel J. Bergman <no...@devtech.com> wrote:
> Alan Cabrera wrote:
>
> > I'm going to investigate what it takes to convert James to maven 2 and
> > XBean. I realize that others may not like that idea. My thinking is to
> > convert a small piece and solicit comments.
>
> Let's separate the two issues, shall we?
I'd like to as well if possible. They do seem orthogonal to me.
I'm a POJO fan (spring diehard), though as Stefano says, that means
everything and nothing. IMO the real challenge is still whether we
can safely migrate our current codebase to the different IoC pattern
(service lookup to injector) and deal with our lifecycle issues.
So I'd rather not get focused on the holy grail of design patterns and
go with what is a) feasible to refactor and b) has someone willing to
do that.
--
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Maven 2 and XBean
Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman wrote:
> Personally, I'm not a big fan of Maven in any flavor, but I am willing to be convinced. I certainly do not like maven generated web sites, nor am I a fan of the repository system. Perhaps we could leverage multi-project builds, or we could just improve our Ant builds.
I would like to see the project after the maven2 port in order to give
my final thought. I had problems with the current ant-based build
process, so I'm *currently* fan of any test of a different build mechanism.
Things I would expect from maven2:
1) remove third party jars from our repository.
2) simpler integration with third party tools (code coverage, continuos
integration, ide configuration...)
3) clean support of multi-project so we can split our main components to
separate sub projects.
4) simple way to build an installer for the resulting application (IIRC
maven2 has plugins to simplify the creation of NSIS installers and more)
> As for XBean, I favor OSGi interfaces, particularly as OSGi and Sun are cooperating via the JCP to establish what will become the official standard interfaces. ApacheDS and Derby are already available as OSGi bundles, too. If it is correct that XBean can serve as a convenience layer on top of OSGi, that might be reasonable direction.
I don't know both XBean and OSGi enough to say what I like.
XBean has really few documentation/information around the web and I
still don't understand what the various modules do and how.
Here:
http://incubator.apache.org/ip-clearance/geronimo-1478-xbean.html
I see the following and I have this questions:
"kernel": what services does it provide?
"osgi": what does it exactly bridge and what are the limitation?
"server": is "server" to "kernel" what "phoenix" is to "avalon" or what
else?
"spring": I know spring 2 introduced xml extensions: how does this
differs from spring2 support?
"telnet": I like it, IIRC there is also a phoenix kernel option to
support a similar task.
> You could post a small piece as an example. I'd like to see that example, and some discussion, as a prelude to discussion.
I like examples and discussions, but I think there is no better example
than a working almost finished work ;-). If Alan wants to try some of
this things and doesn't care wether James will accept the change or not
then I think we could safely "talk less" and wait for the "almost
finished code" or "work in progress code" to make our reviews and talk
about real things.
> The best place to start might be to refactor the existing services into plain POJO services and then look at how we want to tie those back into a particular container. To be clear, since there has been a lot of discussion, such POJOs would not be "services", per se. No lifecyle methods that we don't define ourselves, e.g., the Mailet init() method. No sophisticated start, stop, etc.. Just the core business logic. This should help us to expose core requirements for DI and/or service lookup. This would be a collaborative effort, with API evolution, inherent support for JMX, etc., and thus would be looking at JAMES-NEXT, not JAMES-NOW. :-) So a branch in SVN.
I would no more discuss "POJO" issues: I want to see *real* proposals. I
am starting being really skeptic about buzzwords. 6 years ago everyone
was SOAPing their projects and if your application wasn't supporting
SOAP you where no-one. POJO means nothing and everything at the same time.
> During this process, I would like to take control back from the avalon code. We really use very little of conerstone, and what little we use seems to get in the way of where we want to go as much as it helps. Such as repositories that are interfering with the path to IMAP. Even Avalon was moving to use Jakarta Commons packages whenever possible, and I would continue that move, using standard java[x].* where possible, using org.apache.commons.* next, etc. For key things, we should use org.apache.james.* interfaces, and either implement or delegate to a suitable implementation, but we should own our key interfaces.
I already expressed my option about Avalon interfaces: in short I think
we should keep them until we'll need to change them. I'm against moving
the interfaces in a james package with no other goal. Most of them are
single method interfaces: when you need to change them you probably just
need to introduce a new interface.
About cornerstone I think James usage is not "very little".
Most of our components depends on this core services:
--
org.apache.avalon.cornerstone.services.sockets.SocketManager
org.apache.avalon.cornerstone.services.scheduler.TimeScheduler
org.apache.avalon.cornerstone.services.datasources.DataSourceSelector
org.apache.avalon.cornerstone.services.threads.ThreadManager
org.apache.avalon.cornerstone.services.store.Store
--
What are the existing services that could replace this services? How
much work is needed?
We could even replace this one *BEFORE* James 3 and *BEFORE*
"POJOification" but we need the new components/services available first.
but our "MailRepository"One more note about repositories: the
repository interface is a James specific interface and is not binded to
Avalon. We only use the "Store" service from avalon but I think the
problem with IMAP is not the "Store". I don't see how the store limits
us implementing IMAP.
> We should also carefully decide where we want to touch the container. For example, JAMES has its own container notions, and effectively isolates the Mailet API from the underlying container, except when a matcher or mailet requires additional capabilities from the container. When DI isn't appropriate, I would just as soon require JAMES to provide a suitable JNDI InitialContext as part of its own container contract, than explose the underlying platform.
This has been a blocking issue talking with Andrew C. Oliver about
James, Mailets and JBMS.
In the end, if we remove external services the useful mailets are
probably less than 10: So we should introduce at least a few known
services (repositories, datasources, user-directories, more?).
I think that JNDI should not be used in a sentence where we use POJOs
and DI. IMHO JNDI is like Avalon Service locator pattern (Serviceable)
but worst (more difficult to test, it is not easy to provide different
implementation of the same service to different components).
If we consider Avalon Serviceable a limit to James then we shouldn't
talk of JNDI: it is more easy to provide a ServiceManager that does
lookups via JNDI than viceversa.
> As for IOC vs standard J2EE JNDI lookup, they each have their place, and we are likely to use more of the latter than the former, although we'll see what falls out from the API redesign.
I would avoid JNDI uage in James components/services like plague . I
would only consider it for Mailets but I'm probably for DI usage in
mailets too.
> Currently, configuration is XML-based. I want to see us end up able to support dynamic reconfiguration in a distributed and clustered environment. That may mean moving configuration into the Directory server, so that it is available via JNDI from anywhere.
Avalon already provides a Reconfigurable interface. We should first
support it in our components and then we could search a container that
allow us to reload / change on the fly the configurations.
Here the biggest problem is supporting configuration changes IN the
components. Most of them should be disposed and recreated to do that.
I see this as an application issue much more than a container issue.
Stefano
PS: I'm inclined to hear and change my current ideas about all I wrote here.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: XBean
Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Noel J. Bergman wrote:
> Alan Cabrera wrote:
>
>
>> I'm going to investigate what it takes to convert James to maven 2 and
>> XBean. I realize that others may not like that idea. My thinking is to
>> convert a small piece and solicit comments.
>
> As for XBean, I favor OSGi interfaces, particularly as OSGi and Sun are cooperating via the JCP to establish what will become the official standard interfaces. ApacheDS and Derby are already available as OSGi bundles, too. If it is correct that XBean can serve as a convenience layer on top of OSGi, that might be reasonable direction.
>
I think that we should support this. The standard OSGi interfaces are
inadequate and we will need adapters. Felix has some nice stuff that
could help here. But to restate my position, the OSGi/Felix code should
not be in James' core code.
> You could post a small piece as an example. I'd like to see that example, and some discussion, as a prelude to discussion.
>
> The best place to start might be to refactor the existing services into plain POJO services and then look at how we want to tie those back into a particular container. To be clear, since there has been a lot of discussion, such POJOs would not be "services", per se. No lifecyle methods that we don't define ourselves, e.g., the Mailet init() method. No sophisticated start, stop, etc.. Just the core business logic. This should help us to expose core requirements for DI and/or service lookup. This would be a collaborative effort, with API evolution, inherent support for JMX, etc., and thus would be looking at JAMES-NEXT, not JAMES-NOW. :-) So a branch in SVN.
>
> During this process, I would like to take control back from the avalon code. We really use very little of conerstone, and what little we use seems to get in the way of where we want to go as much as it helps. Such as repositories that are interfering with the path to IMAP. Even Avalon was moving to use Jakarta Commons packages whenever possible, and I would continue that move, using standard java[x].* where possible, using org.apache.commons.* next, etc. For key things, we should use org.apache.james.* interfaces, and either implement or delegate to a suitable implementation, but we should own our key interfaces.
>
> We should also carefully decide where we want to touch the container. For example, JAMES has its own container notions, and effectively isolates the Mailet API from the underlying container, except when a matcher or mailet requires additional capabilities from the container. When DI isn't appropriate, I would just as soon require JAMES to provide a suitable JNDI InitialContext as part of its own container contract, than explose the underlying platform.
>
> As for IOC vs standard J2EE JNDI lookup, they each have their place, and we are likely to use more of the latter than the former, although we'll see what falls out from the API redesign.
>
I think that w/ proper POJOification, you can properly support either.
> Currently, configuration is XML-based. I want to see us end up able to support dynamic reconfiguration in a distributed and clustered environment. That may mean moving configuration into the Directory server, so that it is available via JNDI from anywhere.
>
That is one use case, I think we should support others as well.
Regards,
Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
RE: Maven 2 and XBean
Posted by "Noel J. Bergman" <no...@devtech.com>.
Alan Cabrera wrote:
> I'm going to investigate what it takes to convert James to maven 2 and
> XBean. I realize that others may not like that idea. My thinking is to
> convert a small piece and solicit comments.
Let's separate the two issues, shall we?
Personally, I'm not a big fan of Maven in any flavor, but I am willing to be convinced. I certainly do not like maven generated web sites, nor am I a fan of the repository system. Perhaps we could leverage multi-project builds, or we could just improve our Ant builds.
As for XBean, I favor OSGi interfaces, particularly as OSGi and Sun are cooperating via the JCP to establish what will become the official standard interfaces. ApacheDS and Derby are already available as OSGi bundles, too. If it is correct that XBean can serve as a convenience layer on top of OSGi, that might be reasonable direction.
You could post a small piece as an example. I'd like to see that example, and some discussion, as a prelude to discussion.
The best place to start might be to refactor the existing services into plain POJO services and then look at how we want to tie those back into a particular container. To be clear, since there has been a lot of discussion, such POJOs would not be "services", per se. No lifecyle methods that we don't define ourselves, e.g., the Mailet init() method. No sophisticated start, stop, etc.. Just the core business logic. This should help us to expose core requirements for DI and/or service lookup. This would be a collaborative effort, with API evolution, inherent support for JMX, etc., and thus would be looking at JAMES-NEXT, not JAMES-NOW. :-) So a branch in SVN.
During this process, I would like to take control back from the avalon code. We really use very little of conerstone, and what little we use seems to get in the way of where we want to go as much as it helps. Such as repositories that are interfering with the path to IMAP. Even Avalon was moving to use Jakarta Commons packages whenever possible, and I would continue that move, using standard java[x].* where possible, using org.apache.commons.* next, etc. For key things, we should use org.apache.james.* interfaces, and either implement or delegate to a suitable implementation, but we should own our key interfaces.
We should also carefully decide where we want to touch the container. For example, JAMES has its own container notions, and effectively isolates the Mailet API from the underlying container, except when a matcher or mailet requires additional capabilities from the container. When DI isn't appropriate, I would just as soon require JAMES to provide a suitable JNDI InitialContext as part of its own container contract, than explose the underlying platform.
As for IOC vs standard J2EE JNDI lookup, they each have their place, and we are likely to use more of the latter than the former, although we'll see what falls out from the API redesign.
Currently, configuration is XML-based. I want to see us end up able to support dynamic reconfiguration in a distributed and clustered environment. That may mean moving configuration into the Directory server, so that it is available via JNDI from anywhere.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org