portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r545528 - in /portals/jetspeed-2/trunk/installer: ./ etc/ant-installer/ etc/database/ etc/database/import/ etc/database/import/assembly/
Date Fri, 08 Jun 2007 14:59:35 GMT
Author: ate
Date: Fri Jun  8 07:59:32 2007
New Revision: 545528

URL: http://svn.apache.org/viewvc?view=rev&rev=545528
Log:
Fix for JS2-723: Option to configure DB PSML from the installer
See: http://issues.apache.org/jira/browse/JS2-723

This works like a charm and it is now dead simple to install Jetspeed using DB PSML (just
an optional checkbox setting in the installer dialog)

Contributed by Dennis Dam, thanks!

Added:
    portals/jetspeed-2/trunk/installer/etc/database/import/
    portals/jetspeed-2/trunk/installer/etc/database/import/assembly/
    portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
  (with props)
    portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
  (with props)
    portals/jetspeed-2/trunk/installer/etc/database/import/import.properties   (with props)
    portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties   (with props)
Modified:
    portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml
    portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml
    portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml
    portals/jetspeed-2/trunk/installer/etc/database/build.xml
    portals/jetspeed-2/trunk/installer/etc/database/database.properties.template
    portals/jetspeed-2/trunk/installer/maven.xml

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml Fri Jun
 8 07:59:32 2007
@@ -50,6 +50,7 @@
     <checkbox displayText="Demo Portlets" property="dummy" defaultValue="true" force="true"
/>
     <checkbox displayText="JPetstore Demo Portlet" property="dummy" defaultValue="true"
force="true" />
     <checkbox displayText="JSF Demo Portlets" property="dummy" defaultValue="true" force="true"
/>
+    <checkbox displayText="Store PSML in the database?" property="dbImportPsml" defaultValue="false"
/>
   </page>
 
   <page type="input" name="databaseSelection" displayText="Database selection">

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml Fri Jun  8
07:59:32 2007
@@ -48,6 +48,7 @@
     <checkbox displayText="Jetspeed Portal" property="dummy" defaultValue="true" force="true"
/>
     <checkbox displayText="Layout Portlets" property="dummy" defaultValue="true" force="true"
/>
     <checkbox displayText="Portal Administration Portlets" property="dummy" defaultValue="true"
force="true" />
+    <checkbox displayText="Store PSML in the database?" property="dbImportPsml" defaultValue="false"
/>
   </page>
 
   <page type="input" name="databaseSelection" displayText="Database selection">

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml Fri Jun  8 07:59:32 2007
@@ -55,6 +55,7 @@
     <condition property="jdbcjar" value="${installDir}/database/lib/derby-10.1.1.0.jar">
       <equals arg1="${jdbc.driver.jar}" arg2="" />
     </condition>
+    <copy file="${installDir}/webapps/jetspeed/WEB-INF/assembly/page-manager.xml" tofile="${installDir}/webapps/jetspeed/WEB-INF/assembly/alternate/fs-page-manager.xml"/>
     <property name="jdbcjar" value="${jdbc.driver.jar}" />
     <copy failonerror="false" todir="${installDir}/shared/lib" file="${jdbcjar}" />
 
@@ -66,6 +67,7 @@
         <filter token="db.password" value="${db.password}" />
         <filter token="jdbc.url" value="${jdbc.url}" />
         <filter token="jdbc.driver.class" value="${jdbc.driver.class}" />
+        <filter token="dbImportPsml" value="${dbImportPsml}" />
       </filterset>
     </move>
     <echo>Setting up the Jetspeed database (if selected)</echo>

Modified: portals/jetspeed-2/trunk/installer/etc/database/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/build.xml?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/build.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/database/build.xml Fri Jun  8 07:59:32 2007
@@ -71,7 +71,7 @@
   </target>
   
   <target name="runSetupDB" 
