weaver 2004/10/29 07:03:43 Modified: components/registry/src/java/META-INF registry_repository.xml registry-dao.xml Added: components/registry/src/java/META-INF transaction.xml entity-dao.xml Log: see: http://nagoya.apache.org/jira/browse/JS2-144 - repo files Revision Changes Path 1.2 +5 -1 jakarta-jetspeed-2/components/registry/src/java/META-INF/registry_repository.xml Index: registry_repository.xml =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/META-INF/registry_repository.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- registry_repository.xml 12 Oct 2004 20:12:32 -0000 1.1 +++ registry_repository.xml 29 Oct 2004 14:03:43 -0000 1.2 @@ -377,6 +377,7 @@ auto-delete="true" auto-update = "true" auto-retrieve = "true" + proxy="true" > <inverse-foreignkey field-ref="parentId"/> </collection-descriptor> @@ -388,6 +389,7 @@ auto-delete="true" auto-update = "true" auto-retrieve = "true" + proxy="true" > <inverse-foreignkey field-ref="portletId"/> @@ -399,6 +401,7 @@ auto-delete="true" auto-update = "true" auto-retrieve = "true" + proxy="true" > <inverse-foreignkey field-ref="portletId"/> @@ -411,7 +414,7 @@ element-class-ref="org.apache.jetspeed.om.impl.PortletInitParameterImpl" auto-delete="true" auto-update = "true" - auto-retrieve = "true" + auto-retrieve = "true" > <inverse-foreignkey field-ref="parentId"/> @@ -425,6 +428,7 @@ auto-delete="true" auto-update = "true" auto-retrieve = "true" + proxy="true" > <inverse-foreignkey field-ref="portletId"/> 1.2 +23 -28 jakarta-jetspeed-2/components/registry/src/java/META-INF/registry-dao.xml Index: registry-dao.xml =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/META-INF/registry-dao.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- registry-dao.xml 12 Oct 2004 20:12:32 -0000 1.1 +++ registry-dao.xml 29 Oct 2004 14:03:43 -0000 1.2 @@ -6,44 +6,39 @@ --> <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"/> - --> + <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= --> - <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= --> - - <!-- - - 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> - <!-- - PortletRegsitry business object: OJB implementation, as an inner bean wrapped - by an outer transactional proxy. The two bean definitions could have been separate, - but this is cleaner as there is no need to ever access the unwrapped object. --> - <bean id="portletRegistryImpl" class="org.apache.jetspeed.components.portletregistry.PersistenceStorePortletRegistry" init-method="init"/> + <bean id="portletRegistryImpl" class="org.apache.jetspeed.components.portletregistry.PersistenceBrokerPortletRegistry" init-method="init"> + <constructor-arg> + <value>META-INF/registry_repository.xml</value> + </constructor-arg> + </bean> - <bean id="portletRegistry" parent="baseTransactionProxy" > - <property name="target"> + <bean id="org.apache.jetspeed.components.portletregistry.PortletRegistry" + name="portletRegistry" + parent="baseTransactionProxy" > + <property name="proxyInterfaces"> + <value>org.apache.jetspeed.components.portletregistry.PortletRegistry</value> + </property> + + <property name="target"> <ref bean="portletRegistryImpl"/> + </property> + <property name="transactionAttributes"> + <props> + <prop key="regsister*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop> + <prop key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop> + <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop> + <prop key="save*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop> + <prop key="*">PROPAGATION_SUPPORTS</prop> + </props> </property> </bean> 1.1 jakarta-jetspeed-2/components/registry/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/registry/src/java/META-INF/entity-dao.xml Index: entity-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 PortletEntity using Apache OJB. --> <beans> <!-- <bean id="systemCache" class="org.apache.jetspeed.cache.general.SimpleHashMapCache" /> <bean id="systemCachingInterceptor" class="org.apache.jetspeed.components.interceptors.CachingInterceptor" > <constructor-arg> <ref bean="systemCache"/> </constructor-arg> </bean> <bean id="systemRemoveFromCacheInterceptor" class="org.apache.jetspeed.components.interceptors.RemoveFromCacheInterceptor" > <constructor-arg> <ref bean="systemCache"/> </constructor-arg> </bean> <bean id="portletEntityCachingAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> <property name="advice"> <ref bean="systemCachingInterceptor"/> </property> <property name="patterns"> <list> <value>.*getPortletEntity.*</value> </list> </property> </bean> <bean id="portletEntityRemoveFromCacheAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> <property name="advice"> <ref bean="systemRemoveFromCacheInterceptor"/> </property> <property name="patterns"> <list> <value>.*removePortletEntity.*</value> </list> </property> </bean> --> <!-- - PortletEntity business object: OJB implementation, as an inner bean wrapped - by an outer transactional proxy. The two bean definitions could have been separate, - but this is cleaner as there is no need to ever access the unwrapped object. --> <bean id="portletEntityAccessImpl" class="org.apache.jetspeed.components.portletentity.PersistenceBrokerPortletEntityAccess" > <constructor-arg> <ref bean="portletRegistry"/> </constructor-arg> </bean> <bean id="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent" parent="baseTransactionProxy" name="portletEntityAccess" > <property name="proxyInterfaces"> <value>org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent</value> </property> <property name="target"> <ref bean="portletEntityAccessImpl"/> </property> <!-- <property name="preInterceptors"> <list> <ref bean="portletEntityCachingAdvisor"/> <ref bean="portletEntityRemoveFromCacheAdvisor"/> </list> </property> --> <property name="transactionAttributes"> <props> <prop key="remove*">PROPAGATION_REQUIRED</prop> <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException</prop> <prop key="*">PROPAGATION_SUPPORTS</prop> </props> </property> </bean> </beans>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]