Re: JDNI factory name
"Mathias Bogaert" <[email protected]>
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <012d01c4208b$a2ec88d0$583277d5@nextcom> |
Yes you are right. I was mistaken.
It should look like this (in web.xml):
<env-entry>
<env-entry-name>sitemesh.factory</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>com.mycompany.blah.MySpecialFactory</env-entry-value>
</env-entry>
I'm unsure if JMX would work.
Mathias
----- Original Message -----
From: "Joseph Ottinger" <[email protected]>
To: "Mathias Bogaert" <[email protected]>
Cc: <[email protected]>
Sent: Monday, April 12, 2004 2:33 PM
Subject: Re: [Opensymphony-sitemesh] JDNI factory name
> Doesn't java:comp/env refer to the current application's environment, as
> opposed to a global reference? This would be specific to application
> unless the app server itself returns the same reference for multiple
> applications. Why couldn't you use both processes - look for it in the
> filter attributes, then environment (i.e., env-entry), then JNDI.
>
> For that matter, would it be possible to use a JMX MBean to control
> sitemesh?
>
> On Mon, 12 Apr 2004, Mathias Bogaert wrote:
>
> > Hi,
> >
> > I would like to change the way SiteMesh's Factory implementation class
is
> > being looked up. Currently it goes and look the JDNI InitialContext
> > "java:comp/env/sitemesh.factory" property. IMO this is overkill and does
not
> > work well with multiple applications requiring a different SiteMesh
factory
> > while deployed on the same application server (JDNI spans multiple web
> > applications). I therefore suggest using a context-param in web.xml
(like
> > spring).
> >
> > <context-param>
> > <param-name>sitemeshFactoryClass</param-name>
> >
> >
<param-value>com.mycompany.util.sitemesh.SpecialSiteMeshFactory</param-value
> > >
> > </context-param>
> >
> > If not specified, it will automatically resolve into
> > com.opensymphony.module.sitemesh.factory.DefaultFactory.
> >
> > Let me know if anyone finds this offensive :)
> >
> > Mathias
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Opensymphony-sitemesh mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
> >
>
> -----------------------------------------------------------------------
> Joseph B. Ottinger http://enigmastation.com
> IT Consultant [email protected]
> Editor-in-Chief - Java Developer's Journal [email protected]
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click