incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r414357 - in /incubator/graffito/trunk/jcr/spring/src/spring-config: ./ applicationContext-jr-jca.xml applicationContext-jr-local.xml applicationContext-repository.xml
Date Wed, 14 Jun 2006 19:09:52 GMT
Author: clombart
Date: Wed Jun 14 12:09:51 2006
New Revision: 414357

URL: http://svn.apache.org/viewvc?rev=414357&view=rev
Log:
Review OCM/JCR support

Added:
    incubator/graffito/trunk/jcr/spring/src/spring-config/
    incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml  
(with props)
    incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml
  (with props)
    incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml
  (contents, props changed)
      - copied, changed from r408764, incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml

Added: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml?rev=414357&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml (added)
+++ incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml Wed
Jun 14 12:09:51 2006
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
+    "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+	JCA configuration only for JackRabbit. This examples uses Jenks.
+	    
+    $Id: applicationContext-jr-jca.xml,v 1.1 2005/10/10 09:20:43 costin Exp $
+    -->    
+<beans>
+	
+	<!-- Transaction manager configuration for Jenks -->
+	
+	<bean id="connectionTracker"
+		class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator"/>
+	
+	<bean id="transactionManagerImpl"
+		class="org.jencks.factory.TransactionManagerFactoryBean">
+		<property name="defaultTransactionTimeoutSeconds">
+			<value>600</value>
+		</property>
+		<property name="transactionLog">
+			<bean class="org.apache.geronimo.transaction.log.UnrecoverableLog"/>
+		</property>
+	</bean>
+	
+	<bean id="transactionContextManager"
+		class="org.jencks.factory.TransactionContextManagerFactoryBean">
+		<property name="transactionManager">
+			<ref local="transactionManagerImpl"/>
+		</property>
+	</bean>
+	
+	<bean id="userTransaction"
+		class="org.jencks.factory.UserTransactionFactoryBean">
+		<property name="transactionContextManager">
+			<ref local="transactionContextManager"/>
+		</property>
+		<property name="connectionTrackingCoordinator">
+			<ref local="connectionTracker"/>
+		</property>
+	</bean>
+	
+	<bean id="transactionContextInitializer"
+		class="org.jencks.interceptor.TransactionContextInitializer">
+		<property name="associator">
+			<ref local="connectionTracker"/>
+		</property>
+	</bean>
+	
+	<!-- JCA configuration -->
+	<bean id="transactionSupport"
+		class="org.jencks.factory.XATransactionFactoryBean">
+		<property name="useTransactionCaching">
+			<value>true</value>
+		</property>
+		<property name="useThreadCaching">
+			<value>false</value>
+		</property>
+	</bean>
+
+	<bean id="poolingSupport" class="org.jencks.factory.SinglePoolFactoryBean">
+		<property name="maxSize">
+			<value>2</value>
+		</property>
+		<property name="minSize">
+			<value>1</value>
+		</property>
+		<property name="blockingTimeoutMilliseconds">
+			<value>60</value>
+		</property>
+		<property name="idleTimeoutMinutes">
+			<value>60</value>
+		</property>
+		<property name="matchOne">
+			<value>true</value>
+		</property>
+		<property name="matchAll">
+			<value>true</value>
+		</property>
+		<property name="selectOneAssumeMatch">
+			<value>true</value>
+		</property>
+	</bean>
+
+	<bean id="connectionManager"
+		class="org.jencks.factory.ConnectionManagerFactoryBean">
+		<property name="transactionSupport">
+			<ref local="transactionSupport"/>
+		</property>
+		<property name="poolingSupport">
+			<ref local="poolingSupport"/>
+		</property>
+		<property name="transactionContextManager">
+			<ref local="transactionContextManager"/>
+		</property>
+		<property name="connectionTracker">
+			<ref local="connectionTracker"/>
+		</property>
+	</bean>
+	
+	<!-- JackRabbit JCA specific configuration -->	
+	<bean id="repositoryManagedConnectionFactory"
+		class="org.apache.jackrabbit.jca.JCAManagedConnectionFactory">
+		<property name="homeDir">
+			<value>./xa-rep</value>
+		</property>
+		<property name="configFile">
+			<value>src/test-config/repository-xml.xml</value>
+		</property>
+	</bean>
+
+	<!-- common properties -->
+	
+	<bean id="jcrTransactionManager"
+		class="org.springframework.transaction.jta.JtaTransactionManager">
+		<property name="userTransaction">
+			<ref local="userTransaction"/>
+		</property>
+		<property name="transactionManager">
+			<ref local="transactionManagerImpl"/>
+		</property>
+	</bean>
+
+    <bean id="repository" class="org.springframework.jca.support.LocalConnectionFactoryBean">
+        <property name="managedConnectionFactory"><ref local="repositoryManagedConnectionFactory"/></property>
+        <property name="connectionManager"><ref local="connectionManager"/></property>
+    </bean>
+	
+	
+</beans>
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-jca.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml?rev=414357&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml
(added)
+++ incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml
Wed Jun 14 12:09:51 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
+    "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+	Local transaction manager only for JackRabbit
+	    
+    $Id: applicationContext-jr-local.xml,v 1.1 2005/10/10 09:20:42 costin Exp $
+    -->    
+<beans>
+	<bean id="jcrTransactionManager"
+		class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
+		<property name="sessionFactory" ref="jcrSessionFactory"/>
+	</bean>
+	
+	<bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
+		<!-- normal factory beans params -->
+		<property name="configuration" value="src/test-config/repository-xml.xml"/>
+		<property name="homeDir" value="target/repository"/>
+	</bean>
+</beans>
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-jr-local.xml
------------------------------------------------------------------------------
    svn:executable = *

Copied: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml
(from r408764, incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml)
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml?p2=incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml&p1=incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml&r1=408764&r2=414357&rev=414357&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml (original)
+++ incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml
Wed Jun 14 12:09:51 2006
@@ -8,54 +8,39 @@
     $Id: applicationContext-repository.xml,v 1.2 2005/10/10 09:20:42 costin Exp $
     -->    
 <beans default-lazy-init="true">
+	<!-- import resource="applicationContext-jr-jca.xml"/ -->
+	<import resource="applicationContext-jr-local.xml"/>
+
 	
-		
-	<bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
-		<!-- normal factory beans params -->
-		<property name="configuration" value="file:./conf/jackrabbit-repo.xml"/>
-		<property name="homeDir" value="./target/repository"/>
-	</bean>
-	
-	<bean id="jcrSessionFactory" class="org.springmodules.jcr.JcrSessionFactory">
+	<bean id="jcrSessionFactory" class="org.apache.portals.graffito.jcr.spring.JackrabbitSessionFactory">
 		<property name="repository" ref="repository"/>
 		<property name="credentials">
 			<bean class="javax.jcr.SimpleCredentials">
-				<constructor-arg index="0" value="bogus"/>
+				<constructor-arg index="0" value="superuser"/>
 				<!-- create the credentials using a bean factory -->
 				<constructor-arg index="1">
 					<bean factory-bean="password"
 					      factory-method="toCharArray"/>
 				</constructor-arg>
-			</bean>			
+			</bean>
 		</property>
-        <property name="namespaces">
-			<props>
-				<prop key="graffito">http://incubator.apache.org/graffito</prop>
-			</props>
-		</property>		
-	</bean>
-		
-	<bean id="jcrTransactionManager"
-		class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
-		<property name="sessionFactory" ref="jcrSessionFactory"/>
+
+			
 	</bean>
-		
+	
 	<!-- create the password to return it as a char[] -->
 	<bean id="password" class="java.lang.String">
-		<constructor-arg index="0" value="pass"/>
+		<constructor-arg index="0" value="superuser"/>
 	</bean>
 	
-	<bean id="providerManager" class="org.springmodules.jcr.support.ServiceSessionHolderProviderManager"/>
-		
+	
 	<bean id="jcrMappingDescriptor" class="org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl">
-		<constructor-arg index="0" value="./conf/jcrmapping/jcrmapping.xml"/>
+		<constructor-arg index="0" value="./src/test-config/jcrmapping.xml"/>
 	</bean>
 	
-	<bean id="jcrMappingTemplate" class="org.springmodules.jcr.mapping.JcrMappingTemplate">
-		<property name="sessionFactory" ref="jcrSessionFactory"/>
-		<property name="providerManager" ref="providerManager"/>
-		<property name="mapper" ref="jcrMappingDescriptor"/>
-		<property name="allowCreate" value="true"/>
+	<bean id="jcrMappingTemplate" class="org.apache.portals.graffito.jcr.spring.JcrMappingTemplate">
+		<constructor-arg index="0" ref="jcrSessionFactory"/>
+		<constructor-arg index="1" ref="jcrMappingDescriptor"/>
 	</bean>
 	
 	<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"

@@ -70,19 +55,19 @@
 		</property>
 	</bean>	
 	
-	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl"

-	      class="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl"
>
-		<property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>			
+	
+	<bean id="org.apache.portals.graffito.jcr.spring.test.components.impl.NewsServiceImpl"

+	      class="org.apache.portals.graffito.jcr.spring.test.components.impl.NewsServiceImpl"
>
+		<property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>					
 	</bean>		
 	
-	   	
-	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.NewsService" parent="baseTransactionProxy"

-	      name="org.apache.portals.graffito.jcr.spring.demo.components.NewsService" >
+	<bean id="org.apache.portals.graffito.jcr.spring.test.components.NewsService" parent="baseTransactionProxy"

+	      name="org.apache.portals.graffito.jcr.spring.test.components.NewsService" >
 		<property name="proxyInterfaces">
-			<value>org.apache.portals.graffito.jcr.spring.demo.components.NewsService</value>
+			<value>org.apache.portals.graffito.jcr.spring.test.components.NewsService</value>
 		</property>
 		<property name="target">
-			<ref bean="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl"/>
+			<ref bean="org.apache.portals.graffito.jcr.spring.test.components.impl.NewsServiceImpl"/>
 		</property>
 		<property name="transactionAttributes">
 			<props>
@@ -90,31 +75,29 @@
 				<prop key="*">PROPAGATION_REQUIRED</prop>
 			</props>
 		</property>
-	</bean>	   
-	
-	
-	
-	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl"

-	      class="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl"
>
+	</bean>	   	
+
+	<bean id="org.apache.portals.graffito.jcr.spring.test.components.impl.ArticleServiceImpl"

+	      class="org.apache.portals.graffito.jcr.spring.test.components.impl.ArticleServiceImpl"
>
 		<property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>			
-		<property name="newsService" ref="org.apache.portals.graffito.jcr.spring.demo.components.NewsService"/>
		
+		<property name="newsService" ref="org.apache.portals.graffito.jcr.spring.test.components.NewsService"/>
		
 	</bean>		
 	
-	   	
-	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.ArticleService" parent="baseTransactionProxy"

-	      name="org.apache.portals.graffito.jcr.spring.demo.components.ArticleService" >
+	<bean id="org.apache.portals.graffito.jcr.spring.test.components.ArticleService" parent="baseTransactionProxy"

+	      name="org.apache.portals.graffito.jcr.spring.test.components.ArticleService" >
 		<property name="proxyInterfaces">
-			<value>org.apache.portals.graffito.jcr.spring.demo.components.ArticleService</value>
+			<value>org.apache.portals.graffito.jcr.spring.test.components.ArticleService</value>
 		</property>
 		<property name="target">
-			<ref bean="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl"/>
+			<ref bean="org.apache.portals.graffito.jcr.spring.test.components.impl.ArticleServiceImpl"/>
 		</property>
 		<property name="transactionAttributes">
 			<props>
-				
+			
 				<prop key="*">PROPAGATION_REQUIRED</prop>
 			</props>
 		</property>
 	</bean>	   
-			
+	
+
 </beans>

Propchange: incubator/graffito/trunk/jcr/spring/src/spring-config/applicationContext-repository.xml
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message