svn commit: r565753 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Tue Aug 14 06:46:22 2007
New Revision: 565753

URL: http://svn.apache.org/viewvc?view=rev&rev=565753
Log:
Don't store DocumentFactory instance in PublicationFactory, this seemed to cause trouble (see bug 43110)

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java?view=diff&rev=565753&r1=565752&r2=565753
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java Tue Aug 14 06:46:22 2007
@@ -29,23 +29,20 @@
 public class PublicationFactory implements RepositoryItemFactory {
 
     private ServiceManager manager;
-    private DocumentFactory factory;
     private PublicationConfiguration config;
 
     /**
      * @param manager The service manager.
-     * @param factory The document factory.
      * @param config The publication configuration.
      */
-    public PublicationFactory(ServiceManager manager, DocumentFactory factory,
-            PublicationConfiguration config) {
+    public PublicationFactory(ServiceManager manager, PublicationConfiguration config) {
         this.manager = manager;
-        this.factory = factory;
         this.config = config;
     }
 
     public RepositoryItem buildItem(Session session, String key) throws RepositoryException {
-        return new PublicationImpl(this.manager, this.factory, config);
+        DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
+        return new PublicationImpl(this.manager, factory, config);
     }
 
     public String getItemType() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.