|
From: Lars F. <lar...@gm...> - 2003-08-26 10:00:20
|
Finally I've managed to get the whole thing working with Hibernate and
WebLogic.
There are still a few newbie questions left:
In applicationContext.xml from the Hibernate skeleton I've defined this
part:
<bean id="exampleDataAccessObject" class="example.ExampleDataAccessObject">
<property name="sessionFactory"><ref bean="mySessionFactory"/></property>
<property name="exampleParam"><value>someValue</value></property>
</bean>
1.) When do I need the part defining (do I need it at all?)
<bean id="exampleBusinessObject" class="example.ExampleBusinessObject">
<property name="transactionManager"><ref
bean="myTransactionManager"/></property>
<property name="dataAccessObject"><ref
bean="exampleDataAccessObject"/></property>
<property name="exampleParam"><value>someOtherValue</value></property>
</bean>
2.) In my DAO implementation I use HibernateTemplate. I assume that those
methods
are transaction safe with only the first part ("exampleDataAccessObject")
defined (?).
3.) Spring provides a "Controller" and a "MultiActionController". For sure
there are lots
of architectural reasons for providing both. But wouldn't it be easier just
to provide one
kind of controller ? E.g. in WebWork 1 you can make a class ActionAware,
SessionAware, etc.
which is very easy to understand (when to use what even without
documentation).
Thanks again
Lars
|