On Wed, 2004-04-14 at 18:51, Steve Short wrote:
> Not sure - but maybe if you can provide some more information we can sort something
> out.
>
> - Which classloader do you want the MailerLoader to use?
RealClassLoader from classworlds.
> - Can you describe the classloader hierarchy you have set up with classworlds.
> (Including the Phoenix classloaders)
Sure.
main is br.com.ibnetwork.e2.loader.E2Loader from e2loader
[e2loader]
load ${app.home}/bin/classes/common/
load /usr/share/jars/servletapi-2.3.jar
[phoenix]
import br.com.ibnetwork.e2.loader.Startable from e2loader
load ${app.home}/bin/classes/phoenix/
load ${phoenix.home}/bin/phoenix-loader.jar
load ${xingu.home}/xingu-container-alpha-0.1.jar
[tomcat]
import br.com.ibnetwork.e2.loader.Startable from e2loader
load ${app.home}/bin/classes/tomcat/
load ${tomcat.home}/bin/commons-logging-api.jar
load ${tomcat.home}/server/lib/*.jar
load ${tomcat.home}/common/lib/*.jar
[jetty]
import br.com.ibnetwork.e2.loader.Startable from e2loader
load ${app.home}/bin/classes/jetty/
load ${jetty.home}/lib/*.jar
load ${jetty.home}/ext/jasper-compiler.jar
load ${jetty.home}/ext/jasper-runtime.jar
> - Which class is your singleton and which classloader is being used to load it?
I want to put my singleton on [e2loader]. But I'm testing it on
[phoenix]. It's placed on xingu-container-alpha-0.1.jar
> - Why are you using classworlds? What does it buy you in this scenario?
AFAIK, singletons are unique on each classloader, so, I must use the
same classloader to load it on all my apps, right ?
Both on jetty and phoenix/james.
>
> Steve
>
> > -----Original Message-----
> > From: Leandro Rodrigo Saad Cruz [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 14, 2004 2:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]