-    depends="checkDerby,generateStandardDB,generateDerbyDB,seedDB,copyJetspeedContext" />
+    depends="checkDerby,generateStandardDB,generateDerbyDB,seedDB,copyJetspeedContext,do-psml"
/>
 
   <target name="checkDerby">
     <condition property="_derby">
@@ -269,6 +269,100 @@
         <filter token="URL" value="${_jdbc.url}" />
       </filterset>
     </copy>
+  </target>
+
+<!-- Import of PSML -->
+  <property name="import.jdbc.driver.class" value="${_jdbc.driver.class}"/>
+  <property name="import.jdbc.username" value="${_db.username}"/>
+  <property name="import.jdbc.password" value="${_db.password}"/>
+  <property name="import.jdbc.url" value="${_jdbc.url}"/>
+  
+  <property name="jetspeedWebinfDir" value="${basedir}/../webapps/jetspeed/WEB-INF"/>
+  <property name="pagesLocation" value="${jetspeedWebinfDir}/pages"/>
+  <property name="importDir" value="${basedir}/import"/>
+  <property name="importTargetDir" value="${importDir}/target"/>
+  <property name="org.apache.jetspeed.page.import.configuration" value="${basedir}/import/import.properties"/>
+  <property name="org.apache.jetspeed.page.import.pages" value="${jetspeedWebinfDir}/pages"/>
+  
+  <path id="import-classpath">
+    <fileset dir="${basedir}/../shared/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${jetspeedWebinfDir}/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/../common/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <pathelement location="${basedir}/../shared/classes" />
+    <pathelement location="${jetspeedWebinfDir}/classes" />
+    <pathelement location="${importTargetDir}/classes" />
+  </path>
+  
+ 
+  <!-- Populate Database -->
+  
+  <target name="test-import-psml">
+    <condition property="_doImportPsml">
+      <equals arg1="${dbImportPsml}" arg2="true"/>
+    </condition>
+  </target>
+  
+  <target name="do-psml" depends="test-import-psml,db-psml,fs-psml"/>
+  
+  <target name="fs-psml" unless="_doImportPsml">
+    <copy file="${jetspeedWebinfDir}/assembly/alternate/fs-page-manager.xml" tofile="${jetspeedWebinfDir}/assembly/page-manager.xml"
overwrite="true"/>
+    <delete quiet="true" file="${jetspeedWebinfDir}/assembly/interceptors.xml"/>
+  </target>
+  
+  <target name="db-psml" if="_doImportPsml">
+    
+    <!-- prepare a classes directory with resources and libraries to execute import -->
+    <delete dir="${importTargetDir}/classes"/>
+    <mkdir dir="${importTargetDir}/classes"/>
+    <echo>Import dir: ${importDir}</echo>
+    <copy todir="${importTargetDir}/classes" flatten="on">
+      <fileset dir="${importDir}" >
+        <include name="db-ojb/*"/>
+        <include name="log4j.properties"/>
+        <include name="assembly/import-page-manager.xml"/>
+        <include name="assembly/repository-datasource-spring.xml"/>
+      </fileset>
+      <fileset dir="${jetspeedWebinfDir}" >
+        <include name="assembly/transaction.xml"/>
+        <include name="assembly/alternate/interceptors.xml"/>
+      </fileset>
+    </copy>    
+  
+    <!-- create sysproperty set to configure import utility -->
+    <propertyset id="import.syspropertyset.id">
+      <propertyref name="org.apache.jetspeed.page.import.configuration"/>
+      <propertyref name="org.apache.jetspeed.page.import.pages"/>
+      <propertyref name="import.jdbc.driver.class"/>
+      <propertyref name="import.jdbc.username"/>
+      <propertyref name="import.jdbc.password"/>
+      <propertyref name="import.jdbc.url"/>
+    </propertyset>
+    
+    <!-- execute import utility within the page manager component -->
+    <antcall target="execute-import" inheritall="on" inheritrefs="on"/>
+    
+    <copy file="${jetspeedWebinfDir}/assembly/alternate/db-page-manager.xml" tofile="${jetspeedWebinfDir}/assembly/page-manager.xml"
overwrite="true"/>
+    <copy file="${jetspeedWebinfDir}/assembly/alternate/interceptors.xml" todir="${jetspeedWebinfDir}/assembly"
overwrite="true"/>
+  </target>
+  
+  <target name="execute-import">
+    
+    <!-- execute import utility with drivers path in classpath -->
+    <java classpathref="import-classpath" classname="org.apache.jetspeed.page.PageImporter"
fork="yes" dir="${basedir}">
+      <syspropertyset>
+        <propertyset refid="import.syspropertyset.id"/>
+      </syspropertyset>
+    </java>
+    
   </target>
 
 </project>

