Author: sohil.shah(a)jboss.com
Date: 2007-05-01 11:54:32 -0400 (Tue, 01 May 2007)
New Revision: 7163
Added:
trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java
trunk/cms/src/resources/test/cms/clustering/datasource/
trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml
trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml
Removed:
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
Modified:
trunk/
trunk/cms/build.xml
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java
trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
trunk/core-cms/build.xml
trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
Log:
Fix For: Fine Grained CMS permissions not accurately enforced in a clustered environment -
JBPORTAL-1212
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- .project
.classpath
thirdparty
eclipseBin
myworkspace
bin
*.settings
miscellaneous
+ .project
.classpath
thirdparty
eclipseBin
myworkspace
bin
*.settings
miscellaneous
local-tests
Modified: trunk/cms/build.xml
===================================================================
--- trunk/cms/build.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/build.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -222,72 +222,93 @@
<!--
generates artifacts used for tests, requires output to be previously run
-->
- <target name="package-tests" depends="init">
-
+ <target name="package-tests" depends="init">
<jar jarfile="${build.lib}/test-cms-cluster.sar"
manifest="${build.etc}/portal-cms-lib-sar.mf">
- <fileset dir="${build.resources}/portal-cms-sar"/>
- <fileset dir="${build.lib}"
includes="portal-cms-lib.jar"/>
- <fileset dir="${jcr.jcr.root}/lib"
includes="jcr-1.0.jar"/>
- <fileset dir="${apache.collections.root}/lib"
includes="commons-collections.jar"/>
- <fileset dir="${apache.lucene.root}/lib"
includes="lucene.jar"/>
+ <fileset dir="${build.resources}/portal-cms-sar"/>
+ <fileset dir="${build.lib}"
includes="portal-cms-lib.jar"/>
+ <fileset dir="${jcr.jcr.root}/lib"
includes="jcr-1.0.jar"/>
+ <fileset dir="${apache.collections.root}/lib"
includes="commons-collections.jar"/>
+ <fileset dir="${apache.lucene.root}/lib"
includes="lucene.jar"/>
- <!-- cms optimization integration -->
- <fileset dir="${jackrabbit.jackrabbit.lib}"
includes="jackrabbit-core-1.0.jar"/>
- <fileset dir="${jboss.cache.lib}"
includes="jboss-cache.jar"/>
- <fileset dir="${jgroups.jgroups.lib}"
includes="jgroups.jar"/>
-
-
- <fileset dir="${slf4j.slf4j.lib}"
includes="slf4j-log4j12.jar"/>
+ <!-- cms optimization integration -->
+ <fileset dir="${jackrabbit.jackrabbit.lib}"
includes="jackrabbit-core.jar"/>
+ <fileset dir="${jboss.cache.lib}"
includes="jboss-cache.jar"/>
+ <fileset dir="${jgroups.jgroups.lib}"
includes="jgroups.jar"/>
+
+ <fileset dir="${slf4j.slf4j.lib}"
includes="slf4j-log4j12.jar"/>
- <!-- add the jboss-service.xml and hibernate configuration -->
- <fileset dir="${build.resources}/test/cms/clustering/sar"/>
- <fileset dir="${jboss.portal-core.lib}"
includes="portal-core-lib.jar"/>
- <fileset dir="${jboss.portal-common.lib}"
includes="portal-common-lib.jar"/>
- <fileset dir="${jboss.portal-jems.lib}"
includes="portal-jems-lib.jar"/>
- <fileset dir="${jboss.portal-server.lib}"
includes="portal-server-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.lib}"
includes="portal-portlet-testframework-lib.jar"/>
- </jar>
+ <!-- add the jboss-service.xml and hibernate configuration -->
+ <fileset dir="${build.resources}/test/cms/clustering/sar"/>
+
+ <!-- add dependencies -->
+ <!--
+ <fileset dir="${jboss.portal-core.lib}"
includes="portal-core-lib.jar"/>
+ <fileset dir="${jboss.portal-common.lib}"
includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal-jems.lib}"
includes="portal-jems-lib.jar"/>
+ <fileset dir="${jboss.portal-server.lib}"
includes="portal-server-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}"
includes="portal-portlet-lib.jar"/>
+ <fileset dir="${jboss.portlet-api.lib}"
includes="portal-api-lib.jar"/>
+ <fileset dir="${jboss.portal-security.lib}"
includes="portal-security-lib.jar"/>
+ -->
+ <fileset dir="${jboss.portal-core-cms.lib}"
includes="portal-core-cms-lib.jar"/>
+ <fileset dir="${jboss.portal-identity.lib}"
includes="portal-identity-lib.jar"/>
+ <fileset dir="${jboss.portal-workflow.lib}"
includes="portal-workflow-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}"
includes="portal-portlet-testframework-lib.jar"/>
+ </jar>
<jar jarfile="${build.lib}/test-cms-cluster.war">
- <fileset
dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
- <fileset dir="${build.classes}"
includes="org/jboss/portal/test/cms/clustering/**"/>
+ <fileset
dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
+ <fileset dir="${build.classes}"
includes="org/jboss/portal/test/cms/clustering/**"/>
</jar>
</target>
<target name="deploy-tests"
description="Deploy."
depends="output">
- <!--
+ <!--
upgrage the jbosscache/groups of the HA instances for the puropse of testing
TODO: This is fine for this iteration. Eventually we need to integrate these
libraries
for bundling in the thirdparty mechanism. This will follow in the next iteration
- -->
+ -->
<copy file="${jboss.cache.lib}/jboss-cache.jar"
todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
- <copy file="${jgroups.jgroups.lib}/jgroups.jar"
todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
- <copy file="${jboss.cache.lib}/jboss-cache.jar"
todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
- <copy file="${jgroups.jgroups.lib}/jgroups.jar"
todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+ <copy file="${jgroups.jgroups.lib}/jgroups.jar"
todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
+ <copy file="${jboss.cache.lib}/jboss-cache.jar"
todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+ <copy file="${jgroups.jgroups.lib}/jgroups.jar"
todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+
+ <!-- deploying the test datasources -->
+ <copy
file="${build.resources}/test/cms/clustering/datasource/ports01-ds.xml"
todir="${jboss.home}/server/ports-01/deploy" overwrite="true"/>
+ <copy
file="${build.resources}/test/cms/clustering/datasource/ports02-ds.xml"
todir="${jboss.home}/server/ports-02/deploy" overwrite="true"/>
<!-- install test sars needed for the testsuite framework -->
+ <!--
<copy file="${jboss.portal-portlet.lib}/test.sar"
todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${jboss.portal-portlet.lib}/test.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
- <copy file="${jboss.portal-test.lib}/portal-test.sar"
todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${jboss.portal-test.lib}/portal-test.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
-
- <copy file="${build.lib}/test-cms-cluster.sar"
todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${build.lib}/test-cms-cluster.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
+ <copy file="${jboss.portal-portlet.lib}/test.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
+ -->
+
+ <!--
+ <copy file="${jboss.portal-test.lib}/portal-test.sar"
todir="${jboss.home}/server/ports-01/deploy"/>
+ <copy file="${jboss.portal-test.lib}/portal-test.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
+ -->
+
+ <copy file="${build.lib}/test-cms-cluster.sar"
todir="${jboss.home}/server/ports-01/deploy"/>
+ <copy file="${build.lib}/test-cms-cluster.sar"
todir="${jboss.home}/server/ports-02/deploy"/>
</target>
<target name="undeploy-tests"
description="UnDeploy."
- depends="output">
-
- <!-- install test sars needed for the testsuite framework -->
- <delete file="${jboss.home}/server/ports-01/deploy/test.sar"/>
- <delete file="${jboss.home}/server/ports-02/deploy/test.sar"/>
- <delete
file="${jboss.home}/server/ports-01/deploy/portal-test.sar"/>
- <delete
file="${jboss.home}/server/ports-02/deploy/portal-test.sar"/>
- <delete
file="${jboss.home}/server/ports-01/deploy/test-cms-cluster.sar"/>
- <delete
file="${jboss.home}/server/ports-02/deploy/test-cms-cluster.sar"/>
+ depends="output">
+ <!-- install test sars needed for the testsuite framework -->
+ <!--
+ <delete file="${jboss.home}/server/ports-01/deploy/test.sar"/>
+ <delete file="${jboss.home}/server/ports-02/deploy/test.sar"/>
+ -->
+ <!--
+ <delete file="${jboss.home}/server/ports-01/deploy/portal-test.sar"/>
+ <delete
file="${jboss.home}/server/ports-02/deploy/portal-test.sar"/>
+ -->
+
+ <delete
file="${jboss.home}/server/ports-01/deploy/test-cms-cluster.sar"/>
+ <delete
file="${jboss.home}/server/ports-02/deploy/test-cms-cluster.sar"/>
</target>
<!-- ================================================================== -->
@@ -328,7 +349,7 @@
<sysproperty key="test.uri"
value="/test/redirect/"/>
</x-sysproperty>
<x-test>
- <test todir="${test.reports}"
name="org.jboss.portal.test.cms.clustering.CMSTestSuite"/>
+ <test todir="${test.reports}"
name="org.jboss.portal.test.cms.clustering.FileUpdateTest"/>
</x-test>
<x-classpath>
<path refid="apache.logging.classpath"/>
@@ -394,6 +415,7 @@
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.TestRepositoryBootStrap"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.TestRegEx"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.TestRepositoryUtil"/>
+
<!-- cms file command tests -->
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFileCreate"/>
@@ -405,7 +427,8 @@
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFileCopy"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFileCreateFailed"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFileDelete"/>
- <test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestSearch"/>
+ <test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestSearch"/>
+
<!-- cms folder command tests -->
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFolderCopy"/>
@@ -413,12 +436,14 @@
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFolderDelete"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFolderGet"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.commands.TestFolderUpdate"/>
+
- <!-- cms fine grained security related tests -->
+ <!-- cms fine grained security related tests -->
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.security.TestReadAccess"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.security.TestWriteAccess"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.security.TestManageAccess"/>
+
<!-- cms workflow related tests -->
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.workflow.TestApprovedPublish"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.cms.workflow.TestDeniedPublish"/>
@@ -483,6 +508,5 @@
</fileset>
<report format="frames"
todir="${build.reports}/html"/>
</junitreport>
- </target>
-
+ </target>
</project>
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-05-01 13:29:46 UTC
(rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-05-01 15:54:32 UTC
(rev 7163)
@@ -37,6 +37,7 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.model.Folder;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.cms.util.RepositoryUtil;
import org.jboss.portal.common.invocation.InterceptorStackFactory;
import org.jboss.portal.common.invocation.Invocation;
@@ -65,6 +66,7 @@
import javax.jcr.Session;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
+import javax.naming.InitialContext;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
@@ -99,6 +101,8 @@
private Element config;
+ private String identitySessionFactory = null;
+
private IdentityServiceController identityServiceController;
private ApprovePublish approvePublishWorkflow;
@@ -271,7 +275,26 @@
{
this.jndiName = jndiName;
}
-
+
+ /**
+ *
+ * @return
+ */
+ public String getIdentitySessionFactory()
+ {
+ return identitySessionFactory;
+ }
+
+ /**
+ *
+ * @param identitySessionFactory
+ */
+ public void setIdentitySessionFactory(String identitySessionFactory)
+ {
+ this.identitySessionFactory = identitySessionFactory;
+ }
+
+
/** CMS Start */
public void startService() throws Exception
{
@@ -567,9 +590,30 @@
};
Object obj = null;
+ boolean isClusterDelegatedRequest = false; //used to indicate this request is from
another cluster node instead of the master node
+ boolean clusterWorkflowStatus = false;
try
{
xares.start(xid, XAResource.TMNOFLAGS);
+
+ //Check and make sure in the case of a clustered call, the Identity propagated
+ //as part of the invocation is handled correctly
+ JCRCommandContext propagatedContext =
(JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(propagatedContext != null)
+ {
+ CMSUser propagatedUser =
(CMSUser)propagatedContext.getClusterContextInfo("user");
+ if(propagatedUser != null)
+ {
+ JCRCMS.getUserInfo().set(propagatedUser);
+ isClusterDelegatedRequest = true;
+ }
+ Boolean workflowStatus =
(Boolean)propagatedContext.getClusterContextInfo("workflowStatus");
+ if(workflowStatus != null)
+ {
+ JCRCMS.turnOffWorkflow();
+ clusterWorkflowStatus = true;
+ }
+ }
// .... add new nodes & properties and save them
JCRCommand jcrCmd = (JCRCommand)cmd;
@@ -637,6 +681,14 @@
//must do this otherwise, the whole cms will hang
session.logout();
}
+ if(isClusterDelegatedRequest)
+ {
+ JCRCMS.getUserInfo().set(null);
+ }
+ if(clusterWorkflowStatus)
+ {
+ JCRCMS.turnOnWorkflow();
+ }
}
return obj;
}
@@ -658,5 +710,5 @@
public InterceptorStackFactory getStackFactory()
{
return stackFactory;
- }
+ }
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-05-01
13:29:46 UTC (rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-05-01
15:54:32 UTC (rev 7163)
@@ -22,7 +22,12 @@
******************************************************************************/
package org.jboss.portal.cms.impl.jcr;
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+
import org.jboss.portal.cms.CMSException;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.common.invocation.AbstractInvocationContext;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.invocation.Scope;
@@ -34,15 +39,17 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class JCRCommandContext extends AbstractInvocationContext
+public class JCRCommandContext extends AbstractInvocationContext implements Serializable
{
public static final Scope scope = Scope.THREAD_SCOPE;
- private final Session session;
+ private transient final Session session;
- private final JCRCommandFactory commandFactory;
+ private transient final JCRCommandFactory commandFactory;
- private final Locale locale;
+ private transient final Locale locale;
+
+ private Map clusterContext = null;
public JCRCommandContext(Session session, JCRCommandFactory factory, Locale locale)
{
@@ -73,4 +80,36 @@
return locale;
}
+ /**
+ *
+ * @param key
+ * @param data
+ */
+ public void setClusterContextInfo(String key,Object data)
+ {
+ this.getClusterContext().put(key, data);
+ }
+
+ /**
+ *
+ * @param key
+ * @return
+ */
+ public Object getClusterContextInfo(String key)
+ {
+ return this.getClusterContext().get(key);
+ }
+
+ /**
+ * Instantiates the cluser context only on-demand
+ * @return
+ */
+ private Map getClusterContext()
+ {
+ if(this.clusterContext == null)
+ {
+ this.clusterContext = new HashMap();
+ }
+ return this.clusterContext;
+ }
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java 2007-05-01 13:29:46
UTC (rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java 2007-05-01 15:54:32
UTC (rev 7163)
@@ -24,9 +24,14 @@
import org.jboss.portal.cms.CMSException;
import org.jboss.portal.cms.Command;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.cms.impl.jcr.JCRCMS;
+import org.jboss.portal.cms.impl.jcr.JCRCommand;
+import org.jboss.portal.cms.impl.jcr.JCRCommandContext;
import org.jboss.portal.jems.ha.HASingletonInvoker;
+import org.jboss.portal.identity.User;
+
/**
* Extend the JCR CMS and make it run as an ha singleton.
*
@@ -52,6 +57,32 @@
{
try
{
+ //Add the user Identity ThreadLocal variable to the Command Context for
propagation to the Master Node
+ if(this.getUserInfo().get() != null)
+ {
+ User user = (User)this.getUserInfo().get();
+ JCRCommandContext context =
(JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(context == null)
+ {
+ context = new JCRCommandContext(null,null,null);
+ ((JCRCommand)cmd).setContext(context);
+ }
+ context.setClusterContextInfo("user",new
CMSUser(user.getUserName()));
+ }
+
+ //Add the Workflow ThreadLocal variable to the Command Context for
propagation to the Master Node
+ if(this.turnOffWorkflow.get() != null)
+ {
+ Boolean workflowStatus = (Boolean)this.turnOffWorkflow.get();
+ JCRCommandContext context =
(JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(context == null)
+ {
+ context = new JCRCommandContext(null,null,null);
+ ((JCRCommand)cmd).setContext(context);
+ }
+ context.setClusterContextInfo("workflowStatus",workflowStatus);
+ }
+
// Use the proxy to invoke on the singleton
return invoker.invoke("execute", new Class[]{Command.class}, new
Object[]{cmd});
}
@@ -59,7 +90,7 @@
{
e.printStackTrace();
throw new RuntimeException("Fixme bad contract", e);
- }
+ }
}
}
Added: trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java
(rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java 2007-05-01 15:54:32 UTC
(rev 7163)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.jboss.portal.cms.model;
+
+import java.io.Serializable;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class CMSUser implements User, Serializable
+{
+ /**
+ *
+ */
+ private String username = null;
+
+ /**
+ *
+ * @param username
+ */
+ public CMSUser(String username)
+ {
+ this.username = username;
+ }
+
+ /**
+ *
+ */
+ public Object getId()
+ {
+ return null;
+ }
+
+ /**
+ *
+ */
+ public String getUserName()
+ {
+ return this.username;
+ }
+
+ /**
+ *
+ */
+ public void updatePassword(String password)
+ {
+ throw new RuntimeException("Illegal Operation");
+ }
+
+ /**
+ *
+ */
+ public boolean validatePassword(String password)
+ {
+ throw new RuntimeException("Illegal Operation");
+ }
+}
Added: trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml
(rev 0)
+++ trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>PortalDS</jndi-name>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}database</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password><![CDATA[]]></password>
+ </local-tx-datasource>
+</datasources>
Added: trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml
(rev 0)
+++ trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>PortalDS</jndi-name>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}database</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password><![CDATA[]]></password>
+ </local-tx-datasource>
+</datasources>
Modified: trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml 2007-05-01
13:29:46 UTC (rev 7162)
+++ trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -22,17 +22,30 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<server>
+
+ <!-- Management MBean -->
<mbean
+ code="org.jboss.portal.cms.management.CMSImpl"
+ name="portal:service=Management,type=CMS,name=Default"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <depends
+ optional-attribute-name="CMS"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <xmbean/>
+ </mbean>
+
+ <mbean
code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
name="portal:service=Hibernate,type=CMS"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
-
<depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
<attribute name="DoChecking">true</attribute>
<attribute
name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
<attribute
name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
- </mbean>
+ </mbean>
<mbean
code="org.jboss.portal.cms.impl.jcr.ha.HAJCRCMS"
@@ -40,18 +53,23 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <!-- The datasource hibernate depends on, it can be commented when the file
store is used -->
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
+ <depends>portal:service=JAASLoginModule</depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends optional-attribute-name="IdentityServiceController"
proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
-
<depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>
- <depends>portal:service=Hibernate,type=CMS</depends>
- <!--depends>portal:service=JAASLoginModule</depends-->
-
- <!--depends optional-attribute-name="StackFactory"
proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends-->
-
+ <!-- Add this to activate publish/approval workflow integration -->
+ <!--
+ <depends optional-attribute-name="ApprovePublishWorkflow"
proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends>
+ -->
+
+ <depends optional-attribute-name="StackFactory"
proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends>
<attribute name="DoChecking">true</attribute>
- <attribute
name="DefaultContentLocation">default-content/default/</attribute>
+ <attribute
name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute>
<attribute name="DefaultLocale">en</attribute>
<attribute
name="RepositoryName">PortalRepository</attribute>
- <attribute
name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+ <attribute
name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
<attribute name="Config">
<Repository>
<!--
@@ -85,7 +103,7 @@
<!-- HibernateStore: uses RDBMS + Hibernate for storage -->
<FileSystem
class="org.jboss.portal.cms.hibernate.HibernateStore">
<param name="schemaObjectPrefix"
value="CMSEntry"/>
- <param name="JNDIName"
value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName"
value="java:/portal/cms/CMSSessionFactory"/>
</FileSystem>
<!-- LocalFileSystem: uses FileSystem for storage. -->
<!--<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
@@ -94,13 +112,13 @@
<!--
persistence manager of the workspace.
- Use XMLPersistenceManager for LocalFileSystem Store and
HibernatePersistentManager .
+ Use XMLPersistenceManager for LocalFileSystem Store and
JBossCachePersistenceManager .
-->
<!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage
-->
<PersistenceManager
class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix"
value="WSP"/>
- <param name="JNDIName"
value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName"
value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
@@ -109,6 +127,7 @@
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path"
value="${wsp.home}/index"/>
+ <param name="textFilterClasses"
value="org.apache.jackrabbit.core.query.HTMLTextFilter" />
<param name="useCompoundFile" value="true"/>
<param name="minMergeDocs" value="100"/>
<param name="volatileIdleTime" value="3"/>
@@ -129,7 +148,7 @@
<!-- HibernateStore: uses RDBMS + Hibernate for storage -->
<FileSystem
class="org.jboss.portal.cms.hibernate.HibernateStore">
<param name="schemaObjectPrefix"
value="VersionEntry"/>
- <param name="JNDIName"
value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName"
value="java:/portal/cms/CMSSessionFactory"/>
</FileSystem>
<!-- LocalFileSystem: uses FileSystem for storage. -->
@@ -141,13 +160,13 @@
<!--
Configures the persistence manager to be used for persisting version
state.
- Use XMLPersistenceManager for LocalFileSystem Store and
HibernatePersistentManager for HibernateStore.
+ Use XMLPersistenceManager for LocalFileSystem Store and
JBossCachePersistenceManager for HibernateStore.
-->
<!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage
-->
<PersistenceManager
class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix"
value="Version"/>
- <param name="JNDIName"
value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName"
value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
@@ -156,10 +175,11 @@
</Versioning>
</Repository>
</attribute>
+ <attribute name="JNDIName">java:portal/CMS</attribute>
</mbean>
<!--
- | Uncomment in clustered mode : HASingleton registration
+ | Uncomment in clustered mode : Provides an HA-singleton based clustering
architecture.
-->
<mbean
code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
@@ -175,10 +195,11 @@
</interceptors>
</attribute>
</mbean>
+
<mbean
code="org.jboss.portal.jems.ha.HASingletonInvoker"
name="portal:service=HASingletonInvoker,type=CMS">
- <depends>jboss:service=DefaultPartition</depends>
+
<depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
<attribute name="RetryWaitingTimeMS">2000</attribute>
<attribute name="MaxRetries">5</attribute>
<attribute name="JNDIName">MyServiceInvokeTarget</attribute>
@@ -197,7 +218,48 @@
<depends optional-attribute-name="Callback"
proxy-type="attribute">portal:service=CMS</depends>
<depends
optional-attribute-name="ProxyFactory">portal:service=ProxyFactory,type=CMS</depends>
</mbean>
+ <!--
+ -->
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectCommandFactoryService"
+ name="portal:commandFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute
name="TargetWindowRef">default.default.CMSWindow</attribute>
+ <depends
+ optional-attribute-name="CMSService"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <depends
+ optional-attribute-name="ServerConfig"
+ proxy-type="attribute">portal:service=ServerConfig</depends>
+ </mbean>
+ <mbean
+
code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
+ name="portal:commandFactory=Delegate,path=content"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends
+ optional-attribute-name="DelegatingFactory"
+
proxy-type="attribute">portal:commandFactory=Delegating</depends>
+ <depends
+ optional-attribute-name="DelegateFactory"
+
proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectURLFactory"
+ name="portal:urlFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends optional-attribute-name="Factory"
proxy-type="attribute">portal:urlFactory=Delegating</depends>
+ </mbean>
+
<!-- TreeCache configuration used to cache CMS data -->
<mbean code="org.jboss.cache.TreeCache"
name="cms.pm.cache:service=TreeCache">
@@ -370,54 +432,129 @@
<attribute
name="CacheLoaderFetchPersistentState">false</attribute>
<attribute name="CacheLoaderAsynchronous">false</attribute-->
</mbean>
-
- <!-- not sure if these should be removed since Command Framework is used now
-->
- <!--mbean
- code="org.jboss.portal.core.cms.CMSObjectCommandFactory"
- name="portal:commandFactory=CMSObject"
+
+ <!-- interceptor factory where all cms interceptors are registered -->
+ <mbean
+
code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+ name="portal:service=InterceptorStackFactory,type=Cms"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute
name="TargetWindowRef">default.default.DefaultCMSPortletWindow</attribute>
- <depends optional-attribute-name="CMSService"
proxy-type="attribute">portal:service=CMS</depends>
+ <depends-list optional-attribute-name="InterceptorNames">
+
<depends-list-element>portal:service=Interceptor,type=Cms,name=ACL</depends-list-element>
+
<depends-list-element>portal:service=Interceptor,type=Cms,name=ApprovalWorkflow</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!-- CMS Authorization Security Service -->
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationManagerImpl"
+ name="portal:service=AuthorizationManager,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute
name="JNDIName">java:portal/cms/AuthorizationManager</attribute>
+ <depends optional-attribute-name="Provider"
proxy-type="attribute">
+ portal:service=AuthorizationProvider,type=cms
+ </depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationProviderImpl"
+ name="portal:service=AuthorizationProvider,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="IdentityServiceController"
proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
</mbean>
+
+ <!-- ACL Security Interceptor -->
<mbean
-
code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,prefix=content"
+ code="org.jboss.portal.cms.impl.interceptors.ACLInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ACL"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="Prefix">content</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
-
proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
-
proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ <attribute
name="JNDIName">java:/portal/cms/ACLInterceptor</attribute>
+ <attribute
name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute>
+ <attribute
name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
+ <attribute name="DefaultPolicy">
+ <![CDATA[
+ <policy>
+ <!-- permissions on the root cms node -->
+ <criteria name="path" value="/">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the default cms node -->
+ <criteria name="path" value="/default">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the private/protected node -->
+ <criteria name="path" value="/default/private">
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ </policy>
+ ]]>
+ </attribute>
+ <depends optional-attribute-name="AuthorizationManager"
proxy-type="attribute">
+ portal:service=AuthorizationManager,type=cms
+ </depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends>portal:service=Module,type=IdentityServiceController</depends>
</mbean>
+
+ <!-- Approval Workflow Interceptor -->
<mbean
- code="org.jboss.portal.core.cms.CMSObjectURLFactory"
- name="portal:urlFactory=CMSObject"
+
code="org.jboss.portal.cms.impl.interceptors.ApprovalWorkflowInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ApprovalWorkflow"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Prefix">content</attribute>
- <depends optional-attribute-name="Factory"
proxy-type="attribute">portal:urlFactory=Delegating</depends>
- </mbean-->
-
- <!-- intereceptors -->
+ <xmbean/>
+ <attribute
name="JNDIName">java:/portal/cms/ApprovalWorkflowInterceptor</attribute>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ </mbean>
+
+ <!-- logging interceptor -->
<!--mbean
code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
name="portal:service=Interceptor,type=Cms,name=Log"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- </mbean>
+ </mbean-->
+
+ <!--
<mbean
+ code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=Cache"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=CMSTreeCacheService</depends>
+ </mbean>
+ //this is not needed anymore. this cache is redundant since there is a JBossCache PM
+ <mbean
code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
name="portal:service=CMSTreeCacheService"
xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Cache"
proxy-type="attribute">
<mbean
@@ -431,27 +568,8 @@
</mbean>
</depends>
<attribute
name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Cache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=CMSTreeCacheService</depends>
</mbean>
- <mbean
-
code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Cms"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
-
<depends-list-element>portal:service=Interceptor,type=Cms,name=Cache</depends-list-element>
-
<depends-list-element>portal:service=Interceptor,type=Cms,name=Log</depends-list-element>
- </depends-list>
- </mbean-->
-
+ -->
<!--
| Uncomment in clustered mode : TreeCache configuration for the clustered
JackRabbit in-memory cache...
| This helps with node synching, but there are other aspects of JackRabbit like
versioning subsystem
@@ -528,4 +646,42 @@
<attribute
name="UseRegionBasedMarshalling">false</attribute>
</mbean-->
+
+ <mbean
+ code="org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor"
+ name="portal:service=Interceptor,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+ <mbean
+
code="org.jboss.portal.server.impl.invocation.JBossInterceptorRegistration"
+
name="portal:service=InterceptorRegistration,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+
optional-attribute-name="InterceptorName">portal:service=Interceptor,type=Server,name=CMSIdentityBinding</depends>
+ <depends
+
optional-attribute-name="StackFactory">portal:service=InterceptorStackFactory,type=Server</depends>
+ </mbean>
+
+ <!-- Content renderer integration -->
+ <mbean
+ code="org.jboss.portal.core.cms.content.InternalCMSContentProvider"
+ name="portal:service=ContentRenderer,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="ContentType">cms</attribute>
+ <attribute name="DecorateContent">false</attribute>
+ <attribute
name="PortletInstanceName">CMSPortletInstance</attribute>
+ <depends
+ optional-attribute-name="Registry"
+
proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
+ <depends
+ optional-attribute-name="CommandFactory"
+
proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
</server>
Deleted:
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
===================================================================
---
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml 2007-05-01
13:29:46 UTC (rev 7162)
+++
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -1,278 +0,0 @@
-<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.jboss.portal.cms.hibernate.state.VersionBinVal"
table="jbp_cms_version_binval" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="id"
- column="BINVAL_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="BINVAL_DATA"
- type="blob"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionNode"
table="jbp_cms_version_node" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="nodeId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="NODE_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionProp"
table="jbp_cms_version_prop" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="propId"
- column="PROP_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="PROP_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionRefs"
table="jbp_cms_version_refs" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="refId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="REFS_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPBinVal"
table="jbp_cms_wsp_binval" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="id"
- column="BINVAL_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="BINVAL_DATA"
- type="blob"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPNode"
table="jbp_cms_wsp_node" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="nodeId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="NODE_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPProp"
table="jbp_cms_wsp_prop" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="propId"
- column="PROP_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="PROP_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPRefs"
table="jbp_cms_wsp_refs" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="refId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="REFS_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.CMSEntry"
table="jbp_cms_cmsentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.RepositoryEntry"
table="jbp_cms_repositoryentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.VersionEntry"
table="jbp_cms_versionentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
-</hibernate-mapping>
-
Modified:
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
===================================================================
---
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml 2007-05-01
13:29:46 UTC (rev 7162)
+++
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -27,7 +27,7 @@
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
- <property
name="connection.datasource">java:TestPortalDS</property>
+ <property
name="connection.datasource">java:PortalDS</property>
<property name="show_sql">false</property>
<property
name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
Modified: trunk/core-cms/build.xml
===================================================================
--- trunk/core-cms/build.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/core-cms/build.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -220,6 +220,14 @@
name="portal-cms-exploded.sar"
/>
</target>
+
+ <target name="explode-ha" depends="init">
+ <explode
+ file="${build.lib}/portal-cms-ha.sar"
+ todir="${build.lib}"
+ name="portal-cms-ha-exploded.sar"
+ />
+ </target>
<target name="artifacts"
description="Generate all target output."
@@ -378,7 +386,14 @@
<fileset dir="${build.lib}/portal-cms-exploded.sar"/>
</copy>
</target>
-
+
+ <target name="deploy-ha-explode" description="Deploy."
depends="output-ha,explode-ha">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <copy
todir="${jboss.home}/server/${portal-ha.deploy.dir}/jboss-portal-ha.sar/portal-cms-ha.sar"
overwrite="true">
+ <fileset dir="${build.lib}/portal-cms-ha-exploded.sar"/>
+ </copy>
+ </target>
+
<!--
| Undeploy the application
-->
Modified: trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-05-01
13:29:46 UTC (rev 7162)
+++ trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-05-01
15:54:32 UTC (rev 7163)
@@ -70,6 +70,7 @@
<attribute name="DefaultLocale">en</attribute>
<attribute
name="RepositoryName">PortalRepository</attribute>
<attribute
name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+ <attribute
name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
<attribute name="Config">
<Repository>
<!--
@@ -201,7 +202,7 @@
name="portal:service=HASingletonInvoker,type=CMS">
<depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
<attribute name="RetryWaitingTimeMS">2000</attribute>
- <attribute name="MaxRetries">5</attribute>
+ <attribute name="MaxRetries">1</attribute>
<attribute name="JNDIName">MyServiceInvokeTarget</attribute>
<attribute name="JNDIProperties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
@@ -531,123 +532,7 @@
<depends>portal:service=Hibernate,type=CMS</depends>
</mbean>
- <!-- logging interceptor -->
- <!--mbean
- code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Log"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean-->
-
- <!--
<mbean
- code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Cache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=CMSTreeCacheService</depends>
- </mbean>
- //this is not needed anymore. this cache is redundant since there is a JBossCache PM
- <mbean
- code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
- name="portal:service=CMSTreeCacheService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="Cache"
proxy-type="attribute">
- <mbean
- code="org.jboss.cache.TreeCache"
- name="portal:service=CMSTreeCache">
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
- <attribute
name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
- <attribute name="CacheMode">REPL_ASYNC</attribute>
- <attribute name="IsolationLevel">NONE</attribute>
- </mbean>
- </depends>
- <attribute
name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
- </mbean>
- -->
- <!--
- | Uncomment in clustered mode : TreeCache configuration for the clustered
JackRabbit in-memory cache...
- | This helps with node synching, but there are other aspects of JackRabbit like
versioning subsystem
- | and locking system that get out-of-sync in the cluster. This leads to
unpredicatable results and hence
- | the idea to cluster JackRabbit needs to be dropped at this time
- -->
- <!--mbean code="org.jboss.cache.TreeCache"
- name="jackrabbit.inmemory.cache:service=TreeCache">
-
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
-
- <attribute
name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
-
-
-
- <attribute name="IsolationLevel">NONE</attribute>
-
-
- <attribute
name="CacheMode">INVALIDATION_ASYNC</attribute>
-
-
- <attribute name="UseReplQueue">false</attribute>
-
-
- <attribute name="ReplQueueInterval">0</attribute>
-
-
- <attribute
name="ReplQueueMaxElements">0</attribute>
-
-
- <attribute
name="ClusterName">JackRabbitInternalCache</attribute>
-
-
-
- <attribute name="ClusterConfig">
- <config>
- <UDP mcast_addr="228.1.2.3"
mcast_port="48866"
- ip_ttl="64" ip_mcast="true"
- receive_on_all_interfaces="true"
- mcast_send_buf_size="150000"
mcast_recv_buf_size="80000"
- ucast_send_buf_size="150000"
ucast_recv_buf_size="80000"
- loopback="false"/>
- <PING timeout="2000"
num_initial_members="3"
- up_thread="false"
down_thread="false"/>
- <MERGE2 min_interval="10000"
max_interval="20000"/>
- <FD_SOCK/>
- <VERIFY_SUSPECT timeout="1500"
- up_thread="false"
down_thread="false"/>
- <pbcast.NAKACK gc_lag="50"
retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192" up_thread="false"
down_thread="false"/>
- <UNICAST timeout="600,1200,2400"
window_size="100" min_threshold="10"
- down_thread="false"/>
- <pbcast.STABLE desired_avg_gossip="20000"
- up_thread="false"
down_thread="false"/>
- <FRAG frag_size="8192"
- down_thread="false"
up_thread="false"/>
- <pbcast.GMS join_timeout="5000"
join_retry_timeout="2000"
- shun="true"
print_local_addr="true"/>
- <pbcast.STATE_TRANSFER up_thread="true"
down_thread="true"/>
- </config>
- </attribute>
-
- <attribute
name="FetchInMemoryState">false</attribute>
-
- <attribute
name="InitialStateRetrievalTimeout">20000</attribute>
-
- <attribute
name="SyncReplTimeout">20000</attribute>
-
- <attribute
name="LockAcquisitionTimeout">15000</attribute>
-
-
- <attribute
name="EvictionPolicyClass"></attribute>
-
- <attribute
name="UseRegionBasedMarshalling">false</attribute>
- </mbean-->
-
- <mbean
code="org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor"
name="portal:service=Interceptor,type=Server,name=CMSIdentityBinding"
xmbean-dd=""