portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject svn commit: r225857 [2/2] - in /portals/jetspeed-2/trunk: components/portal/src/test/META-INF/ components/portal/src/test/org/apache/jetspeed/userinfo/ components/profiler/ components/profiler/src/java/META-INF/ components/profiler/src/java/META-INF/oj...
Date Thu, 28 Jul 2005 19:35:17 GMT
Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
Thu Jul 28 12:34:51 2005
@@ -17,16 +17,13 @@
 
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Locale;
-import java.util.Map;
 
 import javax.portlet.PortletMode;
 
-import junit.framework.TestCase;
-
 import org.apache.jetspeed.components.persistence.store.LockFailedException;
+import org.apache.jetspeed.components.test.AbstractSpringTestCase;
 import org.apache.jetspeed.om.common.DublinCore;
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
@@ -44,7 +41,6 @@
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
-import org.apache.jetspeed.testhelpers.OJBHelper;
 import org.apache.jetspeed.util.JetspeedLocale;
 import org.apache.pluto.om.common.PreferenceSetCtrl;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
@@ -53,45 +49,44 @@
  * <p>
  * TestPortletRegistryDAO
  * </p>
- * <p>
- *
- * </p>
+ * 
  * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
  * @version $Id$
- *
  */
-public class TestPortletRegistryDAO extends  TestCase
+public class TestPortletRegistryDAO extends AbstractSpringTestCase
 {
     public static final String APP_1_NAME = "RegistryTestPortlet";
+
     protected static final String MODE_EDIT = "EDIT";
+
     protected static final String MODE_HELP = "HELP";
+
     protected static final String MODE_VIEW = "VIEW";
+
     protected static final String PORTLET_0_CLASS = "com.portlet.MyClass0";
+
     protected static final String PORTLET_0_NAME = "Portlet 0";
+
     protected static final String PORTLET_0_UID = "com.portlet.MyClass0.Portlet 0";
+
     protected static final String PORTLET_1_CLASS = "com.portlet.MyClass";
+
     protected static final String PORTLET_1_NAME = "Portlet 1";
+
     protected static final String PORTLET_1_UID = "com.portlet.MyClass.Portlet 1";
-    
+
     protected PortletRegistry portletRegistry;
-    private OJBHelper ojbHelper;
-    
+
     /*
      * @see TestCase#setUp()
      */
     protected void setUp() throws Exception
     {
-           
-        Map context = new HashMap();
-        ojbHelper = new OJBHelper(context);
-        ojbHelper.setUp();
-        
-        PersistenceBrokerPortletRegistry targetRegistry = new PersistenceBrokerPortletRegistry("META-INF/registry_repository.xml");
-        targetRegistry.init();
-        this.portletRegistry = (PortletRegistry) ojbHelper.getTxProxiedObject(targetRegistry,
new String[]{PortletRegistry.class.getName()});        
-        
-		buildTestData();
-		
+        super.setUp();
+        this.portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
+
+        buildTestData();
+
     }
 
     /*
@@ -100,14 +95,12 @@
     protected void tearDown() throws Exception
     {
         Iterator itr = portletRegistry.getPortletApplications().iterator();
-        while(itr.hasNext())
-        {        
-            portletRegistry.removeApplication((PortletApplicationDefinition)itr.next());
+        while (itr.hasNext())
+        {
+            portletRegistry.removeApplication((PortletApplicationDefinition) itr.next());
         }
-        ojbHelper.tearDown();
-        
     }
-    
+
     public void test1() throws Exception
     {
         assertNotNull(portletRegistry);
@@ -144,7 +137,7 @@
      * <p>
      * buildTestData
      * </p>
-     *
+     * 
      * @throws RegistryException
      * @throws LockFailedException
      */
@@ -152,58 +145,57 @@
     {
         // start clean
         Iterator itr = portletRegistry.getPortletApplications().iterator();
-        while(itr.hasNext())
-        {        
-            portletRegistry.removeApplication((PortletApplicationDefinition)itr.next());
+        while (itr.hasNext())
+        {
+            portletRegistry.removeApplication((PortletApplicationDefinition) itr.next());
         }
-        
-        
+
         // Create an Application and a Web app
-        
-        
+
         PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
         app.setName("App_1");
         app.setApplicationIdentifier("App_1");
-        
+
         UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
         app.addUserAttributeRef(uaRef);
-    
+
         UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
         app.addUserAttribute(ua);
-    
+
         JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
         app.addJetspeedService(service1);
         JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
         app.addJetspeedService(service2);
-        
+
         addDublinCore(app.getMetadata());
-    
+
         WebApplicationDefinitionImpl webApp = new WebApplicationDefinitionImpl();
         webApp.setContextRoot("/app1");
-        webApp.addDescription(Locale.FRENCH, "Description: La fromage est dans ma pantalon!");
-        webApp.addDisplayName(Locale.FRENCH, "Display Name: La fromage est dans ma pantalon!");
-    
+        webApp.addDescription(Locale.FRENCH, "Description: Le fromage est dans mon pantalon!");
+        webApp.addDisplayName(Locale.FRENCH, "Display Name: Le fromage est dans mon pantalon!");
+
         PortletDefinitionComposite portlet = new PortletDefinitionImpl();
         portlet.setClassName("org.apache.Portlet");
         portlet.setName("Portlet 1");
         portlet.addDescription(Locale.getDefault(), "POrtlet description.");
         portlet.addDisplayName(Locale.getDefault(), "Portlet display Name.");
-    
+
         portlet.addInitParameter("testparam", "test value", "This is a test portlet parameter",
Locale.getDefault());
-    
+
         addDublinCore(portlet.getMetadata());
-    
+
         // PreferenceComposite pc = new PrefsPreference();
         app.addPortletDefinition(portlet);
-        PreferenceSetCtrl prefSetCtrl = (PreferenceSetCtrl) portlet.getPreferenceSet(); 
-        PreferenceComposite pc =(PreferenceComposite) prefSetCtrl.add("preference 1", Arrays.asList(new
String[]{"value 1", "value 2"}));
+        PreferenceSetCtrl prefSetCtrl = (PreferenceSetCtrl) portlet.getPreferenceSet();
+        PreferenceComposite pc = (PreferenceComposite) prefSetCtrl.add("preference 1", Arrays.asList(new
String[]
+        { "value 1", "value 2" }));
         pc.addDescription(JetspeedLocale.getDefaultLocale(), "Preference Description");
-        
+
         assertNotNull(pc.getValueAt(0));
-    
-    
-        portlet.addLanguage(portletRegistry.createLanguage(Locale.getDefault(), "Portlet
1", "Portlet 1", "This is Portlet 1", null));
-    
+
+        portlet.addLanguage(portletRegistry.createLanguage(Locale.getDefault(), "Portlet
1", "Portlet 1",
+                "This is Portlet 1", null));
+
         ContentTypeComposite html = new ContentTypeImpl();
         html.setContentType("html/text");
         ContentTypeComposite wml = new ContentTypeImpl();
@@ -215,8 +207,7 @@
         wml.addPortletMode(new PortletMode(MODE_VIEW));
         portlet.addContentType(html);
         portlet.addContentType(wml);
-    
-        
+
         app.setWebApplicationDefinition(webApp);
         portletRegistry.updatePortletApplication(app);
     }
@@ -226,27 +217,28 @@
         MutablePortletApplication app;
         WebApplicationDefinitionImpl webApp;
         PortletDefinitionComposite portlet;
-    
+
         // Now makes sure everthing got persisted
-        
+
         app = null;
-        
+
         app = (PortletApplicationDefinitionImpl) portletRegistry.getPortletApplication("App_1");
-        
+
         assertNotNull(app);
-        
+
         webApp = (WebApplicationDefinitionImpl) app.getWebApplicationDefinition();
         portlet = (PortletDefinitionImpl) app.getPortletDefinitionByName("Portlet 1");
-    
+
         assertNotNull("Failed to reteive portlet application", app);
-    
+
         validateDublinCore(app.getMetadata());
-    
+
         Collection services = app.getJetspeedServices();
         assertNotNull("jetspeed services is null", services);
         System.out.println("services is " + services);
-        
-        assertNotNull("Failed to reteive portlet application via registry", portletRegistry.getPortletApplication("App_1"));
+
+        assertNotNull("Failed to reteive portlet application via registry", portletRegistry
+                .getPortletApplication("App_1"));
         assertNotNull("Web app was not saved along with the portlet app.", webApp);
         assertNotNull("Portlet was not saved along with the portlet app.", app.getPortletDefinitionByName("Portlet
1"));
         if (!afterUpdates)
@@ -255,16 +247,17 @@
         }
         else
         {
-            assertTrue("\"user.name.family\" and user.pets user attributes were not found.",
app.getUserAttributes().size() == 2);
-            
+            assertTrue("\"user.name.family\" and user.pets user attributes were not found.",
app.getUserAttributes()
+                    .size() == 2);
+
         }
-    
+
         portlet = (PortletDefinitionComposite) portletRegistry.getPortletDefinitionByUniqueName("App_1::Portlet
1");
-    
+
         assertNotNull("Portlet could not be retreived by unique name.", portlet);
-    
+
         validateDublinCore(portlet.getMetadata());
-    
+
         assertNotNull("Portlet Application was not set in the portlet defintion.", portlet
                 .getPortletApplicationDefinition());
         assertNotNull("French description was not materialized for the web app.", webApp.getDescription(Locale.FRENCH));
@@ -278,35 +271,34 @@
         assertNotNull("Content Type wml not found.", portlet.getContentTypeSet().get("wml"));
         Iterator itr = portlet.getPreferenceSet().get("preference 1").getValues();
         int valueCount = 0;
-    
+
         while (itr.hasNext())
         {
             itr.next();
             valueCount++;
         }
         assertEquals("\"preference 1\" did not have 2 values.", 2, valueCount);
-    
+
         // Pull out our Web app and add a Description to it
-             webApp = null;
-       
+        webApp = null;
+
         app = portletRegistry.getPortletApplication("App_1");
-        
+
         webApp = (WebApplicationDefinitionImpl) app.getWebApplicationDefinition();
         assertNotNull("Web app was not located by query.", webApp);
         webApp.addDescription(Locale.getDefault(), "Web app description");
-    
-       
+
         webApp = null;
-    
+
         app = portletRegistry.getPortletApplication("App_1");
-        webApp = (WebApplicationDefinitionImpl) app.getWebApplicationDefinition();    
- 
+        webApp = (WebApplicationDefinitionImpl) app.getWebApplicationDefinition();
+
         assertNotNull("Web app was not located by query.", webApp);
-        assertNotNull("Web app did NOT persist its description", webApp.getDescription(Locale.getDefault()));
-    
+        assertNotNull("Web app did NOT persist its description", webApp.getDescription(Locale.FRENCH));
+
     }
 
-    protected void validateDublinCore( GenericMetadata metadata )
+    protected void validateDublinCore(GenericMetadata metadata)
     {
         DublinCore dc = new DublinCoreImpl(metadata);
         assertEquals(dc.getTitles().size(), 3);
@@ -325,10 +317,15 @@
         assertEquals(dc.getTypes().size(), 1);
     }
 
-
-
     protected String[] getConfigurations()
     {
-        return new String[] {"/META-INF/transaction.xml", "/META-INF/registry-dao.xml"};
+        return new String[]
+        { "transaction.xml", "registry.xml" };
+    }
+
+    protected String[] getBootConfigurations()
+    {
+        return new String[]
+        { "test-repository-datasource-spring.xml" };
     }
 }

Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
Thu Jul 28 12:34:51 2005
@@ -88,9 +88,7 @@
      */
     private void buildTestData() throws RegistryException, LockFailedException
     {
-        // Create an Application and a Web app
-
-        
+        // Create an Application and a Web app      
         PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
         app.setName("App_1");
         app.setApplicationIdentifier("App_1");
@@ -110,13 +108,13 @@
 
         WebApplicationDefinitionImpl webApp = new WebApplicationDefinitionImpl();
         webApp.setContextRoot("/app1");
-        webApp.addDescription(Locale.FRENCH, "Description: La fromage est dans ma pantalon!");
-        webApp.addDisplayName(Locale.FRENCH, "Display Name: La fromage est dans ma pantalon!");
+        webApp.addDescription(Locale.FRENCH, "Description: Le fromage est dans mon pantalon!");
+        webApp.addDisplayName(Locale.FRENCH, "Display Name: Le fromage est dans mon pantalon!");
 
         PortletDefinitionComposite portlet = new PortletDefinitionImpl();
         portlet.setClassName("org.apache.Portlet");
         portlet.setName("Portlet 1");
-        portlet.addDescription(Locale.getDefault(), "POrtlet description.");
+        portlet.addDescription(Locale.getDefault(), "Portlet description.");
         portlet.addDisplayName(Locale.getDefault(), "Portlet display Name.");
 
         portlet.addInitParameter("testparam", "test value", "This is a test portlet parameter",
Locale.getDefault());

Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java
Thu Jul 28 12:34:51 2005
@@ -52,9 +52,6 @@
      */
     protected void tearDown() throws Exception
     {
-        
-        
-        
         Iterator itr = registry.getPortletApplications().iterator();
         while(itr.hasNext())
         {        

Modified: portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/jetspeed-spring.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/jetspeed-spring.xml?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/jetspeed-spring.xml
(original)
+++ portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/jetspeed-spring.xml
Thu Jul 28 12:34:51 2005
@@ -89,112 +89,6 @@
         </constructor-arg>
     </bean>
 
-    <!-- Portlet Registry DAO-->
-    <bean id="portletRegistryImpl" class="org.apache.jetspeed.components.portletregistry.PersistenceBrokerPortletRegistry"
init-method="init">
-
-        <constructor-arg index="0">
-            <value>META-INF/registry_repository.xml</value>
-        </constructor-arg>
-        <constructor-arg index="1">
-            <ref bean="portletFactory" />
-        </constructor-arg>
-    </bean>
-
-    <bean id="org.apache.jetspeed.components.portletregistry.PortletRegistry" name="portletRegistry"
parent="baseTransactionProxy">
-        <property name="proxyInterfaces">
-            <value>org.apache.jetspeed.components.portletregistry.PortletRegistry</value>
-        </property>
-
-        <property name="target">
-            <ref bean="portletRegistryImpl" />
-        </property>
-        <property name="transactionAttributes">
-            <props>
-                <prop key="register*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
-                <prop key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
-                <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
-                <prop key="save*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
-                <prop key="*">PROPAGATION_SUPPORTS</prop>
-            </props>
-        </property>
-    </bean>
-
-    <!-- Portlet Entity Access DAO-->
-    <!--
-        <bean id="systemCache" class="org.apache.jetspeed.cache.general.SimpleHashMapCache"
/>
-        
-        <bean id="systemCachingInterceptor" class="org.apache.jetspeed.components.interceptors.CachingInterceptor"
>
-        <constructor-arg>
-        <ref bean="systemCache"/>
-        </constructor-arg>
-        </bean>
-        
-        <bean id="systemRemoveFromCacheInterceptor" class="org.apache.jetspeed.components.interceptors.RemoveFromCacheInterceptor"
>
-        <constructor-arg>
-        <ref bean="systemCache"/>
-        </constructor-arg>
-        </bean>   	
-        
-        <bean id="portletEntityCachingAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
-        <property name="advice">
-        <ref bean="systemCachingInterceptor"/>
-        </property>
-        <property name="patterns">
-        <list>
-        <value>.*getPortletEntity.*</value>
-        </list>
-        </property>
-        </bean>
-        
-        <bean id="portletEntityRemoveFromCacheAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
-        <property name="advice">
-        <ref bean="systemRemoveFromCacheInterceptor"/>
-        </property>
-        <property name="patterns">
-        <list>
-        <value>.*removePortletEntity.*</value>
-        </list>
-        </property>
-        </bean>
-        
-    -->
-    <!--
-        - PortletEntity business object: OJB implementation, as an inner bean wrapped
-        - by an outer transactional proxy. The two bean definitions could have been separate,
-        - but this is cleaner as there is no need to ever access the unwrapped object.
-    -->
-
-    <bean id="portletEntityAccessImpl" class="org.apache.jetspeed.components.portletentity.PersistenceBrokerPortletEntityAccess">
-        <constructor-arg>
-            <ref bean="portletRegistry" />
-        </constructor-arg>
-    </bean>
-
-
-    <bean id="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent"
parent="baseTransactionProxy" name="portletEntityAccess">
-        <property name="proxyInterfaces">
-            <value>org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent</value>
-        </property>
-        <property name="target">
-            <ref bean="portletEntityAccessImpl" />
-        </property>
-        <!--
-            <property name="preInterceptors">
-            <list>
-            <ref bean="portletEntityCachingAdvisor"/>
-            <ref bean="portletEntityRemoveFromCacheAdvisor"/>
-            </list>
-            </property>
-        -->
-        <property name="transactionAttributes">
-            <props>
-                <prop key="remove*">PROPAGATION_REQUIRED</prop>
-                <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException</prop>
-                <prop key="*">PROPAGATION_SUPPORTS</prop>
-            </props>
-        </property>
-    </bean>
-
     <!-- SSO Implementation -->
     <bean id="PersistenceBrokerSSOProvider" class="org.apache.jetspeed.sso.impl.PersistenceBrokerSSOProvider"
init-method="init">
         <constructor-arg index="0">
@@ -276,9 +170,6 @@
             <ref bean="org.apache.jetspeed.container.window.PortletWindowAccessor" />
         </constructor-arg>
     </bean>
-
-    <!-- Portlet Factory -->
-    <bean id="portletFactory" class="org.apache.jetspeed.factory.JetspeedPortletFactory"></bean>
 
     <!-- Aggregation: Page -->
     <bean id="org.apache.jetspeed.aggregator.PageAggregator" class="org.apache.jetspeed.aggregator.impl.PageAggregatorImpl">

Modified: portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/page-manager.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/page-manager.xml?rev=225857&r1=225856&r2=225857&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/page-manager.xml (original)
+++ portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/page-manager.xml Thu
Jul 28 12:34:51 2005
@@ -16,31 +16,6 @@
 limitations under the License.
 -->
 <beans>
-
-  <!-- Profiler -->  
-  <bean id="profilerImpl" class="org.apache.jetspeed.profiler.impl.JetspeedProfilerImpl"
init-method="init">
-       <constructor-arg index="0"><value>META-INF/profiler-ojb.xml</value></constructor-arg>
-       <constructor-arg index="1"><value>j2</value></constructor-arg>
-  </bean>
-  
-  <bean id="org.apache.jetspeed.profiler.Profiler" 
-        name="profiler"
-        parent="baseTransactionProxy">        
-        <property name="proxyInterfaces">
-            <value>org.apache.jetspeed.profiler.Profiler</value>
-        </property>
-        <property name="target">
-            <ref bean="profilerImpl"/>
-        </property>
-        <property name="transactionAttributes">
-            <props>             
-                <prop key="setRuleForPrincipal">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
-                <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
-                <prop key="delete*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
-                <prop key="*">PROPAGATION_SUPPORTS</prop>
-            </props>
-        </property>            
-  </bean>
     
   <!-- PageManager -->
   <bean id="PsmlDocumentHandler"      

Added: portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/profiler.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/profiler.xml?rev=225857&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/profiler.xml (added)
+++ portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/profiler.xml Thu Jul
28 12:34:51 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+    Copyright 2004 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans>
+    <!-- Profiler -->
+    <bean id="profilerImpl" class="org.apache.jetspeed.profiler.impl.JetspeedProfilerImpl"
name="profilerImpl" init-method="init">
+        <constructor-arg index="0">
+            <value>META-INF/ojb/profiler_repository.xml</value>
+        </constructor-arg>
+        <constructor-arg index="1">
+            <value>j2</value>
+        </constructor-arg>
+    </bean>
+
+    <bean id="org.apache.jetspeed.profiler.Profiler" name="profiler" parent="baseTransactionProxy">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.profiler.Profiler</value>
+        </property>
+        <property name="target">
+            <ref bean="profilerImpl" />
+        </property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="setRuleForPrincipal">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
+                <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
+                <prop key="delete*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.profiler.ProfilerException</prop>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

Added: portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/registry.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/registry.xml?rev=225857&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/registry.xml (added)
+++ portals/jetspeed-2/trunk/portal-webapp/src/webapp/WEB-INF/assembly/registry.xml Thu Jul
28 12:34:51 2005
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+    Copyright 2004 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans>
+
+    <!-- Portlet Factory -->
+    <bean id="portletFactory" class="org.apache.jetspeed.factory.JetspeedPortletFactory"></bean>
+
+    <!-- Portlet Registry DAO-->
+    <bean id="portletRegistryImpl" class="org.apache.jetspeed.components.portletregistry.PersistenceBrokerPortletRegistry"
init-method="init">
+
+        <constructor-arg index="0">
+            <value>META-INF/ojb/registry_repository.xml</value>
+        </constructor-arg>
+        <constructor-arg index="1">
+            <ref bean="portletFactory" />
+        </constructor-arg>
+    </bean>
+
+    <bean id="org.apache.jetspeed.components.portletregistry.PortletRegistry" name="portletRegistry"
parent="baseTransactionProxy">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.components.portletregistry.PortletRegistry</value>
+        </property>
+
+        <property name="target">
+            <ref bean="portletRegistryImpl" />
+        </property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="register*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="save*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+
+    <!-- Portlet Entity Access DAO-->
+    <!--
+        <bean id="systemCache" class="org.apache.jetspeed.cache.general.SimpleHashMapCache"
/>
+        
+        <bean id="systemCachingInterceptor" class="org.apache.jetspeed.components.interceptors.CachingInterceptor"
>
+        <constructor-arg>
+        <ref bean="systemCache"/>
+        </constructor-arg>
+        </bean>
+        
+        <bean id="systemRemoveFromCacheInterceptor" class="org.apache.jetspeed.components.interceptors.RemoveFromCacheInterceptor"
>
+        <constructor-arg>
+        <ref bean="systemCache"/>
+        </constructor-arg>
+        </bean>   	
+        
+        <bean id="portletEntityCachingAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
+        <property name="advice">
+        <ref bean="systemCachingInterceptor"/>
+        </property>
+        <property name="patterns">
+        <list>
+        <value>.*getPortletEntity.*</value>
+        </list>
+        </property>
+        </bean>
+        
+        <bean id="portletEntityRemoveFromCacheAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
+        <property name="advice">
+        <ref bean="systemRemoveFromCacheInterceptor"/>
+        </property>
+        <property name="patterns">
+        <list>
+        <value>.*removePortletEntity.*</value>
+        </list>
+        </property>
+        </bean>
+        
+    -->
+    <!--
+        - PortletEntity business object: OJB implementation, as an inner bean wrapped
+        - by an outer transactional proxy. The two bean definitions could have been separate,
+        - but this is cleaner as there is no need to ever access the unwrapped object.
+    -->
+
+    <bean id="portletEntityAccessImpl" class="org.apache.jetspeed.components.portletentity.PersistenceBrokerPortletEntityAccess"
+        name="portletEntityAccessImpl">
+        <constructor-arg>
+            <ref bean="portletRegistry" />
+        </constructor-arg>
+    </bean>
+
+    <bean id="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent"
parent="baseTransactionProxy" name="portletEntityAccess">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent</value>
+        </property>
+        <property name="target">
+            <ref bean="portletEntityAccessImpl" />
+        </property>
+        <!--
+            <property name="preInterceptors">
+            <list>
+            <ref bean="portletEntityCachingAdvisor"/>
+            <ref bean="portletEntityRemoveFromCacheAdvisor"/>
+            </list>
+            </property>
+        -->
+        <property name="transactionAttributes">
+            <props>
+                <prop key="remove*">PROPAGATION_REQUIRED</prop>
+                <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException</prop>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file



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


Mime
View raw message