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 Charles Benett <ch...@benett1.demon.co.uk> on 2001/04/28 17:22:13 UTC

Multiple blocks and use of assembly.xml

James is not working properly because of the way it was split into
multiple blocks.

James.java contextualises itself (from assembly or config) but the
smtpserver block is not getting contextualised properly (no Hello name). 

We can either reverse the multiple blocks move, so that james
contextualises a component - smtpserver. Or, we have to write smtpserver
so that it gets data from config.xml.

What was the rationale for having separate blocks (rather than separate
components) for each protocol? I'm not convinced this is a good design.

Charles

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


Re: Testing (was Re: Multiple blocks and use of assembly.xml)

Posted by Peter Donald <do...@apache.org>.
At 09:10  30/4/01 +0100, Charles Benett wrote:
>
>
>Harmeet Bedi wrote:
>> One valuable area contribution could be a strong regression test suite.
>> There are 2 tests in the testing area, but they may not be sufficient.
>> I think regression test suites and possibly merging the tests with build
>> process would be valuable. That way even if there is a bad change(I realize
>> this should not happen), everybody knows that upfront.
>> I can write test using JUnit and I believe JUnit has an Ant binding.
>> 
>> Does the test suite sound like a good idea ? How about JUnit vs. Testlet ?
>
>Yes. A good test system would be handy. What are the pros and cons of
>JUnit and Testlet (avalon testlet, I presume). Peter can probably
>enlighten us about Testlet. Lets get some ideas on the table before we
>decide.

Eithers good - recent junits have surpassed testlet capabilities. testlet
is a slightly cleaner design but that is largely irrelevent to you as a
*user*. When Ant2 comes to fruitation I hope testlet will be functionally
compatible again but I would say go with junit if you know it. If you don't
know junit then I would say use testlet .. but then again - I could be
biased ;)
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


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


Testing (was Re: Multiple blocks and use of assembly.xml)

Posted by Charles Benett <ch...@benett1.demon.co.uk>.

Harmeet Bedi wrote:
> One valuable area contribution could be a strong regression test suite.
> There are 2 tests in the testing area, but they may not be sufficient.
> I think regression test suites and possibly merging the tests with build
> process would be valuable. That way even if there is a bad change(I realize
> this should not happen), everybody knows that upfront.
> I can write test using JUnit and I believe JUnit has an Ant binding.
> 
> Does the test suite sound like a good idea ? How about JUnit vs. Testlet ?

Yes. A good test system would be handy. What are the pros and cons of
JUnit and Testlet (avalon testlet, I presume). Peter can probably
enlighten us about Testlet. Lets get some ideas on the table before we
decide.

Charles

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


Re: Multiple blocks and use of assembly.xml

Posted by Harmeet Bedi <hb...@yahoo.com>.
----- Original Message -----
From: "Charles Benett" <ch...@benett1.demon.co.uk>


> My main concern is that the code in the main james tree (ie under src)
> should always run.  I am all for improvements and new additions. But, if
> they impact core functionality, until they work out-of-the-box, they
> should be in the proposal dir.
>
> In this case, I made a whole set of changes to package names which
> didn't change the functionality of james. I then tried to execute james.
> When I attempted an smtp connection it through a ContextException
> because it didn't have a  HelloName. This was extremely annoying. The
> latest patches from harmeet have fixed that.

Fixed that but unfortunatly caused it too. :-(
It was a bad miss.

>
> However, now I have sent a mail to james for local delivery which is
> sitting in the spool repository. There's nothing obvious in the logs to
> explain why this isn't being handled. As this is the test for james I've
> been using for months, this is irritating.

But this argues for a strong regression test suite and as you point out
careful behaviour on the part of a developer. I think as more parts of James
stabilize, a regression suite would be invaluable.

>
> I want to be adding functionality to james not restoring stuff that
> worked a month ago.
>
> So, I guess my points are:
> 1) Any changes to the current source, under src dir, should be tested
> thoroughly. Ie a mail server set up and have mails sent to and from it
> using smtp and pop3.

Agreed

>
> 2) Major changes which impact the core functionality of james (which I
> suggest should be the stable code: Ie smtp & pop3 with file based users
> and message storage.) should - as well as being discussed (which we did)
> - be placed in the proposal dir until they work properly.

Agreed

>
> 3) Code that doesn't affect the core can go straight into the main tree.
> At the moment, I suggest, that includes the imap & nntp servers, ldap
> user storage and RDBMS user and mail storage.

Ok.

>
> By the way, I think this is just re-phrasing the jakarta guidelines -
> see http://jakarta.apache.org/site/source.html
>
> Thoughts?

Will be more careful.
One valuable area contribution could be a strong regression test suite.
There are 2 tests in the testing area, but they may not be sufficient.
I think regression test suites and possibly merging the tests with build
process would be valuable. That way even if there is a bad change(I realize
this should not happen), everybody knows that upfront.
I can write test using JUnit and I believe JUnit has an Ant binding.

Does the test suite sound like a good idea ? How about JUnit vs. Testlet ?

Harmeet


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Re: Multiple blocks and use of assembly.xml

Posted by Charles Benett <ch...@benett1.demon.co.uk>.
My main concern is that the code in the main james tree (ie under src)
should always run.  I am all for improvements and new additions. But, if
they impact core functionality, until they work out-of-the-box, they
should be in the proposal dir.

