Results 1 to 5 of 5

Thread: Relationship between TransactionManager and Transaction Factory Class?

  1. #1

    Default Relationship between TransactionManager and Transaction Factory Class?

    Inside Hibernate, I have tried to figure this out fully, but still don’t quite understand the relationship between the TransactionManager, and the TransactionManagerFactoryClass???

    <bean id="txMgr" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager" p:sessionFactory-ref="mbuSessionFactory" p:dataSource-ref="mbuDataSource" />


    <utilroperties id="mbuHibernateProperties">
    .
    .
    <prop key="hibernate.transaction.factory_class">org.hibe rnate.transaction.JDBCTransactionFactory</prop>
    .
    .
    </utilroperties>
    Cameesa.com - Crowdfunding Fashion
    PrinterListings.com - Helping you find the right t-shirt printer

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    There isn't a relationship...

    The TransactionFactory is used by hibernate to create/start a transaction, which to use depends on how you manage transactions (jta or not). The HibernateTransactionManager simply tells hibernate when to start and commit/rollback a atransaction..

    So from a spring perspective there is no relationship...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Thank you, so which on of these is responsible for starting the transaction, cause you mention that they are both doing that, so is there a parent-child transaction going on here? Do one of these classes call another?
    Cameesa.com - Crowdfunding Fashion
    PrinterListings.com - Helping you find the right t-shirt printer

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    I suggest you read the transaction chapter of spring and. Spring only delegates to the underlying mechanism so there is no parent/child transaction going on...

    As I already stated there is NO relationship and they do not know about each other.. (You also might want to read up on hibernate and transactions and how that internally works, take a look at the hibernate sources.)>
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5

    Default

    Thanks for the recommendations. I will read both of those.
    Cameesa.com - Crowdfunding Fashion
    PrinterListings.com - Helping you find the right t-shirt printer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •