Re: [OT?] caching DB items in startup listener

2021-04-14 Thread Christopher Schultz
Cris, On 4/14/21 08:03, Berneburg, Cris J. - US wrote: cs> Your only other spec-compliant option is to use a Servlet with load-on-startup set cs> and do your work in the init() method, which is ... ugly. I was thinking of a servlet request (or something) that is called on startup that could al

RE: [OT?] caching DB items in startup listener

2021-04-14 Thread Berneburg, Cris J. - US
Hi Thomas Thanks for the info and your opinion! :-) cb> 1. Is performing DB heavy-lifting operations in ServletContextListener cb> a "reasonable" practice? cb> 2. Is there a "better" way of caching said items at application cb> startup? tm> What happens when the DB has problems when the webap

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
Martynas, On 14.04.2021 14:20, Martynas Jusevičius wrote: > you might want to look into containerizing your webapps. We use an > XSLT stylesheet (invoked by the entrypoint script) that transforms env > params into context.xml params: > https://github.com/AtomGraph/LinkedDataHub/blob/master/platfor

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Martynas Jusevičius
Rony, you might want to look into containerizing your webapps. We use an XSLT stylesheet (invoked by the entrypoint script) that transforms env params into context.xml params: https://github.com/AtomGraph/LinkedDataHub/blob/master/platform/context.xsl Martynas On Wed, Apr 14, 2021 at 2:16 PM Ro

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
On 14.04.2021 13:25, Mark Thomas wrote: > On 14/04/2021 12:22, Rony G. Flatscher (Apache) wrote: >> Not finding any pointers, asking here: is it possible to define environment >> variables for a webapp? >> If so, how? > > You can only set them globally, for the Java process - not per web > applic

RE: [OT?] caching DB items in startup listener

2021-04-14 Thread Berneburg, Cris J. - US
Hey Chris cb> 1. Is performing DB heavy-lifting operations in ServletContextListener a "reasonable" practice? cb> 2. Is there a "better" way of caching said items at application startup? cs> IMHO there is no better way than using a ServletContextListener to load things at startup. OK, good t

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Mark Thomas
On 14/04/2021 12:22, Rony G. Flatscher (Apache) wrote: Not finding any pointers, asking here: is it possible to define environment variables for a webapp? If so, how? You can only set them globally, for the Java process - not per web application. CGI creates a new process so can have a comp

Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
Not finding any pointers, asking here: is it possible to define environment variables for a webapp? If so, how? ---rony P.S.: Tomcat can manipulate the process' environment, e.g. in the case of CGI execution. Here a sample of the process' environment from some CGI-invocation on a Windows machi