[EMAIL PROTECTED] wrote:
Author: andreas
Date: Wed Aug 15 09:26:55 2007
New Revision: 566245
URL: http://svn.apache.org/viewvc?view=rev&rev=566245
Log:
SiteTree: store node factory as field to improve performance
Modified:
lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java
+
+ private NodeFactory nodeFactory;
+
+ protected NodeFactory getNodeFactory() {
+ if (this.nodeFactory == null) {
+ try {
+ this.nodeFactory = (NodeFactory)
manager.lookup(NodeFactory.ROLE);
+ } catch (ServiceException e) {
+ throw new RuntimeException("Creating repository node failed:
", e);
+ }
+ }
+ return this.nodeFactory;
+ }
Shouldn't this be synchronized?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]