weaver 2004/10/29 06:54:37
Added: components/prefs/src/java/META-INF prefs-noprop-dao.xml
transaction.xml prefs-dao.xml prefs_repository.xml
Log:
see: http://nagoya.apache.org/jira/browse/JS2-144
repo files
Revision Changes Path
1.1
jakarta-jetspeed-2/components/prefs/src/java/META-INF/prefs-noprop-dao.xml
Index: prefs-noprop-dao.xml
===================================================================
<?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>
<!-- ========================= BUSINESS OBJECT DEFINITIONS
========================= -->
<!-- Preferences Implementation -->
<bean id="PreferencesProviderImpl"
class="org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider"
init-method="init"
>
<constructor-arg
index="0"><value>META-INF/prefs_repository.xml</value></constructor-arg>
<constructor-arg type="boolean"
index="1"><value>false</value></constructor-arg>
</bean>
<bean id="org.apache.jetspeed.prefs.PreferencesProvider"
parent="baseTransactionProxy"
name="prefsProvider"
>
<property name="proxyInterfaces">
<value>org.apache.jetspeed.prefs.PreferencesProvider</value>
</property>
<property name="target">
<ref bean="PreferencesProviderImpl"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="createNode*">PROPAGATION_REQUIRED</prop>
<prop key="storeNode*">PROPAGATION_REQUIRED</prop>
<prop key="removeNode*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_SUPPORTS</prop>
</props>
</property>
</bean>
<bean id="java.util.prefs.PreferencesFactory"
class="org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl"
name="prefsFactory" init-method="init"
>
<property name="prefsProvider">
<ref bean="prefsProvider"/>
</property>
</bean>
<!-- Property Manager -->
<bean id="PropertyManagerImpl"
class="org.apache.jetspeed.prefs.impl.PropertyManagerImpl"
>
<!-- We don't use the Tx proxied prefs provider so that we can demarcate Txs
exclusively for the PropertyManager -->
<constructor-arg ><ref bean="PreferencesProviderImpl"/></constructor-arg>
</bean>
<bean id="org.apache.jetspeed.prefs.PropertyManager" parent="baseTransactionProxy"
name="propertyManager"
>
<property name="proxyInterfaces">
<value>org.apache.jetspeed.prefs.PropertyManager</value>
</property>
<property name="target">
<ref bean="PropertyManagerImpl"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="add*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_SUPPORTS</prop>
</props>
</property>
</bean>
</beans>
1.1
jakarta-jetspeed-2/components/prefs/src/java/META-INF/transaction.xml
Index: transaction.xml
===================================================================
<?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>
1.1
jakarta-jetspeed-2/components/prefs/src/java/META-INF/prefs-dao.xml
Index: prefs-dao.xml
===================================================================
<?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>
<!-- ========================= BUSINESS OBJECT DEFINITIONS
========================= -->
<!-- Preferences Implementation -->
<bean id="PreferencesProviderImpl"
class="org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider"
init-method="init"
>
<constructor-arg
index="0"><value>META-INF/prefs_repository.xml</value></constructor-arg>
<constructor-arg type="boolean"
index="1"><value>true</value></constructor-arg>
</bean>
<bean id="org.apache.jetspeed.prefs.PreferencesProvider"
parent="baseTransactionProxy"
name="prefsProvider"
>
<property name="proxyInterfaces">
<value>org.apache.jetspeed.prefs.PreferencesProvider</value>
</property>
<property name="target">
<ref bean="PreferencesProviderImpl"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="createNode*">PROPAGATION_REQUIRED</prop>
<prop key="storeNode*">PROPAGATION_REQUIRED</prop>
<prop key="removeNode*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_SUPPORTS</prop>
</props>
</property>
</bean>
<bean id="java.util.prefs.PreferencesFactory"
class="org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl"
name="prefsFactory" init-method="init"
>
<property name="prefsProvider">
<ref bean="prefsProvider"/>
</property>
</bean>
<!-- Property Manager -->
<bean id="PropertyManagerImpl"
class="org.apache.jetspeed.prefs.impl.PropertyManagerImpl"
>
<!-- We don't use the Tx proxied prefs provider so that we can demarcate Txs
exclusively for the PropertyManager -->
<constructor-arg ><ref bean="PreferencesProviderImpl"/></constructor-arg>
</bean>
<bean id="org.apache.jetspeed.prefs.PropertyManager" parent="baseTransactionProxy"
name="propertyManager"
>
<property name="proxyInterfaces">
<value>org.apache.jetspeed.prefs.PropertyManager</value>
</property>
<property name="target">
<ref bean="PropertyManagerImpl"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="add*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_SUPPORTS</prop>
</props>
</property>
</bean>
</beans>
1.1
jakarta-jetspeed-2/components/prefs/src/java/META-INF/prefs_repository.xml
Index: prefs_repository.xml
===================================================================
<!--
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.
-->
<descriptor-repository version="1.0">
<!--
- N O D E
-->
<class-descriptor
class="org.apache.jetspeed.prefs.om.impl.NodeImpl"
table="PREFS_NODE"
>
<documentation>Represents a preferences node.</documentation>
<field-descriptor
name="nodeId"
column="NODE_ID"
jdbc-type="BIGINT"
primarykey="true"
autoincrement="true"
>
</field-descriptor>
<field-descriptor
name="parentNodeId"
column="PARENT_NODE_ID"
jdbc-type="BIGINT"
nullable="true"
>
</field-descriptor>
<field-descriptor
name="nodeName"
column="NODE_NAME"
jdbc-type="VARCHAR"
nullable="false"
length="100"
>
</field-descriptor>
<field-descriptor
name="nodeType"
column="NODE_TYPE"
jdbc-type="SMALLINT"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="fullPath"
column="FULL_PATH"
jdbc-type="VARCHAR"
nullable="false"
length="254"
>
</field-descriptor>
<field-descriptor
name="creationDate"
column="CREATION_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="modifiedDate"
column="MODIFIED_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
<collection-descriptor
name="nodeKeys"
element-class-ref="org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl"
auto-retrieve="true"
auto-delete="false"
auto-update="true"
indirection-table="PREFS_NODE_PROPERTY_KEY"
>
<documentation>This is the reference to the property keys allowed for
that node.</documentation>
<fk-pointing-to-this-class column="NODE_ID"/>
<fk-pointing-to-element-class column="PROPERTY_KEY_ID"/>
</collection-descriptor>
<collection-descriptor
name="nodeProperties"
element-class-ref="org.apache.jetspeed.prefs.om.impl.PropertyImpl"
auto-retrieve="true"
auto-update="true"
auto-delete="true"
refresh="true"
>
<documentation>This is the reference to a node
properties.</documentation>
<inverse-foreignkey field-ref="nodeId"/>
</collection-descriptor>
</class-descriptor>
<!--
- P R O P E R T Y K E Y
-->
<class-descriptor
class="org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl"
table="PREFS_PROPERTY_KEY"
>
<documentation>Represents a property key.</documentation>
<field-descriptor
name="propertyKeyId"
column="PROPERTY_KEY_ID"
jdbc-type="BIGINT"
primarykey="true"
autoincrement="true"
>
</field-descriptor>
<field-descriptor
name="propertyKeyName"
column="PROPERTY_NAME"
jdbc-type="VARCHAR"
nullable="false"
length="100"
>
</field-descriptor>
<field-descriptor
name="propertyKeyType"
column="PROPERTY_TYPE"
jdbc-type="SMALLINT"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="creationDate"
column="CREATION_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="modifiedDate"
column="MODIFIED_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
</class-descriptor>
<!--
- P R O P E R T Y
-->
<class-descriptor
class="org.apache.jetspeed.prefs.om.impl.PropertyImpl"
table="PREFS_PROPERTY_VALUE"
>
<documentation>Represents a property key/value pair.</documentation>
<field-descriptor
name="propertyValueId"
column="PROPERTY_VALUE_ID"
jdbc-type="BIGINT"
primarykey="true"
autoincrement="true"
>
</field-descriptor>
<field-descriptor
name="nodeId"
column="NODE_ID"
jdbc-type="BIGINT"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="propertyKeyId"
column="PROPERTY_KEY_ID"
jdbc-type="BIGINT"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="booleanPropertyValue"
column="BOOLEAN_VALUE"
jdbc-type="BIT"
nullable="true"
>
</field-descriptor>
<field-descriptor
name="datePropertyValue"
column="DATETIME_VALUE"
jdbc-type="TIMESTAMP"
nullable="true"
>
</field-descriptor>
<field-descriptor
name="longPropertyValue"
column="LONG_VALUE"
jdbc-type="BIGINT"
nullable="true"
>
</field-descriptor>
<field-descriptor
name="doublePropertyValue"
column="DOUBLE_VALUE"
jdbc-type="DOUBLE"
nullable="true"
>
</field-descriptor>
<field-descriptor
name="textPropertyValue"
column="TEXT_VALUE"
jdbc-type="VARCHAR"
nullable="true"
length="254"
>
</field-descriptor>
<field-descriptor
name="creationDate"
column="CREATION_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
<field-descriptor
name="modifiedDate"
column="MODIFIED_DATE"
jdbc-type="TIMESTAMP"
nullable="false"
>
</field-descriptor>
<reference-descriptor
name="propertyKey"
class-ref="org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl"
refresh="true"
auto-retrieve="true"
auto-delete="false"
auto-update="true"
>
<documentation>This is the reference to a property key.</documentation>
<foreignkey field-ref="propertyKeyId"/>
</reference-descriptor>
</class-descriptor>
</descriptor-repository>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]