You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/02 00:16:37 UTC
svn commit: r617699 -
/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java
Author: andreas
Date: Fri Feb 1 15:16:28 2008
New Revision: 617699
URL: http://svn.apache.org/viewvc?rev=617699&view=rev
Log:
Store static reference to (thread safe) publication manager in DocumentFactory to improve performance.
Modified:
lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java
Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java?rev=617699&r1=617698&r2=617699&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java Fri Feb 1 15:16:28 2008
@@ -335,17 +335,17 @@
return getPubManager().getPublications(this);
}
- private PublicationManager pubManager;
+ private static PublicationManager pubManager;
protected PublicationManager getPubManager() {
- if (this.pubManager == null) {
+ if (pubManager == null) {
try {
- this.pubManager = (PublicationManager) this.manager.lookup(PublicationManager.ROLE);
+ pubManager = (PublicationManager) this.manager.lookup(PublicationManager.ROLE);
} catch (ServiceException e) {
throw new RuntimeException(e);
}
}
- return this.pubManager;
+ return pubManager;
}
public boolean existsPublication(String id) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org