KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > impl > ContainerUtil


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.directwebremoting.impl;
17
18 import java.io.IOException JavaDoc;
19 import java.util.ArrayList JavaDoc;
20 import java.util.Collection JavaDoc;
21 import java.util.Enumeration JavaDoc;
22 import java.util.Iterator JavaDoc;
23 import java.util.List JavaDoc;
24 import java.util.StringTokenizer JavaDoc;
25
26 import javax.servlet.ServletConfig JavaDoc;
27 import javax.servlet.ServletContext JavaDoc;
28 import javax.servlet.ServletException JavaDoc;
29 import javax.servlet.http.HttpServlet JavaDoc;
30 import javax.xml.parsers.ParserConfigurationException JavaDoc;
31
32 import org.directwebremoting.Container;
33 import org.directwebremoting.ServerContextFactory.ServerContextBuilder;
34 import org.directwebremoting.WebContextFactory.WebContextBuilder;
35 import org.directwebremoting.dwrp.DefaultConverterManager;
36 import org.directwebremoting.dwrp.HtmlCallMarshaller;
37 import org.directwebremoting.dwrp.PlainCallMarshaller;
38 import org.directwebremoting.extend.AccessControl;
39 import org.directwebremoting.extend.AjaxFilterManager;
40 import org.directwebremoting.extend.Configurator;
41 import org.directwebremoting.extend.ConverterManager;
42 import org.directwebremoting.extend.Creator;
43 import org.directwebremoting.extend.CreatorManager;
44 import org.directwebremoting.extend.DebugPageGenerator;
45 import org.directwebremoting.extend.DwrConstants;
46 import org.directwebremoting.extend.Handler;
47 import org.directwebremoting.extend.PageNormalizer;
48 import org.directwebremoting.extend.Remoter;
49 import org.directwebremoting.extend.ScriptSessionManager;
50 import org.directwebremoting.extend.ServerLoadMonitor;
51 import org.directwebremoting.servlet.AboutHandler;
52 import org.directwebremoting.servlet.AuthHandler;
53 import org.directwebremoting.servlet.DwrWebContextFilter;
54 import org.directwebremoting.servlet.EngineHandler;
55 import org.directwebremoting.servlet.HtmlCallHandler;
56 import org.directwebremoting.servlet.HtmlPollHandler;
57 import org.directwebremoting.servlet.IndexHandler;
58 import org.directwebremoting.servlet.InterfaceHandler;
59 import org.directwebremoting.servlet.PathConstants;
60 import org.directwebremoting.servlet.PlainCallHandler;
61 import org.directwebremoting.servlet.PlainPollHandler;
62 import org.directwebremoting.servlet.TestHandler;
63 import org.directwebremoting.servlet.UrlProcessor;
64 import org.directwebremoting.servlet.UtilHandler;
65 import org.directwebremoting.servlet.WebworkUtilHandler;
66 import org.directwebremoting.util.LocalUtil;
67 import org.directwebremoting.util.Logger;
68 import org.xml.sax.SAXException JavaDoc;
69
70 /**
71  * An abstraction of all the common servlet operations that are required to host
72  * a DWR service that depends on the servlet spec.
73  * It would be good to have a base class for all servlet operations, however
74  * lack of MI prevents us from doing this.
75  * @author Joe Walker [joe at getahead dot ltd dot uk]
76  */