Modified: portals/jetspeed-2/trunk/installer/etc/database/database.properties.template
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/database.properties.template?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/database.properties.template (original)
+++ portals/jetspeed-2/trunk/installer/etc/database/database.properties.template Fri Jun 
8 07:59:32 2007
@@ -1,9 +1,13 @@
-; Jetspeed Enterprise Portal 2.1 Database setup configuration
+; Jetspeed Enterprise Portal 2.1.1 Database setup configuration
 
 ; db.type supported values: db2, derby, mssql, mysql, oracle, postgres, sapdb
 db.type=@db.type@
+
 : for db.type other than derby, the properties below need to be specified
 db.username=@db.username@
 db.password=@db.password@
 jdbc.url=@jdbc.url@
 jdbc.driver.class=@jdbc.driver.class@
+
+; boolean flag (true/false) indicating if psml is to be imported in the database or will
be read from file system
+dbImportPsml = @dbImportPsml@

Added: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml?view=auto&rev=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
(added)
+++ portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
Fri Jun  8 07:59:32 2007
@@ -0,0 +1,189 @@
+<?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>
+
+  <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=150, infinite=0, min=30 -->
+      <constructor-arg index="2"><value>0</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>false</value></constructor-arg>
+  </bean>
+
+    <!-- Proxying -->
+    <bean id="org.apache.jetspeed.page.PageManager" name="dbPageManager" 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="dbPageManager"/>
+            </list>
+        </property>
+    </bean>
+
+  <!-- PageManager -->
+  <bean id="PsmlDocumentHandler"      
+       class="org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler" >
        
+       <constructor-arg index="0"><value>/JETSPEED-INF/castor/page-mapping.xml</value></constructor-arg>
+       <constructor-arg index="1"><value>.psml</value></constructor-arg>
+       <constructor-arg index="2" ><value>org.apache.jetspeed.om.page.psml.PageImpl</value></constructor-arg>
      
+       <constructor-arg index="3" ><value>${org.apache.jetspeed.page.import.pages}</value></constructor-arg>
+       <constructor-arg index="4" ><ref bean="PageFileCache"/></constructor-arg>
+  </bean>
+  
+  <bean id="LinkDocumentHandler"       
+       class="org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler" >
        
+       <constructor-arg index="0"><value>/JETSPEED-INF/castor/page-mapping.xml</value></constructor-arg>
+       <constructor-arg index="1"><value>.link</value></constructor-arg>
+       <constructor-arg index="2" ><value>org.apache.jetspeed.om.page.psml.LinkImpl</value></constructor-arg>
      
+       <constructor-arg index="3" ><value>${org.apache.jetspeed.page.import.pages}</value></constructor-arg>
+       <constructor-arg index="4" ><ref bean="PageFileCache"/></constructor-arg>
+  </bean>
+  
+  <bean id="FolderMetaDataDocumentHandler"         
+       class="org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler" >
        
