You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by pr...@apache.org on 2007/12/04 18:04:51 UTC
svn commit: r601002 - in
/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat: pom.xml
src/main/boot/ src/main/boot/geronimo-datasource.xml
src/main/db-page-manager.xml src/main/interceptors.xml
src/main/request-context.xml
Author: prasad
Date: Tue Dec 4 09:04:51 2007
New Revision: 601002
URL: http://svn.apache.org/viewvc?rev=601002&view=rev
Log:
* adding a few xmls files for db population
Added:
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml (with props)
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml (with props)
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml (with props)
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml (with props)
Modified:
geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml
Modified: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml?rev=601002&r1=601001&r2=601002&view=diff
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml (original)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml Tue Dec 4 09:04:51 2007
@@ -93,6 +93,24 @@
<include>j2-seed.xml</include>
</includes>
</resource>
+ <resource>
+ <directory>${pom.basedir}/src/main/boot</directory>
+ <targetPath>WEB-INF/assembly/boot</targetPath>
+ <filtering>true</filtering>
+ <includes>
+ <include>geronimo-datasource.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${pom.basedir}/src/main</directory>
+ <targetPath>WEB-INF/assembly</targetPath>
+ <filtering>true</filtering>
+ <includes>
+ <include>db-page-manager.xml</include>
+ <include>interceptors.xml</include>
+ <include>request-context.xml</include>
+ </includes>
+ </resource>
</resources>
<plugins>
<plugin>
@@ -123,7 +141,6 @@
</commonInstance>
</configuration>
</plugin>
- <!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -144,11 +161,19 @@
<outputDirectory>${project.build.outputDirectory}/WEB-INF/deploy</outputDirectory>
</artifactItem>
</artifactItems>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>j2-admin</artifactId>
+ <version>${jetspeedVersion}</version>
+ <type>war</type>
+ <outputDirectory>${project.build.outputDirectory}/WEB-INF/deploy</outputDirectory>
+ </artifactItem>
+ </artifactItems>
</configuration>
</execution>
</executions>
</plugin>
- -->
</plugins>
</build>
Added: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml?rev=601002&view=auto
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml (added)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml Tue Dec 4 09:04:51 2007
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ Prasad Kashyap
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+ <!--
+ Simply use the JNDI data source provided via Spring
+ -->
+ <!--
+ <bean id="JetspeedDS" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <property name="resourceRef"><value>false</value></property>
+ <property name="jndiName">
+ <value>java:comp/env/jdbc/jetspeed</value>
+ </property>
+ </bean>
+ -->
+
+ <bean id="ojbConfigurer" class="org.springframework.orm.ojb.support.LocalOjbConfigurer"/>
+
+ <!--
+ Dynamically configures Database Platform for OJB by looking at the connection string
+ and figuring out the OJB platform using an OJB metadata utility
+ Its important to get this right otherwise you will be sending the wrong (most likely HSQL)
+ flavor of SQL statements to the backend database.
+ -->
+ <bean id="PlatformConfigurator"
+ class="org.apache.jetspeed.components.rdbms.ojb.DatabasePlatformConfigurator"
+ init-method="init"
+ >
+ <constructor-arg index='0'>
+ <ref bean="JetspeedDS"/>
+ </constructor-arg>
+ <!-- JNDI Name -->
+ <constructor-arg index='1'>
+ <value>JetspeedDS</value>
+ </constructor-arg>
+ </bean>
+
+ <!--
+ Creates a JNDI-based datasource bean name "JetspeedDS". The information
+ provided here is merged with the basic configuration for the
+ jdbc-connection-descriptor with the matching jcd-alias property
+ ("JetspeedDS") located under /etc/db-ojb/repository_database.xml in the
+ source tree.
+
+ Another requirement for this to work is to have the
+ ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
+ or to have
+ ConnectionManagerClass=org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl.
+ (either will do, both are recommended, see comments in configuration file).
+ These properties are located in /etc/db-ojb/OJB.properties in the source tree.
+
+ FYI: The two OJB configuration files mentioned above are currently already setup this way
+ in the default Jetspeed implementation.
+
+ However, if you need to locate/modify these files in a running instance of jetspeed,
+ they will be located under /WEB-INF/classes.
+ -->
+ <!--
+ <bean id="JetspeedDS" class="org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry">
+ <property name="jndiName">
+ <value>java:comp/env/jdbc/jetspeed</value>
+ </property>
+ </bean>
+ -->
+
+ <!-- If would like use a commons DBCP Pooled datasource as opposed to the default
+ JNDI one above you can uncomment the configuration below and fill in
+ the datasource information as it relates to your environment.
+
+ A requirement for this to work is to have the
+ ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
+ or to have
+ ConnectionManagerClass=org.apache.jetspeed.components.rdbms.ojb.ConnectionManagerImpl
+ This property is located in /etc/db-ojb/OJB.properties in the source tree.
+ -->
+
+ <bean id="JetspeedDS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" >
+ <property name="driverClassName"><value>org.apache.derby.jdbc.EmbeddedDriver</value></property>
+ <property name="url"><value>jdbc:derby:JetspeedDB</value></property>
+ <property name="username"><value></value></property>
+ <property name="password"><value></value></property>
+ </bean>
+</beans>
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/boot/geronimo-datasource.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml?rev=601002&view=auto
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml (added)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml Tue Dec 4 09:04:51 2007
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+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.
+-->
+<beans>
+
+ <!-- DB PageManager -->
+ <bean id="org.apache.jetspeed.page.PageManagerImpl"
+ name="pageManagerImpl"
+ init-method="init"
+ class="org.apache.jetspeed.page.impl.DatabasePageManager">
+ <!-- OJB configuration file resource path -->
+ <constructor-arg index="0"><value>JETSPEED-INF/ojb/page-manager-repository.xml</value></constructor-arg>
+ <!-- folder/page/link cache size, default=128, min=128 -->
+ <constructor-arg index="1"><value>128</value></constructor-arg>
+ <!-- folder/page/link cache expires seconds, default=-1, infinite=0, min=30 -->
+ <!-- (default is 150 seconds) -->
+ <constructor-arg index="2"><value>-1</value></constructor-arg>
+ <!-- permissions security enabled flag, default=false -->
+ <constructor-arg index="3"><value>false</value></constructor-arg>
+ <!-- constraints security enabled flag, default=true -->
+ <constructor-arg index="4"><value>true</value></constructor-arg>
+ </bean>
+
+ <!-- Transaction Proxying -->
+ <bean id="org.apache.jetspeed.page.PageManager" name="pageManager" parent="PageManagerTransactionProxy">
+ <property name="proxyInterfaces">
+ <value>org.apache.jetspeed.page.PageManager</value>
+ </property>
+ <property name="target">
+ <ref bean="pageManagerImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="getPage*">PROPAGATION_SUPPORTS</prop>
+ <prop key="getLink*">PROPAGATION_SUPPORTS</prop>
+ <prop key="getFolder*">PROPAGATION_SUPPORTS</prop>
+ <prop key="getContentPage">PROPAGATION_SUPPORTS</prop>
+ <prop key="getAll">PROPAGATION_SUPPORTS</prop>
+ <prop key="getUserFolder">PROPAGATION_SUPPORTS</prop>
+ <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="removePage">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="removeFolder">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="removeLink">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="removePageSecurity">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="createUserHomePagesFromRoles">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="deepCopy*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="addPages">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+ <prop key="folderExists">PROPAGATION_SUPPORTS</prop>
+ <prop key="pageExists">PROPAGATION_SUPPORTS</prop>
+ <prop key="linkExists">PROPAGATION_SUPPORTS</prop>
+ <prop key="userFolderExists">PROPAGATION_SUPPORTS</prop>
+ <prop key="userPageExists">PROPAGATION_SUPPORTS</prop>
+ </props>
+ </property>
+ </bean>
+
+ <!-- Inject Page Manager Proxy into Page Manager -->
+ <bean id="injectPageManagerProxy" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject"><ref bean="pageManagerImpl"/></property>
+ <property name="targetMethod"><value>setPageManagerProxy</value></property>
+ <property name="arguments">
+ <list>
+ <ref bean="pageManager"/>
+ </list>
+ </property>
+ </bean>
+
+ <!-- PortalSite -->
+ <bean id="org.apache.jetspeed.portalsite.PortalSite"
+ name="portalSite"
+ class="org.apache.jetspeed.portalsite.impl.PortalSiteImpl">
+ <constructor-arg index="0"><ref bean="pageManager"/></constructor-arg>
+ </bean>
+
+</beans>
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/db-page-manager.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml?rev=601002&view=auto
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml (added)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml Tue Dec 4 09:04:51 2007
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+ Database PSML Manager Interception for handling Cache Rollback
+ We also have examples here of replay interception for failover to
+ a second database on update failures
+ -->
+<beans>
+
+ <bean id="pageManagerInterceptor" class="org.apache.jetspeed.util.interceptors.PageManagerInterceptor">
+ </bean>
+
+
+ <bean id="PageManagerTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
+ abstract="true">
+ <property name="transactionManager"><ref bean="transactionManager"/></property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ <property name="preInterceptors">
+ <list>
+ <ref local="pageManagerInterceptor" />
+ </list>
+ </property>
+ </bean>
+
+ <!--
+ Replay support:
+
+ <bean id="replayTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
+ abstract="true">
+ <property name="transactionManager"><ref bean="transactionManager"/></property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ <property name="preInterceptors">
+ <list>
+ <ref local="methodReplayInterceptor" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="replayDecisionMakerBean"
+ class="org.apache.jetspeed.util.interceptors.TransactionalMethodReplayDecisionMaker">
+ <property name="sqlErrorCodes">
+ <value>9999, 400, -80</value>
+ <value>9999</value>
+ </property>
+ </bean>
+
+ <bean id="methodReplayInterceptor" class="org.apache.jetspeed.util.interceptors.MethodReplayInterceptor">
+ <property name="retryCount">
+ <value>3</value>
+ </property>
+ <property name="retryInterval">
+ <value>500</value></property> retry every 500 milliseconds
+ <property name="replayDecisionMaker">
+ <ref bean="replayDecisionMakerBean"/>
+ </property>
+ </bean>
+ -->
+
+</beans>
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/interceptors.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml?rev=601002&view=auto
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml (added)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml Tue Dec 4 09:04:51 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+ 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.
+-->
+<beans>
+
+ <!-- Request Context -->
+ <bean id="org.apache.jetspeed.request.RequestContextComponent" class="org.apache.jetspeed.request.JetspeedRequestContextComponent">
+ <constructor-arg>
+ <value>org.apache.jetspeed.request.JetspeedRequestContext</value>
+ </constructor-arg>
+ <constructor-arg>
+ <ref bean="org.apache.jetspeed.userinfo.UserInfoManager" />
+ </constructor-arg>
+ </bean>
+ <!-- Single Source User Info -->
+ <bean id="org.apache.jetspeed.userinfo.UserInfoManager"
+ class="org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl"
+ >
+ <constructor-arg index="0"><ref bean="org.apache.jetspeed.security.UserManager"/></constructor-arg>
+ <constructor-arg index="1"><ref bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/></constructor-arg>
+ </bean>
+
+
+</beans>
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/src/main/request-context.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml