[jboss-cvs] JBossAS SVN: r57274 - branches/JBoss_4_0_2_CP/jaxrpc/src/main/org/jboss/axis/encoding

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 28 23:05:59 EDT 2006


Author: ryan.campbell at jboss.com
Date: 2006-09-28 23:05:56 -0400 (Thu, 28 Sep 2006)
New Revision: 57274

Modified:
   branches/JBoss_4_0_2_CP/jaxrpc/src/main/org/jboss/axis/encoding/DeserializationContextImpl.java
Log:
ASPATCH-74: JBWS-372: WebService isn't called through ServiceFactory on jdk5 (JBWS-187)

Modified: branches/JBoss_4_0_2_CP/jaxrpc/src/main/org/jboss/axis/encoding/DeserializationContextImpl.java
===================================================================
--- branches/JBoss_4_0_2_CP/jaxrpc/src/main/org/jboss/axis/encoding/DeserializationContextImpl.java	2006-09-29 02:43:50 UTC (rev 57273)
+++ branches/JBoss_4_0_2_CP/jaxrpc/src/main/org/jboss/axis/encoding/DeserializationContextImpl.java	2006-09-29 03:05:56 UTC (rev 57274)
@@ -259,7 +259,7 @@
             try
             {
                // cleanup - so that the parser can be reused.
-               parser.setProperty("http://xml.org/sax/properties/lexical-handler", null);
+               parser.setProperty("http://xml.org/sax/properties/lexical-handler", nullLexicalHandler);
             }
             catch (SAXException se)
             {
@@ -1383,5 +1383,25 @@
    {
       return XMLUtils.getEmptyInputSource();
    }
+   
+   /** We only need one instance of this dummy handler to set into the parsers. */
+   private static final NullLexicalHandler nullLexicalHandler = new NullLexicalHandler();
+
+   /**
+    * It is illegal to set the lexical-handler property to null. To facilitate
+    * discarding the heavily loaded instance of DeserializationContextImpl from
+    * the SAXParser instance that is kept in the Stack maintained by XMLUtils
+    * we use this class.
+    */
+   private static class NullLexicalHandler implements LexicalHandler
+   {
+      public void startDTD(String arg0, String arg1, String arg2) throws SAXException {}
+   	  public void endDTD() throws SAXException {}
+   	  public void startEntity(String arg0) throws SAXException {}
+   	  public void endEntity(String arg0) throws SAXException {}
+   	  public void startCDATA() throws SAXException {}
+   	  public void endCDATA() throws SAXException {}
+   	  public void comment(char[] arg0, int arg1, int arg2) throws SAXException {}
+   } 
 }
 




More information about the jboss-cvs-commits mailing list