[jdom-interest] Using XPath in Multi-Threaded Env
Rajan Gupta
rgupta99_1999 at yahoo.com
Thu Jun 5 10:10:02 PDT 2003
All,
Is it possible to reuse an instance of XPath across multiple threads of
execution using different instances of DOM Documents in each thread?
I was looking at the code in JaxenPath.java & noticed that context is
stored as an attribute of the class, while not being really used anywhere
except in translateNamespacePrefixToUri() method. Following is a code
snippet.
public List selectNodes(Object context) throws JDOMException {
try {
currentContext = context;
return xPath.selectNodes(context);
}
catch (JaxenException ex1) {
throw new JDOMException("XPath error while evaluating \"" +
xPath.toString() + "\": " + ex1.getMessage(),
ex1);
}
finally {
currentContext = null;
}
}
Thanks in advance,
Rajan
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
More information about the jdom-interest
mailing list