Results 1 to 2 of 2

Thread: Hibernate “manual” transactions how-to

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Question Hibernate “manual” transactions how-to

    My webapp (Spring3 + Hibernate3) always worked with services class-annotated with @Transactional and this configuration:
    Code:
    <tx:annotation-driven transaction-manager="transactionManager" />
    
        <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory" ref="mySessionFactory" />
        </bean>
    Now... I'm on Google AppEngine. For some nasty reason I don't know yet, @Transactional does not work. It uses some class in javax.naming, which is not whitelisted. It ends up with:
    Error creating bean with name 'mySessionFactory': Post-processing of the FactoryBean's object failed; nested exception is java.lang.SecurityException: Unable to get members for class org.hibernate.impl.SessionFactoryImpl
    Please don't ask me why.... :-\

    Using Spring's HibernateTemplate instead of my dao (which uses raw session factory) solved the problem, but I know it's a little obsolete.

    So, I want to try using manual old style transactions. Questions:

    where? I'd like to keep the transactions in the service layer.
    how?

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    Hello

    Yes, HibernateTemplate is deprecated.

    About your problem It is the second time I have read about
    Code:
    java.lang.SecurityException: Unable to get members for class org.hibernate.impl.SessionFactoryImpl
    when Google AppEngine

    1) Do a search in the forum, perhaps such thread has been resolved.
    2) Post the most important part of your exception (like the line shown above) in Google and see if you get better results

    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Tags for this Thread

Posting Permissions

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