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 Marco Tedone <mt...@jemos.org> on 2003/05/17 15:31:37 UTC

Implementing a new Matcher - problem solved

Vincenzo,

finally I got the solution. I decoupled the XML implementation matcher from
the Digester logic. This is actually useful because this matcher has been
put inside a wider project, called jamailet. What I've done follows:

I created a factory which for now returns an instance of a QuotaService. The
factory, the service, and all digester working classes have been put in a
jamailet.jar file.

I created then a Matcher which specializes the AbstractStorageQuota. This
matcher, more than being directly coupled with Digester, asks to the
Jamailet Factory an instance of the QuotaService, and then it uses this
instance to retrieve an HashMap containing the configuration information.

Everything works fine, because:

jamailet.jar is put under %PHOENIX_HOME%/lib, where digester required jars
are as well;
The matcher is put under transport/matchers with all the others and built as
part of james when the 'build' command is run.

What should the user do then?

1) Unzip the distribution under a new directory (let's say jamailet-1.0.2)
like any other downloaded third party software
2) Place the jamailet_${version}.jar under %PHOENIX_HOME%/lib
3) Update jamailet.xml (coming with the distribution) with the
system-related info (just a couple of paths) and then put this file under
%JAMES_SOURCE_HOME% folder
4) Include the property file jamailet.xml in the build.xml and then include
the property ${jamailet.jar} (specified in the jamailet.xml file) in the
${project.class.path} for the Matcher to be compiled

                                            OR

4a) run the build.xml file coming with the distribution (which accomplish
the tasks mentioned in step 4). This file is the standard james build.xml
file plus a couple of lines to include jamailet.xml file
5) Update and copy the configuration file coming with the distribution under
apps/james/conf/
6) Update config.xml to call the AbstractQuotaXML matcher, passing a
parameter with the path to the XML config file
7) Deploy the new james.sar (copy it under %JAMES_HOME%/apps)
7) Restart James

A piece of cake, isn'it?

Marco




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