portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager FileSystemPAM.java
Date Thu, 04 Mar 2004 21:16:56 GMT
weaver      2004/03/04 13:16:56

  Modified:    portal/src/java/org/apache/jetspeed/capability/containers
                        capability-container.groovy
               portal/src/java/org/apache/jetspeed/tools/pamanager/containers
                        pa-container.groovy
               portal/src/java/org/apache/jetspeed/profiler/containers
                        profiler-container.groovy
               portal/src/java/org/apache/jetspeed/tools/pamanager
                        FileSystemPAM.java
  Log:
  reverting to ojb-Rc4 and PB
  
  Revision  Changes    Path
  1.5       +5 -3      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capability/containers/capability-container.groovy
  
  Index: capability-container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capability/containers/capability-container.groovy,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- capability-container.groovy	29 Feb 2004 06:02:41 -0000	1.4
  +++ capability-container.groovy	4 Mar 2004 21:16:55 -0000	1.5
  @@ -11,7 +11,8 @@
   import org.apache.jetspeed.components.datasource.DatasourceComponent
   import org.apache.commons.pool.impl.GenericObjectPool
   import org.apache.jetspeed.components.persistence.store.ojb.OJBTypeIntializer
  -import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +// import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +import org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore
   import org.apache.jetspeed.components.persistence.store.impl.DefaultPersistenceStoreContainer
   import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer
   
  @@ -48,8 +49,9 @@
   // Parameter[] storeParams = new Parameter[] {new ConstantParameter("jetspeed")}
   
   
  -Class OTMStoreClass = Class.forName("org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl")
  -ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreClass, new Parameter[]
{new ConstantParameter("jetspeed")})
  +
  +// ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreClass, new
Parameter[] {new ConstantParameter("jetspeed")})
  +ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", PBStore, new Parameter[]
{new ConstantParameter("jetspeed")})
   
   pContainer.registerComponent(ca)
   
  
  
  
  1.2       +4 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/containers/pa-container.groovy
  
  Index: pa-container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/containers/pa-container.groovy,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- pa-container.groovy	1 Mar 2004 04:22:28 -0000	1.1
  +++ pa-container.groovy	4 Mar 2004 21:16:55 -0000	1.2
  @@ -12,7 +12,8 @@
   import org.apache.jetspeed.components.datasource.DatasourceComponent
   import org.apache.commons.pool.impl.GenericObjectPool
   import org.apache.jetspeed.components.persistence.store.ojb.OJBTypeIntializer
  -import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +// import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +import org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore
   import org.apache.jetspeed.components.persistence.store.impl.DefaultPersistenceStoreContainer
   import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer
   import org.apache.jetspeed.components.util.system.FSSystemResourceUtilImpl
  @@ -55,7 +56,8 @@
   // Persistence
   PersistenceContainer pContainer = new DefaultPersistenceStoreContainer(300000, 10000)
   
  -ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreImpl, new Parameter[]
{new ConstantParameter("jetspeed")})
  +// ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreImpl, new
Parameter[] {new ConstantParameter("jetspeed")})
  +ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", PBStore, new Parameter[]
{new ConstantParameter("jetspeed")})
   
   pContainer.registerComponent(ca)
   
  
  
  
  1.4       +5 -3      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/containers/profiler-container.groovy
  
  Index: profiler-container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/containers/profiler-container.groovy,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- profiler-container.groovy	29 Feb 2004 05:10:03 -0000	1.3
  +++ profiler-container.groovy	4 Mar 2004 21:16:55 -0000	1.4
  @@ -11,7 +11,8 @@
   import org.apache.jetspeed.components.datasource.DatasourceComponent
   import org.apache.commons.pool.impl.GenericObjectPool
   import org.apache.jetspeed.components.persistence.store.ojb.OJBTypeIntializer
  -import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +// import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  +import org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore
   import org.apache.jetspeed.components.persistence.store.impl.DefaultPersistenceStoreContainer
   import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer
   import org.apache.jetspeed.page.PageManager
  @@ -53,8 +54,9 @@
   // Parameter[] storeParams = new Parameter[] {new ConstantParameter("jetspeed")}
   
   
  -Class OTMStoreClass = Class.forName("org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl")
  -ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreClass, new Parameter[]
{new ConstantParameter("jetspeed")})
  +
  +// ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreClass, new
Parameter[] {new ConstantParameter("jetspeed")})
  +ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", PBStore, new Parameter[]
{new ConstantParameter("jetspeed")})
   
   pContainer.registerComponent(ca)
   
  
  
  
  1.21      +15 -11    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java
  
  Index: FileSystemPAM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FileSystemPAM.java	27 Feb 2004 17:45:56 -0000	1.20
  +++ FileSystemPAM.java	4 Mar 2004 21:16:56 -0000	1.21
  @@ -152,12 +152,13 @@
   
           String portletAppDir = util.formatWebApplicationPath(webAppsDir, paName);
           String portletXMLPath = portletAppDir + "/WEB-INF/portlet.xml";
  +        PersistenceStore store = registry.getPersistenceStore();
           try
           {
               // Remove all registry entries
               // load the portlet.xml
               log.info("Loading " + portletXMLPath + " into memory....");
  -
  +            store.getTransaction().begin();
               MutablePortletApplication app = (MutablePortletApplication) registry.getPortletApplication(paName);
               // Application app = registry.loadPortletApplicationSettings(portletXMLPath,
paName);
   
  @@ -172,8 +173,10 @@
   
               // registry.processPortletApplicationTree(app, "remove");
               // locate the deployment home
  -
  +            
  +            
               registry.removeApplication(app);
  +            store.getTransaction().commit();
   
               // Remove the webapps directory
   
  @@ -417,15 +420,13 @@
   
           // save it to the registry
           log.info("Saving the portlet.xml in the registry...");
  -
  +        PersistenceStore store = registry.getPersistenceStore();
           try
           {
  -
  +            store.getTransaction().begin();
               registry.registerPortletApplication(app);
  -            log.info("Committing regsitry changes...");
  -            PersistenceStoreContainer pContainer = (PersistenceStoreContainer)Jetspeed.getComponentManager().getComponent(PersistenceStoreContainer.class);
  -            PersistenceStore store = pContainer.getStoreForThread("jetspeed");
  -            store.getTransaction().commit();            
  +            log.info("Committing registry changes...");
  +            store.getTransaction().commit();                        
   
           }
           catch (Exception e)
  @@ -433,6 +434,7 @@
               String msg =
                   "Unable to register portlet application, " + app.getName() + ", through
the portlet registry: " + e.toString();
               log.error(msg, e);
  +            store.getTransaction().rollback();
               throw new RegistryException(msg, e);
           }
   
  @@ -483,19 +485,21 @@
        */
       protected void rollbackRegistry(MutablePortletApplication app)
       {
  +        PersistenceStore store = registry.getPersistenceStore();
           try
           {
   
               // remove entries from the registry
               // registry.processPortletApplicationTree(app, "remove");
  +            store.getTransaction().begin();
               log.info("Saving the portlet.xml in the registry...");
               registry.removeApplication(app);
  -
  +            store.getTransaction().commit();
           }
   
           catch (Exception e1)
           {
  -
  +            store.getTransaction().rollback();
               log.error("Error processing rollback.  Attempting to rollback registry transaction.",
e1);
   
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message