Hi all,

I have a mailet application (say myapp.jar) that performs some dynamic
classloading based on a configuration file. As I am using James 2.1.2
for the moment, I place myapp.jar into james.sar$SAR-INF/lib.

I want to be able to add new classes (say myplugin.jar) to the
application without modifying james.sar. These classes may require some
utility classes which I have packaged together with myapp.jar.

I am looking forward recommendations on where to place the JAR files
required by my application.


If I put myplugin.jar into the Phoenix's lib directory, the application
can see the new classes, but the new classes cannot use the utility
classes from myapp.jar.

I can split myapp.jar into myapp-mailet.jar (where I put the mailets and
matchers) and myapp-util.jar (where I put the rest of the application).
In such a case, myapp-mailet.jar goes into james.sar and myapp-util.jar
goes into lib (together with myplugin.jar). It works!


However, myapp-util.jar requires some libraries usually packaged into
james.sar, such as activation.jar and mail_1_3.jar. My current solution
consists in placing a second copy of those libraries into Phoenix's lib.
I know that this is dirty, but I have not observed any conflict so far.

Is there a better place where I can put libraries required by both my
mailets and my utility classes?

Which would be the benefits of using
Thread.currentThread().getContextClassLoader().loadClass() instead of my
current Class.forName()?


My understanding of James 2.2.x classloading is that I will be able to
place my whole mailet application into the Phoenix's lib directory.

Will I still be able to use libraries from james.sar such as
activation.jar?


Sorry for the long e-mail and thanks for your time & patience.


Diego


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

Reply via email to