(no commit message)
authorErik Brakkee <erik@brakkee.org>
Thu, 8 Feb 2007 12:48:10 +0000 (12:48 +0000)
committerErik Brakkee <erik@brakkee.org>
Thu, 8 Feb 2007 12:48:10 +0000 (12:48 +0000)
mythtv/src/main/resources/beanRefContext.xml [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.beanfactory.properties [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.application.xml [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.datasource.xml [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.hibernate.properties [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.hibernate.xml [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.hibernatemappings.xml [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.properties [new file with mode: 0644]
mythtv/src/main/resources/org.wamblee.mythtv.properties.xml [new file with mode: 0644]

diff --git a/mythtv/src/main/resources/beanRefContext.xml b/mythtv/src/main/resources/beanRefContext.xml
new file mode 100644 (file)
index 0000000..fff0f4c
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+ <beans> 
+     
+     <bean id="mythtv"
+         class="org.springframework.context.support.ClassPathXmlApplicationContext">
+         <constructor-arg>
+             <list>
+                 <value>org.wamblee.mythtv.properties.xml</value>
+                 <value>org.wamblee.mythtv.datasource.xml</value>
+                 <value>org.wamblee.mythtv.hibernatemappings.xml</value>
+                 <value>org.wamblee.mythtv.hibernate.xml</value>
+                 <value>org.wamblee.mythtv.application.xml</value>
+             </list>
+         </constructor-arg>
+     </bean>
+     
+ </beans>
\ No newline at end of file
diff --git a/mythtv/src/main/resources/org.wamblee.beanfactory.properties b/mythtv/src/main/resources/org.wamblee.beanfactory.properties
new file mode 100644 (file)
index 0000000..4ffb2ec
--- /dev/null
@@ -0,0 +1,7 @@
+
+##############################################################################
+# Class name of the beanfactory used by the crawler application
+##############################################################################
+
+org.wamblee.beanfactory.class=org.wamblee.mythtv.MythtvBeanFactory
+
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.application.xml b/mythtv/src/main/resources/org.wamblee.mythtv.application.xml
new file mode 100644 (file)
index 0000000..e00a326
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+
+</beans> 
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.datasource.xml b/mythtv/src/main/resources/org.wamblee.mythtv.datasource.xml
new file mode 100644 (file)
index 0000000..9caa1c8
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+    
+    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+        <property name="jndiName" value="${org.wamblee.mythtv.datasource}"/>
+    </bean>
+</beans>
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.hibernate.properties b/mythtv/src/main/resources/org.wamblee.mythtv.hibernate.properties
new file mode 100644 (file)
index 0000000..42491b2
--- /dev/null
@@ -0,0 +1,20 @@
+
+###################################################################################
+# dialect
+###################################################################################
+hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
+
+###################################################################################
+# debugging settings: Log4j configuration can provide more detail. 
+###################################################################################
+hibernate.show_sql=false
+
+###################################################################################
+# hibernate cache provider
+###################################################################################
+hibernate.cache.provider=org.hibernate.cache.EhCacheProvider
+
+###################################################################################
+# query cache
+###################################################################################
+hibernate.cache.use_query_cache=true
\ No newline at end of file
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.hibernate.xml b/mythtv/src/main/resources/org.wamblee.mythtv.hibernate.xml
new file mode 100644 (file)
index 0000000..4d34ac8
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
+               "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+       <!-- bean id="namingStrategy" class="nl.jmonks.system.hibernate.JMonksNamingStrategy"> </bean -->
+
+       <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+               <property name="dataSource">
+                       <ref bean="dataSource"/>
+               </property>
+               <property name="hibernateProperties">
+                       <props>
+                               <prop key="hibernate.dialect">${hibernate.dialect}</prop>
+                <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
+                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
+                <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
+                               <prop key="hibernate.query.substitutions">true 1, false 0</prop>
+                               <!-- prop key="hibernate.connection.release_mode">after_statement</prop -->
+                       </props>
+               </property>
+               <property name="mappingResources">
+                       <ref bean="hibernateMappingFiles"/>
+               </property>
+               <!-- property name="namingStrategy">
+                       <ref local="namingStrategy"/>
+               </property -->
+       </bean>
+
+       <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
+               <property name="sessionFactory">
+                       <ref bean="sessionFactory"/>
+               </property>
+       </bean>
+
+       <bean id="transactionManager"
+               class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+               <property name="sessionFactory">
+                       <ref local="sessionFactory"/>
+               </property>
+       </bean>
+
+       <!-- Abstract bean. Subclass this bean and specify the target property to
+         wrap a bean with transactions -->
+       <bean abstract="true" id="transactionRequiredTemplate"
+               class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+               <property name="transactionManager" ref="transactionManager"/>
+               <property name="transactionAttributes">
+                       <props>
+                               <prop key="*">PROPAGATION_REQUIRED</prop>
+                       </props>
+               </property>
+       </bean>
+
+
+</beans>
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.hibernatemappings.xml b/mythtv/src/main/resources/org.wamblee.mythtv.hibernatemappings.xml
new file mode 100644 (file)
index 0000000..a820818
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
+               "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+       
+       <bean id="hibernateMappingFiles" class="org.wamblee.mythtv.MythtvHibernateMappings">
+               
+       </bean>
+</beans>
\ No newline at end of file
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.properties b/mythtv/src/main/resources/org.wamblee.mythtv.properties
new file mode 100644 (file)
index 0000000..45e303e
--- /dev/null
@@ -0,0 +1,5 @@
+
+org.wamblee.mythtv.datasource=java:mythtv
+org.wamblee.mythtv.pollinterval=30
+org.wamblee.mythtv.monitordir=/data/vcr
+org.wamblee.mythtv.linkdir=/data/vcr/links
diff --git a/mythtv/src/main/resources/org.wamblee.mythtv.properties.xml b/mythtv/src/main/resources/org.wamblee.mythtv.properties.xml
new file mode 100644 (file)
index 0000000..6ba78ce
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+ <beans> 
+    
+    <bean id="propertyBean"
+        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="locations">
+            <list>
+                <value>org.wamblee.mythtv.hibernate.properties</value>
+                <value>org.wamblee.mythtv.properties</value>
+            </list>
+        </property>
+    </bean> 
+ </beans>
\ No newline at end of file