+       <constructor-arg index="0"><value>/JETSPEED-INF/castor/page-mapping.xml</value></constructor-arg>
+       <constructor-arg index="1"><value>folder.metadata</value></constructor-arg>
+       <constructor-arg index="2" ><value>org.apache.jetspeed.om.folder.psml.FolderMetaDataImpl</value></constructor-arg>
      
+       <constructor-arg index="3" ><value>${org.apache.jetspeed.page.import.pages}</value></constructor-arg>
+       <constructor-arg index="4" ><ref bean="PageFileCache"/></constructor-arg>
+  </bean>
+  
+  <bean id="PageSecurityDocumentHandler"       
+       class="org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler" >
        
+       <constructor-arg index="0"><value>/JETSPEED-INF/castor/page-mapping.xml</value></constructor-arg>
+       <constructor-arg index="1"><value>page.security</value></constructor-arg>
+       <constructor-arg index="2" ><value>org.apache.jetspeed.om.page.psml.PageSecurityImpl</value></constructor-arg>
      
+       <constructor-arg index="3" ><value>${org.apache.jetspeed.page.import.pages}</value></constructor-arg>
+       <constructor-arg index="4" ><ref bean="PageFileCache"/></constructor-arg>
+  </bean>
+  
+  <bean id="DocumentHandlerFactory"        
+       class="org.apache.jetspeed.page.document.psml.DocumentHandlerFactoryImpl" >   
  
+        <constructor-arg>
+        <map>
+          <entry key=".psml">
+            <ref bean="PsmlDocumentHandler" />
+          </entry>
+          <entry key=".link">
+            <ref bean="LinkDocumentHandler" />
+          </entry>  
+          <entry key="folder.metadata">
+            <ref bean="FolderMetaDataDocumentHandler" />
+          </entry>        
+          <entry key="page.security">
+            <ref bean="PageSecurityDocumentHandler" />
+          </entry>        
+        </map>
+       </constructor-arg>
+  </bean>
+  
+  <bean id="FolderHandler"         
+       class="org.apache.jetspeed.page.document.psml.FileSystemFolderHandler" >      
  
+       <constructor-arg index="0"><value>${org.apache.jetspeed.page.import.pages}</value></constructor-arg>
+       <constructor-arg index="1"><ref bean="DocumentHandlerFactory"/></constructor-arg>
+       <constructor-arg index="2"><ref bean="PageFileCache"/></constructor-arg>
       
+  </bean>
+    
+  <bean id="org.apache.jetspeed.page.CastorPageManager" 
+       name="castorPageManager"
+       class="org.apache.jetspeed.page.psml.CastorXmlPageManager">         
+       <constructor-arg index="0"><ref bean="IdGenerator"/></constructor-arg>
+       <constructor-arg index="1"><ref bean="DocumentHandlerFactory"/></constructor-arg>
+       <constructor-arg index="2"><ref bean="FolderHandler"/></constructor-arg>
+       <constructor-arg index="3"><ref bean="PageFileCache"/></constructor-arg>
       