In this case, I made a whole set of changes to package names which
didn't change the functionality of james. I then tried to execute james.
When I attempted an smtp connection it through a ContextException
because it didn't have a  HelloName. This was extremely annoying. The
latest patches from harmeet have fixed that.

However, now I have sent a mail to james for local delivery which is
sitting in the spool repository. There's nothing obvious in the logs to
explain why this isn't being handled. As this is the test for james I've
been using for months, this is irritating.

I want to be adding functionality to james not restoring stuff that
worked a month ago.

So, I guess my points are:
1) Any changes to the current source, under src dir, should be tested
thoroughly. Ie a mail server set up and have mails sent to and from it
using smtp and pop3.

2) Major changes which impact the core functionality of james (which I
suggest should be the stable code: Ie smtp & pop3 with file based users
and message storage.) should - as well as being discussed (which we did)
- be placed in the proposal dir until they work properly. 

3) Code that doesn't affect the core can go straight into the main tree.
At the moment, I suggest, that includes the imap & nntp servers, ldap
user storage and RDBMS user and mail storage.

By the way, I think this is just re-phrasing the jakarta guidelines -
see http://jakarta.apache.org/site/source.html 

Thoughts?

Charles

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


Re: Multiple blocks and use of assembly.xml

Posted by Harmeet Bedi <hb...@yahoo.com>.
[Charles Benett]
> James is not working properly because of the way it was split into
> multiple blocks.
>
> James.java contextualises itself (from assembly or config) but the
> smtpserver block is not getting contextualised properly (no Hello name).

[Harmeet]
The servername/helo name is a problem. When I split it up I mentioned that
this is not done and supplied default values in the code.

However servername/heloname does not affect the functionality of the
protocol servers.
Could you give a few more details on - James not working properly.
I mean what protocol server, is there a problem with the repository. What
configuration etc.
Would love to help to get James working properly.



[Charles Benett]
> We can either reverse the multiple blocks move, so that james
> contextualises a component - smtpserver. Or, we have to write smtpserver
> so that it gets data from config.xml.


[Harmeet]
Will attempt to change smtp server this weekend so that it picks data from
config.xml. I was busy in the weekdays, and I thought there was a James
problem due to Cornerstone. Anyway will attempt that unless someone else
wants to go ahead bvefore.



[Charles Benett]
> What was the rationale for having separate blocks (rather than separate
> components) for each protocol? I'm not convinced this is a good design.

[Harmeet]
The thread 'having separate blocks for protocol servers' would provide the
context. The First converstation was somewhere around April 1 or 2. I
formally proposed doing this on April18, got positive feedback and no
negetive feedback.
Some of the advantages cited were
----------------
- This is more flexible
- Will clean james/James.java
- Allow more than one protocol server instance to exist for each protocol.
For example there could be POP3 available via Plain Socket and TLS. There
are many advantages to this, for example one could put up a firewall and
expose only the TLS POP3 outside.
------------------

Why is the one block design better than the multiple factored blocks ?
Creating functionality out of assembling blocks was the one of the main
ideas in Avalon.
James.java seemed to be duplicating some of the facilities already present
in the Kernel.
I think we should not roll things back, because that would mean going back,
not foward. Let us instead fix problems in the current snapshot.

Harmeet


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Re: Multiple blocks and use of assembly.xml

Posted by Harmeet Bedi <hb...@yahoo.com>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
> About the only negative thing is that duplicity will occur in config file
> (ie HELO name vs host vs X vs Y). The next stage in development of config
> for phoenix will be to make those things easier (ie define constant
> host="foo.orG" once and reuse it throughout phoenix).

Would you consider inheritance. XSchema sems to allow inheritance semantics
and xerces has XSchema support.
Element inheritance would be usefule.

>
> The same issue is present in many other servers (FTP/file server is one
> example) - so it will be fixed eventually .. how it gets fixed in short
> term is another thing altogether ;)

Added a class james/BaseConnectionHandler.java The different connection
handler derive from this. At present it only handles the helloName and
connectiontimeout configuration but common connection handler code could be
factored into this class.

Harmeet


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Re: Multiple blocks and use of assembly.xml

Posted by Peter Donald <do...@apache.org>.
At 04:22  28/4/01 +0100, Charles Benett wrote:
>James is not working properly because of the way it was split into
>multiple blocks.
>
>James.java contextualises itself (from assembly or config) but the
>smtpserver block is not getting contextualised properly (no Hello name). 
>
>We can either reverse the multiple blocks move, so that james
>contextualises a component - smtpserver. Or, we have to write smtpserver
>so that it gets data from config.xml.
>
>What was the rationale for having separate blocks (rather than separate
>components) for each protocol? I'm not convinced this is a good design.

Essentially so you could have multiple server types. ie You could host a
POP over vanilla TCP and one over SSL (help migrating clients). It also is
useful for people who want to compose James into larger applications.

About the only negative thing is that duplicity will occur in config file
(ie HELO name vs host vs X vs Y). The next stage in development of config
for phoenix will be to make those things easier (ie define constant
host="foo.orG" once and reuse it throughout phoenix).

The same issue is present in many other servers (FTP/file server is one
example) - so it will be fixed eventually .. how it gets fixed in short
term is another thing altogether ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


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