This is what I discovered about custom mailets: if you are using
third-PARTY classes within your mailet you need to dynamically load them
using the class-loader. 

I am using the Enhydra Dods framework for accessing my database and I
had to load all the enhydra classes using:
ClassLoader.loadClass(className).newInstance();

Just putting my jars in james.sar in the SAR-INF/lib/ directory and the
paths in config.xml did not help.

Just wanted to bring this to the notice of the developers, I think since
the mailet is itself loaded dynamically through the classLoader even the
third-party classes it uses had to be loaded dynamically.

--Disha

> set up in config.xml thus: 
On Tue, 2003-02-18 at 13:27, Steve Short wrote:
> > Right now if you have mailets outside of the default package, 
> > you are asking for grief.  James v3 will support custom 
> > matcher/mailet packages much better.

> > 
> > The easiest thing to do today is to take the source 
> > distribution, and add your custom matchers/mailets in the 
> > same package as the James matchers/mailets.
> 
> Noel, 
> 
> It is easy to put matchers and mailets in your own package, ours are in
> com.postx.james.transport.mailets.  The code is in a jar which is
> included in james.sar in the SAR-INF/lib/ directory and the paths are
> set up in config.xml thus:
> 
>       <mailetpackages>
>  
> <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>  
> <mailetpackage>com.postx.james.transport.mailets</mailetpackage>
>       </mailetpackages>
>       <matcherpackages>
>  
> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>  
> <matcherpackage>com.postx.james.transport.matchers</matcherpackage>
>       </matcherpackages>
> 
> Cheers
> Steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Disha <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to