|
Re: pretty printing page output: msg#00115java.enhydra.xmlc
At 11:15 PM 9/17/2003 -0700, you wrote: On Wednesday, September 17, 2003, at 09:50 PM, Jacob Kjome wrote: I suspect this has to do with the way the JBoss class loader works. I bet a restart using a standalone version of Tomcat would work just fine. XMLCContext caches a reference to itself as a singleton in the servlet context object. I'm not sure how JBoss reloads apps, but it must not kill the WebappClassLoader since it is really part of the larger class loader. If the class loader doesn't die, then the XMLCContext might not be dying. What might be happening is that the static variable values are being retained. In this case, the following code would be a problem.... public static XMLCContext getContext(ServletContext servletContext) { if (initialized == false) { synchronized (synch) { // Now that we are synched, check to see if we are really not yet initialized. If so, initialize. XMLCContext context = (XMLCContext)servletContext.getAttribute(CONTEXT_ATTRIBUTE); if (context == null) { context = new XMLCContextInit().createContext(servletContext); servletContext.setAttribute(CONTEXT_ATTRIBUTE, context); } initialized = true; } } return (XMLCContext)servletContext.getAttribute(CONTEXT_ATTRIBUTE); } Notice the "initialized" static variable. If it is "true", then null check for the XMLCContext object in the servlet context will never be done. I'm attaching a modified source and compiled XMLCContext class in a zip file. Please let me know if this solves your problem. Note that I compiled this with j2sdk1.4.2_01. If this causes binary compatibility problems, you can try compiling it yourself. The DOMFormatter does not suffer from this problem so I'm using it for now. Only thing is that I've made use of OutputOptions and I still see no change in the source output. Hmm... That's really weird. Let me research this a bit and I'll get back to you. Jake Thanks,
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: pretty printing page output, Petr Stehlik |
|---|---|
| Next by Date: | Re: pretty printing page output, Jacob Kjome |
| Previous by Thread: | Re: pretty printing page output, Petr Stehlik |
| Next by Thread: | Re: pretty printing page output, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |