Changeset 4bbbb285070c244ad7eca783a459593a741c6d3b
- Timestamp:
- 04/02/12 17:00:24
(1 year 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
| rb553f9a |
r4bbbb28 |
|
| 65 | 65 | new JezebelClassLoader(JezebelDispatch.class.getClassLoader()); |
|---|
| 66 | 66 | |
|---|
| 67 | | DocumentBuilder builder; |
|---|
| 68 | | |
|---|
| 69 | 67 | public JezebelDispatch() { |
|---|
| 70 | | try { builder = builderfactory.newDocumentBuilder(); } |
|---|
| 71 | | catch (Exception e) { throw new RuntimeException(e); } |
|---|
| 72 | 68 | } |
|---|
| 73 | 69 | public void doPost(HttpServletRequest request, |
|---|
| … | … | |
| 75 | 71 | Document postDoc; |
|---|
| 76 | 72 | Hashtable<String,String> info, config; |
|---|
| | 73 | DocumentBuilder builder; |
|---|
| 77 | 74 | |
|---|
| | 75 | try { builder = builderfactory.newDocumentBuilder(); } |
|---|
| | 76 | catch (Exception e) { throw new RuntimeException(e); } |
|---|
| 78 | 77 | try { |
|---|
| 79 | 78 | postDoc = builder.parse(request.getInputStream()); |
|---|