CreateManager |
|
Your trail: |
Difference between
version 80
and
version 77:
At line 8 changed 2 lines. |
In the context of [AppFuse], this is called a Manager class. It's main responsibility to act as a bridge between the persistence (DAO) layer and the |
web layer. It's also useful for de-coupling your presentation layer from your database layer (i.e. for Swing apps). Managers should also be where you put any business logic for your application. |
In the context of [AppFuse], this is called a Manager class. Its main responsibility is to act as a bridge between the persistence (DAO) layer and the web layer. It's also useful for de-coupling your presentation layer from your database layer (i.e. for Swing apps). Managers should also be where you put any business logic for your application. |
At line 190 changed 1 line. |
To notify Spring of this our PersonManager interface and its implementation, open the src/service/**/service/applicationContext-service.xml file. In here, you should see a commented out definition for the "personManager" bean. Uncomment this, or add the following to the bottom of this file. |
To notify Spring of this our PersonManager interface and its implementation, open the src/service/**/service/applicationContext-service.xml file. Add the following to the bottom of this file. |
At line 194 changed 4 lines. |
<bean id="personManager" parent="txProxyTemplate"> |
<property name="target"> |
<bean class="org.appfuse.service.impl.PersonManagerImpl" autowire="byName"/> |
</property> |
<bean id="personManager" class="org.appfuse.service.impl.PersonManagerImpl"> |
<property name="personDao" ref="personDao"/> |
At line 201 changed 1 line. |
The "parent" attribute refers to a bean definition for a [TransactionProxyFactoryBean|http://www.springframework.org/docs/api/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.html] that has all the basic transaction attributes set. |
This bean must have a name that ends in "Manager". This is because there is AOP advice applied at the top of this file for all *Manager beans. |
{{{<aop:advisor id="managerTx" advice-ref="txAdvice" pointcut="execution(* *..service.*Manager.*(..))" order="2"/>}}} For more information on transactions with Spring, see [Spring's documentation|http://www.springframework.org/docs/reference/transaction.html]. |
At line 203 removed 1 line. |
|
Back to CreateManager,
or to the Page History.
|