Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3339604
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:30:42+00:00 2026-05-18T00:30:42+00:00

As far as I understand it’s not recommended to use HibernateTemplate in Spring. So

  • 0

As far as I understand it’s not recommended to use HibernateTemplate in Spring.
So what I’m trying to to is to write it using HibernateTransactionManager:
What I did so far is Database and session initialization

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
  <property name="driverClassName" value="org.postgresql.Driver" />
  <property name="url" value="jdbc:postgresql://127.0.0.1/doolloop2" />
  <property name="username" value="doolloop2" />
  <property name="password" value="doolloop" />
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="dataSource" ref="dataSource" />
     <property name="mappingLocations">
      <list>
        <value>WEB-INF/mapping/User.hbm.xml</value>
      </list>
    </property>
    <property name="hibernateProperties">
 <props>
  <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> 
  <prop key="hibernate.show_sql">true</prop> 
  <prop key="hibernate.hbm2ddl.auto">update</prop> 
  </props>
  </property>
</bean>
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  <property name="sessionFactory" ref="sessionFactory" />
</bean>   

What is next? hos should I create my class and should I register it as beans? should it be using @Authwired annotation. I have HibernateTamplate working example, but I would like to build the new one.

Thank you in Advance…..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:30:42+00:00Added an answer on May 18, 2026 at 12:30 am

    You’re all set – just inject your sessionFactory in your beans and manipulate your data. Annotate your data access methods with @Transactional annotations – check http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/transaction.html#transaction-declarative-annotations

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far I can understand HTML.ActionLink and URL.RouteURL but still trying to absorb where
As far as I understand the Metro part of the runtime is not x86
I'm trying to understand how unit testing works. So far i understand you're testing
As far as I understand Google Guice 2.0 is out not so long ago.
As far as I understand JRuby, it is perfectly possible to use Java class
As far as I understand sp_addextendedproperty is not available in SQL Azure databases as
As far as I understand this, it seems that there is not a direct
I'm trying to understand how to use Json-RPC calls in Google Go that would
As far as I understand sending a texture to OGLES2 is done using GLUtils.texImage2D
As far as I understand, if I want to get my database under source

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.