Changeset 4bbbb285070c244ad7eca783a459593a741c6d3b

Show
Ignore:
Timestamp:
04/02/12 17:00:24 (2 years ago)
Author:
Philip Maddox <pmaddox@circonus.com>
git-committer:
Philip Maddox <pmaddox@circonus.com> 1333386024 -0400
git-parent:

[b2a08ebd72aed85e425a8b853ac201b7faac0453]

git-author:
Philip Maddox <pmaddox@circonus.com> 1333386024 -0400
Message:

Moved declaring and initializing DocumentBuilder? object into dopost method - the way it was, if more than one thread attempted to call dopost, they would clash and produce an error; this makes it thread safe

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/com/omniti/jezebel/JezebelDispatch.java

    rb553f9a r4bbbb28  
    6565      new JezebelClassLoader(JezebelDispatch.class.getClassLoader()); 
    6666 
    67     DocumentBuilder builder; 
    68  
    6967    public JezebelDispatch() { 
    70       try { builder = builderfactory.newDocumentBuilder(); } 
    71       catch (Exception e) { throw new RuntimeException(e); } 
    7268    } 
    7369    public void doPost(HttpServletRequest request, 
     
    7571      Document postDoc; 
    7672      Hashtable<String,String> info, config; 
     73      DocumentBuilder builder; 
    7774 
     75      try { builder = builderfactory.newDocumentBuilder(); } 
     76      catch (Exception e) { throw new RuntimeException(e); } 
    7877      try { 
    7978        postDoc = builder.parse(request.getInputStream());