77 public class ContainerUtil
78 {
79     /**
80      * Create a {@link DefaultContainer}, allowing users to upgrade to a child
81      * of DefaultContainer using an {@link ServletConfig} init parameter of
82      * <code>org.directwebremoting.Container</code>. Note that while the
83      * parameter name is the classname of {@link Container}, currently the only
84      * this can only be used to create children that inherit from
85      * {@link DefaultContainer}. This restriction may be relaxed in the future.
86      * Unlike {@link #setupDefaultContainer(DefaultContainer, ServletConfig)},
87      * this method does not call any setup methods.
88      * @param servletConfig The source of init parameters
89      * @return An unsetup implementaion of DefaultContainer
90      * @throws ServletException If the specified class could not be found
91      * @see ServletConfig#getInitParameter(String)
92      */

93     public static DefaultContainer createDefaultContainer(ServletConfig JavaDoc servletConfig) throws ServletException JavaDoc
94     {
95         try
96         {
97             String JavaDoc typeName = servletConfig.getInitParameter(Container.class.getName());
98             if (typeName == null)
99             {
100                 return new DefaultContainer();
101             }
102
103             log.debug("Using alternate Container implementation: " + typeName);
104             Class JavaDoc type = LocalUtil.classForName(typeName);
105             return (DefaultContainer) type.newInstance();
106         }
107         catch (Exception JavaDoc ex)
108         {
109             throw new ServletException JavaDoc(ex);
110         }
111     }
112
113     /**
114      * Setup a {@link DefaultContainer}.
115      * Using {@link #createDefaultContainer(ServletConfig)} followed by
116      * {@link #setupFromServletConfig(DefaultContainer, ServletConfig)} before
117      * calling {@link DefaultContainer#setupFinished()}.
118      * @param container The container to configure
119      * @param servletConfig The source of init parameters
120      * @throws InstantiationException If we can't instantiate a bean
121      * @throws IllegalAccessException If we have access problems creating a bean
122      */

123     public static void setupDefaultContainer(DefaultContainer container, ServletConfig JavaDoc servletConfig) throws InstantiationException JavaDoc, IllegalAccessException JavaDoc
124     {
125         setupDefaults(container, servletConfig);
126         setupFromServletConfig(container, servletConfig);
127         container.setupFinished();
128     }
129
130     /**
131      * Take a DefaultContainer and setup the default beans
132      * @param container The container to configure
133      * @param servletConfig The source of init parameters
134      * @throws InstantiationException If we can't instantiate a bean
135      * @throws IllegalAccessException If we have access problems creating a bean
136      */

137     public static void setupDefaults(DefaultContainer container, ServletConfig JavaDoc servletConfig) throws InstantiationException JavaDoc, IllegalAccessException JavaDoc
138     {
139         container.addParameter(AccessControl.class.getName(), DefaultAccessControl.class.getName());
140         container.addParameter(ConverterManager.class.getName(), DefaultConverterManager.class.getName());
141         container.addParameter(CreatorManager.class.getName(), DefaultCreatorManager.class.getName());
142         container.addParameter(UrlProcessor.class.getName(), UrlProcessor.class.getName());
143         container.addParameter(WebContextBuilder.class.getName(), DefaultWebContextBuilder.class.getName());
144         container.addParameter(ServerContextBuilder.class.getName(), DefaultServerContextBuilder.class.getName());
145         container.addParameter(AjaxFilterManager.class.getName(), DefaultAjaxFilterManager.class.getName());
146         container.addParameter(Remoter.class.getName(), DefaultRemoter.class.getName());
147         container.addParameter(DebugPageGenerator.class.getName(), DefaultDebugPageGenerator.class.getName());
148         container.addParameter(PlainCallMarshaller.class.getName(), PlainCallMarshaller.class.getName());
149         container.addParameter(HtmlCallMarshaller.class.getName(), HtmlCallMarshaller.class.getName());
150         container.addParameter(PlainPollHandler.class.getName(), PlainPollHandler.class.getName());
151         container.addParameter(HtmlPollHandler.class.getName(), HtmlPollHandler.class.getName());
152         container.addParameter(ScriptSessionManager.class.getName(), DefaultScriptSessionManager.class.getName());
153         container.addParameter(PageNormalizer.class.getName(), DefaultPageNormalizer.class.getName());
154
155         if (servletConfig.getServletContext().getServerInfo().startsWith("jetty-6"))
156         {
157             container.addParameter(ServerLoadMonitor.class.getName(), ThreadDroppingServerLoadMonitor.class.getName());
158         }
159         else
160         {
161             container.addParameter(ServerLoadMonitor.class.getName(), DefaultServerLoadMonitor.class.getName());
162         }
163
164         // Mapping handlers to URLs
165
createUrlMapping(container, "/index.html", "indexHandlerUrl", IndexHandler.class);
166         createUrlMapping(container, "/engine.js", "engineHandlerUrl", EngineHandler.class);
167         createUrlMapping(container, "/util.js", "utilHandlerUrl", UtilHandler.class);
168         createUrlMapping(container, "/auth.js", "authHandlerUrl", AuthHandler.class);
169         createUrlMapping(container, "/webwork/DWRActionUtil.js", "webworkUtilHandlerUrl", WebworkUtilHandler.class);
170         createUrlMapping(container, "/about", "aboutHandlerUrl", AboutHandler.class);
171         createUrlMapping(container, "/test/", "testHandlerUrl", TestHandler.class);
172         createUrlMapping(container, "/interface/", "interfaceHandlerUrl", InterfaceHandler.class);
173
174         // The Poll and Call URLs can not be changed easily because they are
175
// referenced from engine.js. Maybe one day this would be a good
176
// extension
177
createUrlMapping(container, "/call/plaincall/", "plainCallHandlerUrl", PlainCallHandler.class);
178         createUrlMapping(container, "/call/plainpoll/", "plainPollHandlerUrl", PlainPollHandler.class);
179         createUrlMapping(container, "/call/htmlcall/", "htmlCallHandlerUrl", HtmlCallHandler.class);
180         createUrlMapping(container, "/call/htmlpoll/", "htmlPollHandlerUrl", HtmlPollHandler.class);
181     }
182
183     /**
184      * Creates entries in the {@link Container} so 2 lookups are possible.
185      * <ul>
186      * <li>You can find a {@link Handler} for a URL. Used by {@link UrlProcessor}
187      * <li>You can inject (or lookup) the URL assigned to a {@link Handler}
188      * </ul>
189      * @param container The container to create the entries in
190      * @param url The URL of the new {@link Handler}
191      * @param propertyName The property name (for injection and lookup)
192      * @param handler The class of Handler
193      * @throws InstantiationException From {@link DefaultContainer#addParameter(Object, Object)}
194      * @throws IllegalAccessException From {@link DefaultContainer#addParameter(Object, Object)}
195      */

196     public static void createUrlMapping(DefaultContainer container, String JavaDoc url, String JavaDoc propertyName, Class JavaDoc handler) throws InstantiationException JavaDoc, IllegalAccessException JavaDoc
197     {
198         container.addParameter(PathConstants.URL_PREFIX + url, handler.getName());
199         container.addParameter(propertyName, url);
200     }
201
202     /**
203      * Take a DefaultContainer and setup the default beans
204      * @param container The container to configure
205      * @param servletConfig The servlet configuration (null to ignore)
206      * @throws InstantiationException If we can't instantiate a bean
207      * @throws IllegalAccessException If we have access problems creating a bean
208      */

209     public static void setupFromServletConfig(DefaultContainer container, ServletConfig JavaDoc servletConfig) throws InstantiationException JavaDoc, IllegalAccessException JavaDoc
210     {
211         Enumeration JavaDoc en = servletConfig.getInitParameterNames();
212         while (en.hasMoreElements())
213         {
214             String JavaDoc name = (String JavaDoc) en.nextElement();
215             String JavaDoc value = servletConfig.getInitParameter(name);
216             container.addParameter(name, value);
217         }
218     }
219
220     /**
221      * Make some changes to the ServletContext so {@link DwrWebContextFilter}
222      * can find the Container etc.
223      * @param context The servlet context
224      * @param config The servlet configuration
225      * @param container The container to save in the ServletContext
226      * @param webContextBuilder The WebContextBuilder to save
227      * @param servlet The Servlet to save
228      */

229     public static void prepareForWebContextFilter(ServletContext JavaDoc context, ServletConfig JavaDoc config, Container container, WebContextBuilder webContextBuilder, HttpServlet JavaDoc servlet)
230     {
231         context.setAttribute(Container.class.getName(), container);
232         context.setAttribute(WebContextBuilder.class.getName(), webContextBuilder);
233         context.setAttribute(ServletConfig JavaDoc.class.getName(), config);
234         context.setAttribute(HttpServlet JavaDoc.class.getName(), servlet);
235     }
236
237     /**
238      * Configure using the system dwr.xml from within the JAR file.
239      * @param container The container to configure
240      * @throws ParserConfigurationException If the config file parse fails
241      * @throws IOException If the config file read fails
242      * @throws SAXException If the config file parse fails
243      */

244     public static void configureFromSystemDwrXml(Container container) throws IOException JavaDoc, ParserConfigurationException JavaDoc, SAXException JavaDoc
245     {
246         DwrXmlConfigurator system = new DwrXmlConfigurator();
247         system.setClassResourceName(DwrConstants.FILE_DWR_XML);
248         system.configure(container);
249     }
250
251     /**
252      * Configure using the users dwr.xml that sits next in WEB-INF
253      * @param container The container to configure
254      * @throws ParserConfigurationException If the config file parse fails
255      * @throws IOException If the config file read fails
256      * @throws SAXException If the config file parse fails
257      */

258     public static void configureFromDefaultDwrXml(Container container) throws IOException JavaDoc, ParserConfigurationException JavaDoc, SAXException JavaDoc
259     {
260         DwrXmlConfigurator local = new DwrXmlConfigurator();
261         local.setServletResourceName(DwrConstants.DEFAULT_DWR_XML);
262         local.configure(container);
263     }
264
265     /**
266      * Add configurators from init params to the end of the list of
267      * configurators.
268      * @param container The container to configure
269      * @param servletConfig The source of init parameters
270      * @return true if any Configurators were read
271      * @throws SAXException If the config file parse fails
272      * @throws ParserConfigurationException If the config file parse fails
273      * @throws IOException If the config file read fails
274      */

275     public static boolean configureFromInitParams(Container container, ServletConfig JavaDoc servletConfig) throws IOException JavaDoc, ParserConfigurationException JavaDoc, SAXException JavaDoc
276     {
277         Enumeration JavaDoc en = servletConfig.getInitParameterNames();
278         boolean foundConfig = false;
279         while (en.hasMoreElements())
280         {
281             String JavaDoc name = (String JavaDoc) en.nextElement();
282             String JavaDoc value = servletConfig.getInitParameter(name);
283
284             // if the init param starts with "config" then try to load it
285
if (name.startsWith(INIT_CONFIG))
286             {
287                 foundConfig = true;
288
289                 StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(value, "\n,");
290                 while (st.hasMoreTokens())
291                 {
292                     String JavaDoc fileName = st.nextToken().trim();
293                     DwrXmlConfigurator local = new DwrXmlConfigurator();
294                     local.setServletResourceName(fileName);
295                     local.configure(container);
296                 }
297             }
298             else if (name.equals(INIT_CUSTOM_CONFIGURATOR))
299             {
300                 foundConfig = true;
301
302                 try
303                 {
304                     Configurator configurator = (Configurator) LocalUtil.classNewInstance(INIT_CUSTOM_CONFIGURATOR, value, Configurator.class);
305                     configurator.configure(container);
306                     log.debug("Loaded config from: " + value);
307                 }
308                 catch (Exception JavaDoc ex)
309                 {
310                     log.warn("Failed to start custom configurator", ex);
311                 }
312             }
313         }
314
315         return foundConfig;
316     }
317
318     /**
319      * Annotations must not break 1.3, so we use reflection to create an
320      * <code>org.directwebremoting.annotations.AnnotationsConfigurator</code>
321      * and the catch all sorts of random exceptions for the benefit of
322      * Websphere.
323      * @param container The container to configure
324      * @return true if the configuration worked.
325      */

326     public static boolean configureFromAnnotations(Container container)
327     {
328         try
329         {
330             Class JavaDoc annotationCfgClass = LocalUtil.classForName("org.directwebremoting.annotations.AnnotationsConfigurator");
331
332             Configurator configurator = (Configurator) annotationCfgClass.newInstance();
333             configurator.configure(container);
334
335             log.debug("Java5 AnnotationsConfigurator enabled");
336             return true;
337         }
338         catch (UnsupportedClassVersionError JavaDoc ex)
339         {
340             // This will happen in JDK 1.4 and below
341
return false;
342         }
343         catch (ClassNotFoundException JavaDoc ex)
344         {
345             // This will happen when run in an IDE without the java5 tree
346
log.warn("AnnotationsConfigurator is missing. Are you running from within an IDE?");
347             return false;
348         }
349         catch (Exception JavaDoc ex)
350         {
351             // This happens if there is a bug in AnnotationsConfigurator
352
log.warn("Failed to start annotations", ex);
353             return false;
354         }
355         catch (Throwable JavaDoc ex)
356         {
357             if (ex.getClass().getName().equals(UnsupportedClassVersionError JavaDoc.class.getName()))
358             {
359                 log.error("Caught impossible Throwable", ex);
360                 return false;
361             }
362             else if (ex.getClass().getName().equals(LinkageError JavaDoc.class.getName()))
363             {
364                 log.error("Caught impossible Throwable", ex);
365                 return false;
366             }
367             else if (ex instanceof Error JavaDoc)
368             {
369                 log.fatal("Rethrowing Error:" + ex);
370                 throw (Error JavaDoc) ex;
371             }
372             else
373             {
374                 // This can't happen: We've handled all Exceptions, and
375
// Errors, so we can't get to execute this code.
376
log.error("Ilogical catch state", ex);
377                 return false;
378             }
379         }
380     }
381
382     /**
383      * Allow all the configurators to have a go at the container in turn
384      * @param container The container to configure
385      * @param configurators A list of configurators to run against the container
386      */

387     public static void configure(Container container, List JavaDoc configurators)
388     {
389         // Allow all the configurators to have a go
390
for (Iterator JavaDoc it = configurators.iterator(); it.hasNext();)
391         {
392             Configurator configurator = (Configurator) it.next();
393
394             log.debug("** Adding config from " + configurator);
395             configurator.configure(container);
396         }
397     }
398
399     /**
400      * Run all the default configuration options on a Container
401      * @param container The container to configure
402      * @param servletConfig The source of init parameters
403      * @throws SAXException If the config file parse fails
404      * @throws ParserConfigurationException If the config file parse fails
405      * @throws IOException If the config file read fails
406      */

407     public static void configureContainerFully(Container container, ServletConfig JavaDoc servletConfig) throws IOException JavaDoc, ParserConfigurationException JavaDoc, SAXException JavaDoc
408     {
409         configureFromSystemDwrXml(container);
410         boolean foundConfig = configureFromInitParams(container, servletConfig);
411
412         // The default dwr.xml file that sits by web.xml
413
boolean skip = Boolean.valueOf(servletConfig.getInitParameter(INIT_SKIP_DEFAULT)).booleanValue();
414         IOException JavaDoc delayedIOException = null;
415         if (!foundConfig && !skip)
416         {
417             try
418             {
419                 configureFromDefaultDwrXml(container);
420             }
421             catch (IOException JavaDoc ex)
422             {
423                 // This is fatal unless we are on JDK5+ AND using annotations
424
delayedIOException = ex;
425             }
426         }
427
428         if (!configureFromAnnotations(container))
429         {
430             log.debug("Java5 AnnotationsConfigurator disabled");
431
432             if (delayedIOException != null)
433             {
434                 throw delayedIOException;
435             }
436         }
437     }
438
439     /**
440      * If helps some situations if people can get at the container by looking
441      * in the servlet context, under some name.
442      * The name is specified in an initParameter.
443      * @param container The container to publish
444      * @param servletConfig Source of initParams to dictate publishing and contexts to publish to
445      */

446     public static void publishContainer(Container container, ServletConfig JavaDoc servletConfig)
447     {
448         ServletContext JavaDoc servletContext = servletConfig.getServletContext();
449
450         String JavaDoc publishName = servletConfig.getInitParameter(INIT_PUBLISH_CONTAINER);
451         if (publishName != null)
452         {
453             servletContext.setAttribute(publishName, container);
454         }
455
456         List JavaDoc containers = (List JavaDoc) servletContext.getAttribute(ATTRIBUTE_CONTAINER_LIST);
457         if (containers == null)
458         {
459             containers = new ArrayList JavaDoc();
460         }
461         containers.add(container);
462         servletContext.setAttribute(ATTRIBUTE_CONTAINER_LIST, containers);
463     }
464
465     /**
466      * Get a list of all known Containers for the given {@link ServletContext}
467      * @param servletContext The context in which {@link Container}s are stored.
468      * @return a list of published {@link Container}s.
469      */

470     public static List JavaDoc getAllPublishedContainers(ServletContext JavaDoc servletContext)
471     {
472         List JavaDoc containers = (List JavaDoc) servletContext.getAttribute(ATTRIBUTE_CONTAINER_LIST);
473         if (containers == null)
474         {
475             containers = new ArrayList JavaDoc();
476         }
477
478         return containers;
479     }
480
481     /**
482      * Internal use only.
483      * <p>If we detect that the server is being shutdown then we want to kill
484      * any reverse ajax threads.
485      * @param containers The list of containers to look for ServerLoadMonitors in
486      * @param title What causes this (for debug purposes)
487      */

488     public static void shutdownServerLoadMonitorsInContainerList(List JavaDoc containers, String JavaDoc title)
489     {
490         if (containers == null || containers.size() == 0)
491         {
492             log.debug("No containers to shutdown for: " + title);
493             return;
494         }
495
496         log.debug("Shutting down containers for: " + title);
497         for (Iterator JavaDoc it = containers.iterator(); it.hasNext();)
498         {
499             Container container = (Container) it.next();
500             ServerLoadMonitor monitor = (ServerLoadMonitor) container.getBean(ServerLoadMonitor.class.getName());
501             monitor.shutdown();
502         }
503     }
504
505     /**
506      * Create a bunch of debug information about a container
507      * @param container The container to print debug information about
508      */

509     public static void debugConfig(Container container)
510     {
511         if (log.isDebugEnabled())
512         {
513             // Container level debug
514
log.debug("Container");
515             log.debug(" Type: " + container.getClass().getName());
516             Collection JavaDoc beanNames = container.getBeanNames();
517             for (Iterator JavaDoc it = beanNames.iterator(); it.hasNext();)
518             {
519                 String JavaDoc name = (String JavaDoc) it.next();
520                 Object JavaDoc object = container.getBean(name);
521
522                 if (object instanceof String JavaDoc)
523                 {
524                     log.debug(" Param: " + name + " = " + object + " (" + object.getClass().getName() + ")");
525                 }
526                 else
527                 {
528                     log.debug(" Bean: " + name + " = " + object + " (" + object.getClass().getName() + ")");
529                 }
530             }
531
532             // AccessControl debugging
533
AccessControl accessControl = (AccessControl) container.getBean(AccessControl.class.getName());
534             log.debug("AccessControl");
535             log.debug(" Type: " + accessControl.getClass().getName());
536
537             // AjaxFilterManager debugging
538
AjaxFilterManager ajaxFilterManager = (AjaxFilterManager) container.getBean(AjaxFilterManager.class.getName());
539             log.debug("AjaxFilterManager");
540             log.debug(" Type: " + ajaxFilterManager.getClass().getName());
541
542             // ConverterManager debugging
543
ConverterManager converterManager = (ConverterManager) container.getBean(ConverterManager.class.getName());
544             log.debug("ConverterManager");
545             log.debug(" Type: " + converterManager.getClass().getName());
546
547             // CreatorManager debugging
548
CreatorManager creatorManager = (CreatorManager) container.getBean(CreatorManager.class.getName());
549             log.debug("CreatorManager");
550             log.debug(" Type: " + creatorManager.getClass().getName());
551             Collection JavaDoc creatorNames = creatorManager.getCreatorNames();
552             for (Iterator JavaDoc it = creatorNames.iterator(); it.hasNext();)
553             {
554                 String JavaDoc creatorName = (String JavaDoc) it.next();
555                 Creator creator = creatorManager.getCreator(creatorName);
556                 log.debug(" Creator: " + creatorName + " = " + creator + " (" + creator.getClass().getName() + ")");
557             }
558         }
559     }
560
561     /**
562      * Init parameter: Set a dwr.xml config file.
563      * This is only a prefix since we might have more than 1 config file.
564      */

565     public static final String JavaDoc INIT_CONFIG = "config";
566
567     /**
568      * Init parameter: Skip reading the default config file if none are specified.
569      */

570     public static final String JavaDoc INIT_SKIP_DEFAULT = "skipDefaultConfig";
571
572     /**
573      * Init parameter: If we are doing Servlet.log logging, to what level?
574      */

575     public static final String JavaDoc INIT_LOGLEVEL = "logLevel";
576
577     /**
578      * Init parameter: Should we publish the {@link Container} to the servlet
579      * context, and if so, under what name?
580      */

581     public static final String JavaDoc INIT_PUBLISH_CONTAINER = "publishContainerAs";
582
583     /**
584      * Init parameter: If you wish to use a custom configurator, place its
585      * class name here
586      */

587     public static final String JavaDoc INIT_CUSTOM_CONFIGURATOR = "customConfigurator";
588
589     /**
590      * The name under which we publish all {@link Container}s.
591      */

592     public static final String JavaDoc ATTRIBUTE_CONTAINER_LIST = "org.directwebremoting.ContainerList";
593
594     /**
595      * The log stream
596      */

597     private static final Logger log = Logger.getLogger(ContainerUtil.class);
598 }
599
Popular Tags