+       <!-- permissions security enabled flag, default=false -->
+       <constructor-arg index="4"><value>false</value></constructor-arg>
+       <!-- constraints security enabled flag, default=true -->
+       <constructor-arg index="5"><value>false</value></constructor-arg>
+  </bean>
+
+    <!-- Page File Cache -->
+    <bean id="PageFileCache" class="org.apache.jetspeed.cache.file.FileCache" init-method="startFileScanner"
destroy-method="stopFileScanner">
+        <!-- Scan rate for changes in cached files on the file system -->
+        <constructor-arg index="0">
+            <value>10</value>
+        </constructor-arg>
+        <!-- Cache size -->
+        <constructor-arg index="1">
+            <value>100</value>
+        </constructor-arg>
+    </bean>
+
+    <bean id="IdGenerator" class="org.apache.jetspeed.idgenerator.JetspeedIdGenerator"
init-method="start" destroy-method="stop">
+        <!-- ID Start value -->
+        <constructor-arg index="0">
+            <value>65536</value>
+        </constructor-arg>
+        <!-- ID Prefix -->
+        <constructor-arg index="1">
+            <value>P-</value>
+        </constructor-arg>
+        <!-- ID Suffix -->
+        <constructor-arg index="2">
+            <value></value>
+        </constructor-arg>
+    </bean>
+
+
+    <!-- properties configurer used to pick up system properties -->
+    <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+</beans>

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/import-page-manager.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml?view=auto&rev=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
(added)
+++ portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
Fri Jun  8 07:59:32 2007
@@ -0,0 +1,62 @@
+<?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">
+<beans>		
+  
+  <!-- datasource bean -->
+  <!--  <bean id="JetspeedDS" class="org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry">
-->
+  <bean id="JetspeedDS" class="org.apache.commons.dbcp.BasicDataSource">     
+    <property name="driverClassName">
+      <value>${import.jdbc.driver.class}</value>
+    </property>
+    <property name="url">
+      <value>${import.jdbc.url}</value>
+    </property>
+    <property name="username">
+      <value>${import.jdbc.username}</value>
+    </property>
+    <property name="password">
+      <value>${import.jdbc.password}</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>
+  
+  <!-- properties configurer used to pick up system properties -->
+  <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+  
+</beans>

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/assembly/repository-datasource-spring.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/trunk/installer/etc/database/import/import.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/import/import.properties?view=auto&rev=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/import/import.properties (added)
+++ portals/jetspeed-2/trunk/installer/etc/database/import/import.properties Fri Jun  8 07:59:32
2007
@@ -0,0 +1,16 @@
+# comma-separated list of boot assemblies for Spring
+boot.assemblies =  repository-datasource-spring.xml
+# comma-separated list of assemblies for Spring
+assemblies = import-page-manager.xml, transaction.xml, interceptors.xml
+# root folder to start exporting from
+root.folder = /
+# overwrite folders flag, set to true to replace existing folders
+overwrite.folders = true
+# overwrite pages flag, set to true to replace existing pages 
+overwrite.pages = true
+# if this flag is true, will also try to import page.security 
+full.import = true
+# source page manager Spring component name
+source.page.manager = castorPageManager
+# destination page manager Spring component name
+dest.page.manager = dbPageManager

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/import.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/import.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties?view=auto&rev=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties (added)
+++ portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties Fri Jun  8 07:59:32
2007
@@ -0,0 +1,34 @@
+# 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.
+
+# ------------------------------------------------------------------------
+#
+# Logging Configuration
+#
+# $Id$
+#
+# ------------------------------------------------------------------------
+
+log4j.rootLogger = WARN, console
+
+#
+# Console
+#
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+
+# Pattern to output the caller's file name and line number.
+log4j.appender.console.layout.ConversionPattern=%5p: %m%n
+

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/trunk/installer/etc/database/import/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/trunk/installer/maven.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/maven.xml?view=diff&rev=545528&r1=545527&r2=545528
==============================================================================
--- portals/jetspeed-2/trunk/installer/maven.xml (original)
+++ portals/jetspeed-2/trunk/installer/maven.xml Fri Jun  8 07:59:32 2007
@@ -112,7 +112,10 @@
     <copy todir="${maven.build.dir}/database/postgres">
       <fileset dir="${maven.build.dir}/portal-sql/postgres/schema" excludes="*.generation,*.map"
/>
     </copy>
-
+    <copy todir="${maven.build.dir}/database/import/db-ojb" overwrite="true">
+      <fileset dir="${basedir}/../etc/db-ojb" />
+    </copy>
+    
     <filter token="CONTEXT" value="jetspeed" />
     <copy file="${basedir}/../etc/conf/tomcat/jetspeed-tomcat-5.5.xml" tofile="${maven.build.dir}/database/jetspeed.xml"
       filtering="true" />



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


Mime
View raw message