JavMail and JAF -- where are they being used?
Fernando Nasser
fnasser@redhat.com
Tue Apr 20 18:04:00 GMT 2004
Thank you for your prompt response Chris.
Chris Burdess wrote:
> Fernando Nasser wrote:
>
>>I am trying to access how much the JavaMail and JAF (activation) classes
>>have been put to a test. I know they have been compiled with GCJ and
>>they were available through rhug. But I don't know what may have used
>>these in either .so library or bytecode form.
>
>
> There aren't any unit tests for these packages; if you'd like to write
> some, it would be much appreciated, but due to the largely network-based
> nature of the tests, it can be difficult to configure them.
>
Good point. But for JavaMail there will always be the need to supply, at least,
the outgoing mail server. To test receiving e-mails or IMAP you will also
need to run this under a user with a valid e-mail account as well. And how to
control what should be in there? We could send the e-mail messages ourselves
but there may take a little time for them to be visible for pop3 access, for
instance. Yet, it would be nice to have tests for it.
JAF has basic two parts to be tested: activation of objects and the "discovery"
part. The latter we can test together with JavaMail by sending different MIME
types and reading them back (part of it at least). The activation of objects,
specially with groups per JVM, seems very hard to automate.
Maybe having them integrated into larger frameworks where they will be widely
used will end up being the more practical approach.
> In JAR form, system testing has largely taken place by replacing
> Sun's mail.jar and activation.jar with the GNU versions and running a
> JavaMail client such as IceMail (http://www.icemail.org/). I'm not aware
> of any showstopping problems. Again, if you have a better strategy, please
> let us know.
>
I replaced the Sun RIs with Classpath's JavaMail (2003-10-06) and JAF
(2003-10-06) in a couple of machines where I have JOnAS, the ObjectWeb's
Application Sever framework, installed.
I was able to send e-mails but the tests are very simple -- they send only a
single line text e-mail. So most of JAF was not tested (hardly any, I would say).
Could not find any example that used JAF's Activatable classes.
It seems JAF is also used by SAAJ, but I still need to find an example for that.
There is a sample application that uses a little bit of it: the PetStore demo.
I will try to run it when I come back from vacations later in May.
> There are currently problems, previously discussed on this list,
> relating to the inclusion of system resources in natively compiled
> versions of these libraries, which are not yet resolved. There is a
> testcase project for building a number of such GNU projects with complex
> dependencies at http://www.sf.net/projects/gzap/
>
I guess this is more Andrew's area than mine.
>
>>Also, they are from Classpath, so perhaps some projects get them
>>straight from there.
>
>
> s/Classpath/ClasspathX/
>
Sorry. Forgot the X
> I'm in the process of making some prerelease packages; they will then be
> available from ftp.gnu.org and in Debian unstable.
That is good news. As you see from my notes we were getting "dated" snapshots
of these things. Perhaps we can converge on something closer to a "release" so
that it gets easier for people to report and track down bugs etc.
I know it is not much relevant for Debian, but perhaps these could also be made
available as jpackage.org packages (in jar format only) to replace the
non-source packages they have that require one to download Sun RIs and rebuild
the RPMs from a src.rpm.
Best regards,
Fernando
More information about the Java
mailing list