Hi there,

 

I have an implementation of my model with OJB using just PersistenceBroker.
Now I'm looking into adding transactional support, looked into ODMG but it
seems complex to implement since all my mapping and query is in Broker
lingo, so I'm looking at injecting Transaction support for my process
methods with spring, that way I shouldn't need to change config files and
just one class that interfaces with the Broker. Now, I tried to look for
samples outthere found this 

 

http://www.springframework.org/node/116

 

But after setting it up transactions don't seem to be happening. So my
questions are.

1-       Do I need to use InnoDB on Mysql ? My tables are MyIsam.

2-       Am I missing any other feature besides applicationContext setup and
deriving my class from PersistenceBrokerDaoSupport?

 

Here is the applicationContext.xml

 

<beans>

  <!-- Transaction manager for a single OJB PersistenceBroker (alternative
to JTA) -->

  <bean id="transactionManager"
class="org.springframework.orm.ojb.PersistenceBrokerTransactionManager"/>

 

  <bean id="genericProcess" class="com.met.process.Generic"/>

 

  <bean id="payrollManager"

 
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBe
an">

    <property name="transactionManager">

      <ref local="transactionManager"/>

    </property>

    <property name="target">

      <ref local="genericProcess"/>

    </property>

    <property name="transactionAttributes">

      <props>

        <prop key="complete*">PROPAGATION_REQUIRED</prop>

        <prop key="terminate*">PROPAGATION_REQUIRED</prop>

        <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>

      </props>

    </property>

  </bean>

</beans>

 

Thanks

 

Sam

Reply via email to