portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r449718 - in /portals/jetspeed-2/trunk/components/serializer/test: ./ assembly/ assembly/boot/ assembly/boot/datasource.xml assembly/capabilities.xml assembly/transaction.xml
Date Mon, 25 Sep 2006 16:16:08 GMT
Author: taylor
Date: Mon Sep 25 09:16:07 2006
New Revision: 449718

URL: http://svn.apache.org/viewvc?view=rev&rev=449718
Log:
test data
finally continuing work on this issue
checking in as a checkpoint

Added:
    portals/jetspeed-2/trunk/components/serializer/test/
    portals/jetspeed-2/trunk/components/serializer/test/assembly/
    portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/
    portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/datasource.xml
    portals/jetspeed-2/trunk/components/serializer/test/assembly/capabilities.xml
    portals/jetspeed-2/trunk/components/serializer/test/assembly/transaction.xml

Added: portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/datasource.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/datasource.xml?view=auto&rev=449718
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/datasource.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/test/assembly/boot/datasource.xml Mon Sep
25 09:16:07 2006
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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>com.mysql.jdbc.Driver</value></property>
+                <property name="url"><value>jdbc:mysql://localhost/j2</value></property>
+                <property name="username"><value>j2</value></property>
+                <property name="password"><value>digital</value></property>
+        </bean>    
+
+</beans>

Added: portals/jetspeed-2/trunk/components/serializer/test/assembly/capabilities.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/test/assembly/capabilities.xml?view=auto&rev=449718
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/test/assembly/capabilities.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/test/assembly/capabilities.xml Mon Sep
25 09:16:07 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+    Copyright 2004 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans>
+
+    <!-- Capabilities DAO-->
+    <bean id="capabilitiesImpl" class="org.apache.jetspeed.capabilities.impl.JetspeedCapabilities"
init-method="init">
+        <constructor-arg>
+            <value>JETSPEED-INF/ojb/capabilities_repository.xml</value>
+        </constructor-arg>
+    </bean>
+
+    <!-- Capabilities -->
+    <bean id="org.apache.jetspeed.capabilities.Capabilities" name="capabilities" parent="baseTransactionProxy">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.capabilities.Capabilities</value>
+        </property>
+        <property name="target">
+            <ref bean="capabilitiesImpl" />
+        </property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

Added: portals/jetspeed-2/trunk/components/serializer/test/assembly/transaction.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/test/assembly/transaction.xml?view=auto&rev=449718
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/test/assembly/transaction.xml (added)
+++ portals/jetspeed-2/trunk/components/serializer/test/assembly/transaction.xml Mon Sep 25
09:16:07 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<!--
+  - Application context definition for PortletRegistry using Apache OJB.
+	-->
+<beans>
+  
+	<!-- Transaction manager for a single OJB PersistenceBroker (alternative to JTA) -->
+	<bean id="transactionManager" class="org.springframework.orm.ojb.PersistenceBrokerTransactionManager"/>
+
+	<!-- Transaction manager that delegates to JTA (for a transactional JNDI DataSource)
-->
+	<!--
+	<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
+	-->
+
+	<!--
+		- A parent bean definition which is a base definition for transaction proxies.
+		- It is markes as abstract, since it is never supposed to be instantiated itself.
+		- We set shared transaction attributes here, following our naming patterns.
+		- The attributes can still be overridden in child bean definitions.
+		-->
+	<bean id="baseTransactionProxy" 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>
+	</bean>
+	
+</beans>
\ No newline at end of file



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


Mime
View raw message