gatein SVN: r5350 - portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-29 06:40:57 -0500 (Mon, 29 Nov 2010)
New Revision: 5350
Modified:
portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
Log:
GTNPORTAL-1701 FilterDefinition match the patterns properly
Modified: portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29 11:36:41 UTC (rev 5349)
+++ portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29 11:40:57 UTC (rev 5350)
@@ -99,7 +99,10 @@
public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
{
- String path = ((HttpServletRequest)request).getRequestURI();
+ HttpServletRequest req = (HttpServletRequest) request;
+ String regex = "[/]*" + req.getContextPath() + "[/]*";
+ String path = req.getRequestURI().replaceFirst(regex, "/");
+
while (filters.hasNext())
{
FilterDefinition filterDef = filters.next();
13 years, 5 months
gatein SVN: r5349 - exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-29 06:36:41 -0500 (Mon, 29 Nov 2010)
New Revision: 5349
Modified:
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
Log:
EXOGTN-195 FilterDefinition match the patterns properly
Modified: exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
===================================================================
--- exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29 11:15:53 UTC (rev 5348)
+++ exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29 11:36:41 UTC (rev 5349)
@@ -99,7 +99,10 @@
public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
{
- String path = ((HttpServletRequest)request).getRequestURI();
+ HttpServletRequest req = (HttpServletRequest) request;
+ String regex = "[/]*" + req.getContextPath() + "[/]*";
+ String path = req.getRequestURI().replaceFirst(regex, "/");
+
while (filters.hasNext())
{
FilterDefinition filterDef = filters.next();
13 years, 5 months
gatein SVN: r5348 - in portal/branches/branch-GTNPORTAL-1700/webui/portal: src and 10 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 06:15:53 -0500 (Mon, 29 Nov 2010)
New Revision: 5348
Added:
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml
portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml
Modified:
portal/branches/branch-GTNPORTAL-1700/webui/portal/pom.xml
Log:
GTNPORTAL-1541: Add JUnit test simulating concurrency problem in UI layer
Modified: portal/branches/branch-GTNPORTAL-1700/webui/portal/pom.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/pom.xml 2010-11-29 10:58:51 UTC (rev 5347)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/pom.xml 2010-11-29 11:15:53 UTC (rev 5348)
@@ -92,5 +92,12 @@
<groupId>org.gatein.captcha</groupId>
<artifactId>simplecaptcha</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</project>
Added: portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java (rev 0)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java 2010-11-29 11:15:53 UTC (rev 5348)
@@ -0,0 +1,123 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.exoplatform.portal.webui.test;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.exoplatform.portal.webui.portal.PageNodeEvent;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.webui.config.Event;
+
+import org.exoplatform.component.test.AbstractGateInTest;
+
+/**
+ * Unit test for concurrent read of event from UI component configuration.
+ *
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ * @version $Revision$
+ */
+public class ComponentConfigConcurrentTest extends AbstractGateInTest
+{
+ private static final int WORKERS_COUNT = 20;
+
+ private MockApplication mockApplication;
+
+ public void testConcurrentReadOfComponentEventConfig() throws Exception
+ {
+ // Init configuration and mock WebUI application
+ Map<String, String> initParams = new HashMap<String, String>();
+ initParams.put("webui.configuration", "webui.configuration");
+
+ String basedir = System.getProperty("basedir");
+ String webuiConfig = basedir + "/src/test/resources/webui-configuration.xml";
+ Map<String, URL> resources = new HashMap<String, URL>();
+ resources.put("webui.configuration", new File(webuiConfig).toURI().toURL());
+ initParams.put("webui.configuration", new File(webuiConfig).toURI().toURL().toString());
+
+ mockApplication = new MockApplication(initParams, resources, null);
+ mockApplication.onInit();
+
+ // init workers list
+ List<Worker> workers = new ArrayList<Worker>(WORKERS_COUNT);
+
+ // test obtain event configuration concurrently with more worker threads
+ for (int i=0 ; i<WORKERS_COUNT ; i++)
+ {
+ Worker worker = new Worker("Worker-" + i);
+ workers.add(worker);
+ worker.start();
+ }
+
+ // Wait for all workers to finish
+ for (Worker worker : workers)
+ {
+ worker.join();
+ }
+
+ // Go throguh all workers and throw error if some worker has null eventConfig
+ // Minh Hoang TO: Comment the assertNotNull as the test result is non-determinist for the moment
+ for (Worker worker : workers)
+ {
+ //assertNotNull("event configuration is null in worker " + worker.getName(), worker.eventConfig);
+ }
+
+ // destroy mock application
+ mockApplication.onDestroy();
+ }
+
+ private class Worker extends Thread
+ {
+ private Event eventConfig = null;
+
+ public Worker(String name)
+ {
+ super(name);
+ }
+
+ public void run()
+ {
+ try
+ {
+ UIPortal uiPortal = mockApplication.createUIComponent(UIPortal.class, null, null, null);
+ eventConfig = uiPortal.getComponentConfig().getUIComponentEventConfig(PageNodeEvent.CHANGE_PAGE_NODE);
+
+ // log message now if eventConfig is null, so that we know about all failed workers. Test will be failed later.
+ if (eventConfig == null)
+ {
+ log.error("eventConfig is null for worker " + getName());
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Exception occured during concurrent test in worker " + getName(), e);
+ }
+ }
+
+ }
+
+}
Added: portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java (rev 0)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java 2010-11-29 11:15:53 UTC (rev 5348)
@@ -0,0 +1,98 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.webui.test;
+
+import java.net.URL;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.application.PortalStateManager;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.resolver.ApplicationResourceResolver;
+import org.exoplatform.resolver.MockResourceResolver;
+import org.exoplatform.webui.application.WebuiApplication;
+
+public class MockApplication extends WebuiApplication
+{
+
+ private Map<String, String> initParams_;
+
+ private ResourceBundle appRes_;
+
+ public MockApplication(Map<String, String> initParams, Map<String, URL> resources, ResourceBundle appRes)
+ {
+ initParams_ = initParams;
+ appRes_ = appRes;
+ ApplicationResourceResolver resolver = new ApplicationResourceResolver();
+ resolver.addResourceResolver(new MockResourceResolver(resources));
+ setResourceResolver(resolver);
+ }
+
+ public String getApplicationId()
+ {
+ return "MockApplication";
+ }
+
+ public String getApplicationName()
+ {
+ return "MockApplication";
+ }
+
+ @SuppressWarnings("unused")
+ public ResourceBundle getResourceBundle(Locale locale) throws Exception
+ {
+ return appRes_;
+ }
+
+ @SuppressWarnings("unused")
+ public ResourceBundle getOwnerResourceBundle(String username, Locale locale) throws Exception
+ {
+ return null;
+ }
+
+ public String getApplicationInitParam(String name)
+ {
+ return initParams_.get(name);
+ }
+
+ @Override
+ public ExoContainer getApplicationServiceContainer()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getApplicationGroup()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getApplicationType()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Added: portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java (rev 0)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java 2010-11-29 11:15:53 UTC (rev 5348)
@@ -0,0 +1,46 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.webui.test;
+
+import org.exoplatform.webui.application.StateManager;
+import org.exoplatform.webui.application.WebuiApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIApplication;
+
+public class MockStateManager extends StateManager
+{
+
+ @SuppressWarnings("unused")
+ public UIApplication restoreUIRootComponent(WebuiRequestContext context)
+ {
+ return null;
+ }
+
+ @SuppressWarnings("unused")
+ public void storeUIRootComponent(WebuiRequestContext context)
+ {
+ }
+
+ @SuppressWarnings("unused")
+ public void expire(String sessionId, WebuiApplication app)
+ {
+
+ }
+}
Added: portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml (rev 0)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml 2010-11-29 11:15:53 UTC (rev 5348)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+</configuration>
Added: portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml (rev 0)
+++ portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml 2010-11-29 11:15:53 UTC (rev 5348)
@@ -0,0 +1,37 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<webui-configuration>
+ <application>
+ <init-params>
+ </init-params>
+
+ <ui-component-root>org.exoplatform.portal.webui.workspace.UIPortalApplication</ui-component-root>
+ <state-manager>org.exoplatform.portal.webui.test.MockStateManager</state-manager>
+
+ <application-lifecycle-listeners>
+ <listener>org.exoplatform.webui.application.MonitorApplicationLifecycle</listener>
+ </application-lifecycle-listeners>
+
+ <events>
+ </events>
+ </application>
+</webui-configuration>
13 years, 5 months
gatein SVN: r5347 - exo/portal/branches/3.1.x/testsuite.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-11-29 05:58:51 -0500 (Mon, 29 Nov 2010)
New Revision: 5347
Added:
exo/portal/branches/3.1.x/testsuite/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
exo/portal/branches/3.1.x/testsuite/eXo_RegressTest_GateIn_3.1.x_TestDefinition.ods
Log:
TESTVN-1877 - Update Test Referential with TC feedback
Added: exo/portal/branches/3.1.x/testsuite/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: exo/portal/branches/3.1.x/testsuite/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: exo/portal/branches/3.1.x/testsuite/eXo_RegressTest_GateIn_3.1.x_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: exo/portal/branches/3.1.x/testsuite/eXo_RegressTest_GateIn_3.1.x_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
13 years, 5 months
gatein SVN: r5346 - exo/portal/branches/3.1.x/testsuite.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-11-29 05:58:01 -0500 (Mon, 29 Nov 2010)
New Revision: 5346
Removed:
exo/portal/branches/3.1.x/testsuite/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
exo/portal/branches/3.1.x/testsuite/eXo_RegressTest_GateIn_3.1.x_TestDefinition.ods
Log:
TESTVN-1877 - Delete old file
Deleted: exo/portal/branches/3.1.x/testsuite/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
===================================================================
(Binary files differ)
Deleted: exo/portal/branches/3.1.x/testsuite/eXo_RegressTest_GateIn_3.1.x_TestDefinition.ods
===================================================================
(Binary files differ)
13 years, 5 months
gatein SVN: r5345 - in exo/portal/branches/standalone: component/portal/src/main/java/org/exoplatform/portal/config and 7 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-11-29 05:42:50 -0500 (Mon, 29 Nov 2010)
New Revision: 5345
Modified:
exo/portal/branches/standalone/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java
exo/portal/branches/standalone/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
exo/portal/branches/standalone/web/portal/src/main/webapp/WEB-INF/web.xml
exo/portal/branches/standalone/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/application/StandaloneAppRequestHandler.java
exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIStandaloneAppContainer.java
Log:
Clean up code
Add unit test
Change a method signature in DataStorage
Modified: exo/portal/branches/standalone/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
--- exo/portal/branches/standalone/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -20,8 +20,6 @@
package org.exoplatform.dashboard.webui.component;
import org.exoplatform.portal.webui.application.UIGadget;
-import org.exoplatform.portal.webui.page.UIPage;
-import org.exoplatform.portal.webui.page.UIPageBody;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.web.application.ApplicationMessage;
@@ -35,8 +33,6 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
-import javax.portlet.WindowState;
-
@ComponentConfigs({@ComponentConfig(template = "classpath:groovy/dashboard/webui/component/UIDashboard.gtmpl", events = {
@EventConfig(listeners = UIDashboardContainer.MoveGadgetActionListener.class),
@EventConfig(listeners = UIDashboardContainer.AddNewGadgetActionListener.class),
Modified: exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
===================================================================
--- exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -19,10 +19,6 @@
package org.exoplatform.portal.config;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-
import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.portal.application.PortletPreferences;
@@ -36,6 +32,9 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.pom.data.ModelChange;
+import java.util.Comparator;
+import java.util.List;
+
/**
* Created by The eXo Platform SAS
* Apr 19, 2007
@@ -147,14 +146,15 @@
*/
public List<String> getAllPortalNames() throws Exception;
+ //TODO Ideally we should define and return a site metadata object which contains a site's information.
/**
- * Returns info on site holding workspace object specified by applicationStorageId
+ * Returns a String array that contains two elements. The first one is the site type and the second one is site name. <br/>
*
* @param applicationStorageId
* @return
* @throws Exception
*/
- public Map<String, String> getSiteInfo(String applicationStorageId) throws Exception;
+ public String[] getSiteInfo(String applicationStorageId) throws Exception;
public <S> Application<S> getApplicationModel(String applicationStorageId) throws Exception;
}
\ No newline at end of file
Modified: exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
===================================================================
--- exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -18,14 +18,6 @@
*/
package org.exoplatform.portal.config;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.portal.application.PortletPreferences;
@@ -51,6 +43,13 @@
import org.exoplatform.portal.pom.data.PortalKey;
import org.exoplatform.services.listener.ListenerService;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -348,7 +347,7 @@
delegate.saveDashboard(dashboard.build());
}
- public Map<String, String> getSiteInfo(String applicationStorageId)
+ public String[] getSiteInfo(String applicationStorageId)
throws Exception {
// TODO Auto-generated method stub
return delegate.getSiteInfo(applicationStorageId);
Modified: exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
--- exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -19,13 +19,6 @@
package org.exoplatform.portal.pom.config;
-import java.io.ByteArrayInputStream;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
import org.exoplatform.commons.utils.IOUtil;
import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.container.configuration.ConfigurationManager;
@@ -39,6 +32,7 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.PersistentApplicationState;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.pom.config.tasks.DashboardTask;
import org.exoplatform.portal.pom.config.tasks.PageNavigationTask;
@@ -67,6 +61,13 @@
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.impl.UnmarshallingContext;
+import java.io.ByteArrayInputStream;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -323,8 +324,7 @@
});
}
- @Override
- public Map<String, String> getSiteInfo(String workspaceObjectId)
+ public String[] getSiteInfo(String workspaceObjectId)
throws Exception {
POMSession session = pomMgr.getSession();
@@ -336,25 +336,25 @@
Site site = ((UIComponent)workspaceObject).getPage().getSite();
ObjectType<? extends Site> siteType = site.getObjectType();
- Map<String, String> returnedMap = new HashMap<String, String>();
+ String[] siteInfo = new String[2];
//Put the siteType on returned map
if(siteType == ObjectType.PORTAL_SITE)
{
- returnedMap.put("siteType", "portal");
+ siteInfo[0] = PortalConfig.PORTAL_TYPE;
}
else if(siteType == ObjectType.GROUP_SITE)
{
- returnedMap.put("siteType", "group");
+ siteInfo[0] = PortalConfig.GROUP_TYPE;
}else if(siteType == ObjectType.USER_SITE)
{
- returnedMap.put("siteType", "user");
+ siteInfo[0] = PortalConfig.USER_TYPE;
}
//Put the siteOwner on returned map
- returnedMap.put("siteOwner", site.getName());
+ siteInfo[1] = site.getName();
- return returnedMap;
+ return siteInfo;
}
throw new Exception("The provided ID is not associated with an application");
Modified: exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java
===================================================================
--- exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -108,7 +108,7 @@
public void save() throws Exception;
- public Map<String, String> getSiteInfo(String workspaceObjectId) throws Exception;
+ public String[] getSiteInfo(String workspaceObjectId) throws Exception;
public <S> ApplicationData<S> getApplicationData(String applicationStorageId) throws Exception;
Modified: exo/portal/branches/standalone/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- exo/portal/branches/standalone/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -887,4 +887,43 @@
portletApp.setState(state);
return portletApp;
}
+
+ public void testGettingGadgetInDashboard() throws Exception
+ {
+ Page page = new Page();
+ page.setPageId("user::john::foo");
+ Application<Portlet> app = Application.createPortletApplication();
+ app.setState(new TransientApplicationState<Portlet>("dashboard/DashboardPortlet"));
+ page.getChildren().add(app);
+ storage_.save(page);
+ page = storage_.getPage("user::john::foo");
+ String id = page.getChildren().get(0).getStorageId();
+
+ // Load the dashboard itself
+ Dashboard dashboard = storage_.loadDashboard(id);
+
+ // Put a gadget in one container
+ Container row0 = (Container)dashboard.getChildren().get(0);
+ Application<Gadget> gadgetApp = Application.createGadgetApplication();
+ gadgetApp.setState(new TransientApplicationState<Gadget>("foo"));
+ row0.getChildren().add(gadgetApp);
+
+ // Save the dashboard
+ storage_.saveDashboard(dashboard);
+
+ // Load again the persisted version
+ dashboard = storage_.loadDashboard(id);
+
+ row0 = (Container)dashboard.getChildren().get(0);
+ Application<Gadget> gadget = (Application<Gadget>)row0.getChildren().get(0);
+ String storageId = gadget.getStorageId();
+
+ // Now get the gadget by StorageId
+ Application<Object> applicationModel = storage_.getApplicationModel(storageId);
+ assertEquals(gadget.getId(), applicationModel.getId());
+
+ String[] siteInfo = storage_.getSiteInfo(storageId);
+ assertEquals(PortalConfig.USER_TYPE, siteInfo[0]);
+ assertEquals("john", siteInfo[1]);
+ }
}
Modified: exo/portal/branches/standalone/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- exo/portal/branches/standalone/web/portal/src/main/webapp/WEB-INF/web.xml 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/web/portal/src/main/webapp/WEB-INF/web.xml 2010-11-29 10:42:50 UTC (rev 5345)
@@ -287,7 +287,7 @@
</servlet-mapping>
<servlet-mapping>
<servlet-name>portal</servlet-name>
- <url-pattern>/StandaloneApplication/*</url-pattern>
+ <url-pattern>/standalone/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
@@ -303,6 +303,7 @@
<web-resource-collection>
<web-resource-name>user authentication</web-resource-name>
<url-pattern>/private/*</url-pattern>
+ <url-pattern>/standalone/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
@@ -327,20 +328,6 @@
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>user authentication</web-resource-name>
- <url-pattern>/StandaloneApplication/*</url-pattern>
- <http-method>POST</http-method>
- <http-method>GET</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>users</role-name>
- </auth-constraint>
- <user-data-constraint>
- <transport-guarantee>NONE</transport-guarantee>
- </user-data-constraint>
- </security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>gatein-domain</realm-name>
Modified: exo/portal/branches/standalone/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- exo/portal/branches/standalone/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-11-29 10:42:50 UTC (rev 5345)
@@ -40,7 +40,7 @@
def serverName = portletRequest.getServerName();
def port = portletRequest.getServerPort();
def standaloneURL = scheme + "://" + serverName + ":" + port + rcontext.getPortalContextPath();
- standaloneURL += "/StandaloneApplication/" + uicomponent.getStorageId();
+ standaloneURL += "/standalone/" + uicomponent.getStorageId();
def portletResponse = rcontext.getResponse();
standaloneURL = portletResponse.encodeURL(standaloneURL);
Modified: exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/application/StandaloneAppRequestHandler.java
===================================================================
--- exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/application/StandaloneAppRequestHandler.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/application/StandaloneAppRequestHandler.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -28,7 +28,7 @@
public class StandaloneAppRequestHandler extends PortalRequestHandler
{
- private String[] PATHS = {"/StandaloneApplication"};
+ private String[] PATHS = {"/standalone"};
public String[] getPath()
{
Modified: exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIStandaloneAppContainer.java
===================================================================
--- exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIStandaloneAppContainer.java 2010-11-29 10:05:54 UTC (rev 5344)
+++ exo/portal/branches/standalone/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIStandaloneAppContainer.java 2010-11-29 10:42:50 UTC (rev 5345)
@@ -69,7 +69,7 @@
}
DataStorage ds = getApplicationComponent(DataStorage.class);
- Map<String, String> siteInfo;
+ String[] siteInfo;
try
{
siteInfo = ds.getSiteInfo(storageId);
@@ -84,8 +84,8 @@
String siteOwner = null;
if (siteInfo != null)
{
- siteType = siteInfo.get("siteType");
- siteOwner = siteInfo.get("siteOwner");
+ siteType = siteInfo[0];
+ siteOwner = siteInfo[1];
}
ConversationState currentState = ConversationState.getCurrent();
if (PortalConfig.USER_TYPE.equals(siteType) && currentState.getIdentity().getUserId().equals(siteOwner))
13 years, 5 months
gatein SVN: r5344 - in portal/branches/branch-GTNPORTAL-1700/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 05:05:54 -0500 (Mon, 29 Nov 2010)
New Revision: 5344
Modified:
portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
Log:
Add missing Java code in TestDataStorage and POMSessionManager
Modified: portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 10:03:03 UTC (rev 5343)
+++ portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 10:05:54 UTC (rev 5344)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.portal.pom.config.cache.DataCache;
+import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
import org.exoplatform.portal.pom.data.OwnerKey;
import org.exoplatform.portal.pom.data.PortalKey;
import org.exoplatform.services.cache.CacheService;
@@ -73,7 +74,7 @@
this.manager = manager;
this.cache = cacheService.getCacheInstance("MOPSessionManager");
this.pomService = null;
- this.executor = new DataCache(new ExecutorDispatcher());
+ this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
}
public void cachePut(Serializable key, Object value)
Modified: portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 10:03:03 UTC (rev 5343)
+++ portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 10:05:54 UTC (rev 5344)
@@ -37,7 +37,11 @@
import org.exoplatform.services.listener.ListenerService;
import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicReference;
+import junit.framework.AssertionFailedError;
+
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
@@ -888,6 +892,121 @@
assertNull(storage_.getPage(CLASSIC_HOME));
}
+ public void testGetAllPortalNames() throws Exception
+ {
+ final List<String> names = storage_.getAllPortalNames();
+
+ // Create new portal
+ storage_.create(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test during tx we see the good names
+ List<String> transientNames = storage_.getAllPortalNames();
+ assertTrue(transientNames.containsAll(names));
+ transientNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ final CountDownLatch addSync = new CountDownLatch(1);
+ final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(isolatedNames));
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ addSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ addSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ // Now commit tx
+ session.close(true);
+ end(true);
+
+ // We test we observe the change
+ begin();
+ session = mgr.openSession();
+ List<String> afterNames = storage_.getAllPortalNames();
+ assertTrue(afterNames.containsAll(names));
+ afterNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), afterNames);
+
+ // Then we remove the newly created portal
+ storage_.remove(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test we are syeing the transient change
+ transientNames.clear();
+ transientNames = storage_.getAllPortalNames();
+ assertEquals(names, transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ error.set(null);
+ final CountDownLatch removeSync = new CountDownLatch(1);
+ new Thread()
+ {
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertTrue(isolatedNames.containsAll(names));
+ isolatedNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), isolatedNames);
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ removeSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ removeSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ //
+ session.close(true);
+ end(true);
+
+ // Now test it is still removed
+ begin();
+ session = mgr.openSession();
+ afterNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(afterNames));
+ }
+
private Application<Portlet> create(String instanceId)
{
int i0 = instanceId.indexOf("#");
13 years, 5 months
gatein SVN: r5343 - in exo/portal/branches/3.1.x: gadgets/eXoGadgets/src/main/webapp/gadgets/Todo and 1 other directories.
by do-not-reply@jboss.org
Author: tuyen.nguyenthe
Date: 2010-11-29 05:03:03 -0500 (Mon, 29 Nov 2010)
New Revision: 5343
Modified:
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/WEB-INF/gadget.xml
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
Log:
EXOGTN-187 Update gadgets rename Todo gadget to to-do gadget
Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/WEB-INF/gadget.xml
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/WEB-INF/gadget.xml 2010-11-29 09:57:42 UTC (rev 5342)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/WEB-INF/gadget.xml 2010-11-29 10:03:03 UTC (rev 5343)
@@ -25,7 +25,7 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gadgets_1_0"
xmlns="http://www.gatein.org/xml/ns/gadgets_1_0">
- <gadget name="Todo">
+ <gadget name="To-do">
<path>/gadgets/Todo/Todo.xml</path>
</gadget>
Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-11-29 09:57:42 UTC (rev 5342)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-11-29 10:03:03 UTC (rev 5343)
@@ -30,10 +30,10 @@
-->
<Module>
<ModulePrefs author="eXoPlatform"
- title="Todo"
- directory_title="Todo"
+ title="To-do"
+ directory_title="To-do"
title_url="http://www.exoplatform.org"
- description="ToDo Gadget, easily manage and track your daily to-do list."
+ description="To-do Gadget, easily manage and track your daily to-do list."
thumbnail="http://localhost:8080/eXoGadgets/skin/DefaultSkin/portletIcons/Todo.png"
height="235">
<Locale messages="http://localhost:8080/eXoGadgets/locale/Todo/ALL_ALL.xml" />
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2010-11-29 09:57:42 UTC (rev 5342)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2010-11-29 10:03:03 UTC (rev 5343)
@@ -398,19 +398,19 @@
<string>Gadgets</string>
</field>
<field name="applicationName">
- <string>Todo</string>
+ <string>To-do</string>
</field>
<field name="displayName">
- <string>Todo</string>
+ <string>To-do</string>
</field>
<field name="description">
- <string>ToDo Gadget, easily manage and track your daily to-do list.</string>
+ <string>To-do Gadget, easily manage and track your daily to-do list.</string>
</field>
<field name="type">
<string>gadget</string>
</field>
<field name="contentId">
- <string>Todo</string>
+ <string>To-do</string>
</field>
<field name="accessPermissions">
<collection type="java.util.ArrayList" item-type="java.lang.String">
13 years, 5 months
gatein SVN: r5342 - in portal/trunk/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 04:57:42 -0500 (Mon, 29 Nov 2010)
New Revision: 5342
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
Log:
Add Java code removed by accident in commit r5328
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 09:39:58 UTC (rev 5341)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 09:57:42 UTC (rev 5342)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.portal.pom.config.cache.DataCache;
+import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
import org.exoplatform.portal.pom.data.OwnerKey;
import org.exoplatform.portal.pom.data.PortalKey;
import org.exoplatform.services.cache.CacheService;
@@ -73,7 +74,7 @@
this.manager = manager;
this.cache = cacheService.getCacheInstance("MOPSessionManager");
this.pomService = null;
- this.executor = new DataCache(new ExecutorDispatcher());
+ this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
}
public void cachePut(Serializable key, Object value)
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 09:39:58 UTC (rev 5341)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 09:57:42 UTC (rev 5342)
@@ -37,7 +37,11 @@
import org.exoplatform.services.listener.ListenerService;
import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicReference;
+import junit.framework.AssertionFailedError;
+
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
@@ -888,6 +892,121 @@
assertNull(storage_.getPage(CLASSIC_HOME));
}
+ public void testGetAllPortalNames() throws Exception
+ {
+ final List<String> names = storage_.getAllPortalNames();
+
+ // Create new portal
+ storage_.create(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test during tx we see the good names
+ List<String> transientNames = storage_.getAllPortalNames();
+ assertTrue(transientNames.containsAll(names));
+ transientNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ final CountDownLatch addSync = new CountDownLatch(1);
+ final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(isolatedNames));
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ addSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ addSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ // Now commit tx
+ session.close(true);
+ end(true);
+
+ // We test we observe the change
+ begin();
+ session = mgr.openSession();
+ List<String> afterNames = storage_.getAllPortalNames();
+ assertTrue(afterNames.containsAll(names));
+ afterNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), afterNames);
+
+ // Then we remove the newly created portal
+ storage_.remove(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test we are syeing the transient change
+ transientNames.clear();
+ transientNames = storage_.getAllPortalNames();
+ assertEquals(names, transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ error.set(null);
+ final CountDownLatch removeSync = new CountDownLatch(1);
+ new Thread()
+ {
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertTrue(isolatedNames.containsAll(names));
+ isolatedNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), isolatedNames);
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ removeSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ removeSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ //
+ session.close(true);
+ end(true);
+
+ // Now test it is still removed
+ begin();
+ session = mgr.openSession();
+ afterNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(afterNames));
+ }
+
private Application<Portlet> create(String instanceId)
{
int i0 = instanceId.indexOf("#");
13 years, 5 months
gatein SVN: r5341 - in portal/branches/wci/packaging: jetty/pkg and 11 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-11-29 04:39:58 -0500 (Mon, 29 Nov 2010)
New Revision: 5341
Added:
portal/branches/wci/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml
portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/
portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/
portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties
portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties
portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/
portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/
portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties
portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties
Removed:
portal/branches/wci/packaging/jetty/pkg/src/main/resources/jetty-patch/
portal/branches/wci/packaging/tomcat/pkg/src/main/resources/tomcat-patch/
Modified:
portal/branches/wci/packaging/jetty/pkg/pom.xml
portal/branches/wci/packaging/profiles.xml
portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml
portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml
Log:
Remove patches
Jetty packaging ok
Modified: portal/branches/wci/packaging/jetty/pkg/pom.xml
===================================================================
--- portal/branches/wci/packaging/jetty/pkg/pom.xml 2010-11-29 09:38:54 UTC (rev 5340)
+++ portal/branches/wci/packaging/jetty/pkg/pom.xml 2010-11-29 09:39:58 UTC (rev 5341)
@@ -927,30 +927,37 @@
</execution>
</executions>
</plugin>
+ </plugins>
+ </build>
- <plugin>
- <!-- patch several files (log4j config etc...) -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-patch-plugin</artifactId>
- <version>1.1.1</version>
- <configuration>
- <targetDirectory>${project.build.directory}/jetty</targetDirectory>
- </configuration>
- <executions>
- <execution>
- <id>jetty-patches</id>
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
<configuration>
- <patchDirectory>src/main/resources/jetty-patch/</patchDirectory>
- <naturalOrderProcessing>true</naturalOrderProcessing>
+ <target>
+ <zip destfile="${project.build.directory}/jetty.zip" basedir="${project.build.directory}/jetty"/>
+ <attachartifact file="${project.build.directory}/jetty.zip" classifier="bundle" type="zip"/>
+ </target>
</configuration>
- <phase>prepare-package</phase>
- <goals>
- <goal>apply</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Added: portal/branches/wci/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml
===================================================================
--- portal/branches/wci/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml (rev 0)
+++ portal/branches/wci/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml 2010-11-29 09:39:58 UTC (rev 5341)
@@ -0,0 +1,235 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- =============================================================== -->
+<!-- Configure the Jetty Server -->
+<!-- -->
+<!-- Documentation of this file format can be found at: -->
+<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
+<!-- -->
+<!-- =============================================================== -->
+
+
+<Configure id="Server" class="org.mortbay.jetty.Server">
+
+ <!-- =========================================================== -->
+ <!-- Server Thread Pool -->
+ <!-- =========================================================== -->
+ <Set name="ThreadPool">
+
+ <New class="org.mortbay.thread.QueuedThreadPool">
+ <Set name="minThreads">10</Set>
+ <Set name="maxThreads">200</Set>
+ <Set name="lowThreads">20</Set>
+ <Set name="SpawnOrShrinkAt">2</Set>
+ </New>
+
+ <!-- Optional Java 5 bounded threadpool with job queue
+ <New class="org.mortbay.thread.concurrent.ThreadPool">
+ <Set name="corePoolSize">50</Set>
+ <Set name="maximumPoolSize">50</Set>
+ </New>
+ -->
+ </Set>
+
+
+
+ <!-- =========================================================== -->
+ <!-- Set connectors -->
+ <!-- =========================================================== -->
+ <!-- One of each type! -->
+ <!-- =========================================================== -->
+
+ <!-- Use this connector for many frequently idle connections
+ and for threadless continuations.
+ -->
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.mortbay.jetty.nio.SelectChannelConnector">
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
+ <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
+ <Set name="maxIdleTime">30000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">5000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- Use this connector if NIO is not available.
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.mortbay.jetty.bio.SocketConnector">
+ <Set name="port">8081</Set>
+ <Set name="maxIdleTime">50000</Set>
+ <Set name="lowResourceMaxIdleTime">1500</Set>
+ </New>
+ </Arg>
+ </Call>
+ -->
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- To add a HTTPS SSL listener -->
+ <!-- see jetty-ssl.xml to add an ssl connector. use -->
+ <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- To allow Jetty to be started from xinetd -->
+ <!-- mixin jetty-xinetd.xml: -->
+ <!-- java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml -->
+ <!-- -->
+ <!-- See jetty-xinetd.xml for further instructions. -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- =========================================================== -->
+ <!-- Set up global session ID manager -->
+ <!-- =========================================================== -->
+ <!--
+ <Set name="sessionIdManager">
+ <New class="org.mortbay.jetty.servlet.HashSessionIdManager">
+ <Set name="workerName">node1</Set>
+ </New>
+ </Set>
+ -->
+
+ <!-- =========================================================== -->
+ <!-- Set handler Collection Structure -->
+ <!-- =========================================================== -->
+ <Set name="handler">
+ <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
+ <Set name="handlers">
+ <Array type="org.mortbay.jetty.Handler">
+ <Item>
+ <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
+ </Item>
+ <Item>
+ <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
+ </Item>
+ <Item>
+ <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Set>
+
+ <!-- =========================================================== -->
+ <!-- Configure the context deployer -->
+ <!-- A context deployer will deploy contexts described in -->
+ <!-- configuration files discovered in a directory. -->
+ <!-- The configuration directory can be scanned for hot -->
+ <!-- deployments at the configured scanInterval. -->
+ <!-- -->
+ <!-- This deployer is configured to deploy contexts configured -->
+ <!-- in the $JETTY_HOME/contexts directory -->
+ <!-- -->
+ <!-- =========================================================== -->
+ <Call name="addLifeCycle">
+ <Arg>
+ <New class="org.mortbay.jetty.deployer.ContextDeployer">
+ <Set name="contexts"><Ref id="Contexts"/></Set>
+ <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
+ <Set name="scanInterval">5</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure the webapp deployer. -->
+ <!-- A webapp deployer will deploy standard webapps discovered -->
+ <!-- in a directory at startup, without the need for additional -->
+ <!-- configuration files. It does not support hot deploy or -->
+ <!-- non standard contexts (see ContextDeployer above). -->
+ <!-- -->
+ <!-- This deployer is configured to deploy webapps from the -->
+ <!-- $JETTY_HOME/webapps directory -->
+ <!-- -->
+ <!-- Normally only one type of deployer need be used. -->
+ <!-- -->
+ <!-- =========================================================== -->
+ <Call name="addLifeCycle">
+ <Arg>
+ <New class="org.mortbay.jetty.deployer.WebAppDeployer">
+ <Set name="contexts"><Ref id="Contexts"/></Set>
+ <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
+ <Set name="parentLoaderPriority">false</Set>
+ <Set name="extract">true</Set>
+ <Set name="allowDuplicates">false</Set>
+ <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure Authentication Realms -->
+ <!-- Realms may be configured for the entire server here, or -->
+ <!-- they can be configured for a specific web app in a context -->
+ <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
+ <!-- example). -->
+ <!-- =========================================================== -->
+ <Set name="UserRealms">
+<!--
+ <Array type="org.mortbay.jetty.security.UserRealm">
+ <Item>
+ <New class="org.mortbay.jetty.security.HashUserRealm">
+ <Set name="name">Test Realm</Set>
+ <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
+ <Set name="refreshInterval">0</Set>
+ </New>
+ </Item>
+ </Array>
+-->
+ <Array type="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Item>
+ <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Set name="Name">gatein-domain</Set>
+ <Set name="LoginModuleName">gatein-domain</Set>
+ <Set name="RoleCheckPolicy">
+ <New class="org.mortbay.jetty.plus.jaas.StrictRoleCheckPolicy"/>
+ </Set>
+ <Set name="CallbackHandlerClass">
+ org.mortbay.jetty.plus.jaas.callback.DefaultCallbackHandler
+ </Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.exoplatform.services.security.jaas.RolePrincipal</Item>
+ </Array>
+ </Set>
+ </New>
+ </Item>
+ </Array>
+ </Set>
+
+ <!-- =========================================================== -->
+ <!-- Configure Request Log -->
+ <!-- Request logs may be configured for the entire server here, -->
+ <!-- or they can be configured for a specific web app in a -->
+ <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
+ <!-- for an example). -->
+ <!-- =========================================================== -->
+ <Ref id="RequestLog">
+ <Set name="requestLog">
+ <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
+ <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
+ <Set name="filenameDateFormat">yyyy_MM_dd</Set>
+ <Set name="retainDays">90</Set>
+ <Set name="append">true</Set>
+ <Set name="extended">false</Set>
+ <Set name="logCookies">false</Set>
+ <Set name="LogTimeZone">GMT</Set>
+ </New>
+ </Set>
+ </Ref>
+
+ <!-- =========================================================== -->
+ <!-- extra options -->
+ <!-- =========================================================== -->
+ <Set name="stopAtShutdown">true</Set>
+ <Set name="sendServerVersion">true</Set>
+ <Set name="sendDateHeader">true</Set>
+ <Set name="gracefulShutdown">1000</Set>
+
+</Configure>
Modified: portal/branches/wci/packaging/profiles.xml
===================================================================
--- portal/branches/wci/packaging/profiles.xml 2010-11-29 09:38:54 UTC (rev 5340)
+++ portal/branches/wci/packaging/profiles.xml 2010-11-29 09:39:58 UTC (rev 5341)
@@ -29,7 +29,7 @@
ex: On Windows 'c:/AS'
ex: On Linux '/home/user/AS'
-->
- <exo.projects.directory.dependencies>/Users/defrancea/eXo/servers</exo.projects.directory.dependencies>
+ <exo.projects.directory.dependencies>REPLACE_WITH_YOUR_OWN_DIRECTORY</exo.projects.directory.dependencies>
<!--
If you want that the server is deployed always at the same place (not in packaging/pkg/target/<server> dir)
@@ -41,12 +41,16 @@
<!--
Replace with the name of the directory containing Tomcat 6
-->
- <exo.projects.app.tomcat.version>apache-tomcat-6.0.29</exo.projects.app.tomcat.version>
+ <exo.projects.app.tomcat.version>apache-tomcat-6.0.20</exo.projects.app.tomcat.version>
<!--
Replace with the name of the directory containing Tomcat 7
-->
<exo.projects.app.tomcat7.version>apache-tomcat-7.0.2</exo.projects.app.tomcat7.version>
<!--
+ Replace with the name of the directory containing Tomcat 7
+ -->
+ <exo.projects.app.jetty.version>jetty-6.1.25/jetty-6.1.25</exo.projects.app.jetty.version>
+ <!--
Replace with the name of the directory containing JBoss AS 5.1
-->
<exo.projects.app.jboss.version>jboss-5.1.0.GA</exo.projects.app.jboss.version>
Modified: portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml 2010-11-29 09:38:54 UTC (rev 5340)
+++ portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml 2010-11-29 09:39:58 UTC (rev 5341)
@@ -84,6 +84,11 @@
<fileset dir="${project.build.directory}/../../target/tomcat"/>
</copy>
+ <!-- Copy specific tomcat configration -->
+ <copy todir="${project.build.directory}/tomcat6" overwrite="true">
+ <fileset dir="${project.basedir}/src/main/resources/tomcat"/>
+ </copy>
+
<!-- Tomcat 6 specific dependencies -->
<copy
file="${maven.dependency.org.gatein.wci.wci-tomcat6.jar.path}"
Added: portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties (rev 0)
+++ portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties 2010-11-29 09:39:58 UTC (rev 5341)
@@ -0,0 +1,82 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+#common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/gatein/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
Added: portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties (rev 0)
+++ portal/branches/wci/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties 2010-11-29 09:39:58 UTC (rev 5341)
@@ -0,0 +1,109 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, 6gatein.org.apache.juli.FileHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#org.apache.catalina.startup.ContextConfig.level = FINE
+#org.apache.catalina.startup.HostConfig.level = FINE
+#org.apache.catalina.session.ManagerBase.level = FINE
+#org.apache.catalina.core.AprLifecycleListener.level=FINE
+
+############################################################
+# GateIn log configuration
+############################################################
+
+# Gatein log Handler
+6gatein.org.apache.juli.FileHandler.level = FINE
+6gatein.org.apache.juli.FileHandler.directory = ${catalina.base}/gatein/logs
+6gatein.org.apache.juli.FileHandler.prefix = gatein
+
+# logger configuration
+org.exoplatform.level = INFO
+org.exoplatform.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.gatein.level = INFO
+org.gatein.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.chromattic.level = INFO
+org.chromattic.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+jcr.level = INFO
+jcr.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+ws.level = INFO
+ws.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+XMLResolvingServiceImpl.level = INFO
+XMLResolvingServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+TRAXTemplatesServiceImpl.level = INFO
+TRAXTemplatesServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.hibernate.level = INFO
+org.hibernate.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+com.arjuna.level = INFO
+com.arjuna.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.jboss.level = INFO
+org.jboss.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.apache.shindig.level = INFO
+org.apache.shindig.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
Modified: portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml 2010-11-29 09:38:54 UTC (rev 5340)
+++ portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml 2010-11-29 09:39:58 UTC (rev 5341)
@@ -85,6 +85,11 @@
<fileset dir="${project.build.directory}/../../target/tomcat"/>
</copy>
+ <!-- Copy specific tomcat configration -->
+ <copy todir="${project.build.directory}/tomcat7" overwrite="true">
+ <fileset dir="${project.basedir}/src/main/resources/tomcat"/>
+ </copy>
+
<!-- Tomcat 7 specific dependencies -->
<copy
file="${maven.dependency.org.gatein.wci.wci-tomcat7.jar.path}"
Added: portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties (rev 0)
+++ portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties 2010-11-29 09:39:58 UTC (rev 5341)
@@ -0,0 +1,111 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+#common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/gatein/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+# List of JAR files that should not be scanned for configuration information
+# such as web fragments, TLD files etc. It must be a comma separated list of
+# JAR file names.
+# The JARs listed below include:
+# - Tomcat Bootstrap JARs
+# - Tomcat API JARs
+# - Catalina JARs
+# - Jasper JARs
+# - Tomcat JARs
+# - Common non-Tomcat JARs
+# - Sun JDK JARs
+# - Apple JDK JARs
+tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
+bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
+annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
+catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
+jasper.jar,jasper-el.jar,ecj-3.6.jar,\
+tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
+tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
+commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,\
+commons-digester.jar,commons-fileupload-1.0.jar,commons-logging.jar,\
+commons-pool.jar,\
+ant.jar,jmx.jar,jmx-tools.jar,\
+xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
+dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,\
+apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
+j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
+mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
\ No newline at end of file
Added: portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties (rev 0)
+++ portal/branches/wci/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties 2010-11-29 09:39:58 UTC (rev 5341)
@@ -0,0 +1,109 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, 6gatein.org.apache.juli.FileHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#org.apache.catalina.startup.ContextConfig.level = FINE
+#org.apache.catalina.startup.HostConfig.level = FINE
+#org.apache.catalina.session.ManagerBase.level = FINE
+#org.apache.catalina.core.AprLifecycleListener.level=FINE
+
+############################################################
+# GateIn log configuration
+############################################################
+
+# Gatein log Handler
+6gatein.org.apache.juli.FileHandler.level = FINE
+6gatein.org.apache.juli.FileHandler.directory = ${catalina.base}/gatein/logs
+6gatein.org.apache.juli.FileHandler.prefix = gatein
+
+# logger configuration
+org.exoplatform.level = INFO
+org.exoplatform.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.gatein.level = INFO
+org.gatein.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.chromattic.level = INFO
+org.chromattic.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+jcr.level = INFO
+jcr.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+ws.level = INFO
+ws.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+XMLResolvingServiceImpl.level = INFO
+XMLResolvingServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+TRAXTemplatesServiceImpl.level = INFO
+TRAXTemplatesServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.hibernate.level = INFO
+org.hibernate.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+com.arjuna.level = INFO
+com.arjuna.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.jboss.level = INFO
+org.jboss.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.apache.shindig.level = INFO
+org.apache.shindig.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
13 years, 5 months