You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> on 2004/04/14 23:40:17 UTC
Using specific classloaders for mailets
Hi all.
I'd like to use a specific classloader for one mailet
that should share a singleton with other app running on the same JVM.
For this to work I'm using classworlds to start phoenix/james and jetty.
Both apps mess with the classloader. Is it possible to make a make let
run using a specific classloader ?
This code was extracted from MailetLoader.java. The classloader always
references this.getClass().getClassLoader();
<MailetLoader>
ClassLoader theClassLoader = null;
try {
MailetConfigImpl configImpl = new MailetConfigImpl();
configImpl.setMailetName(mailetName);
configImpl.setConfiguration(configuration);
configImpl.setMailetContext(context);
if (theClassLoader == null)
{
theClassLoader = this.getClass().getClassLoader();
}
...
...
</MailetLoader>
--
Leandro Rodrigo Saad Cruz
InterBusiness Tecnologia e Serviços
IB - www.ibnetwork.com.br
DB - www.digitalbrand.com.br
OJB - db.apache.org/ojb
XINGU - xingu.sf.net
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org