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

  • SEARCH
  • Home
  • 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 6866151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:08:39+00:00 2026-05-27T03:08:39+00:00

I have an plain simple java application that use spring 2.5.5 and hiberate 3.3.1.GA.

  • 0

I have an plain simple java application that use spring 2.5.5 and hiberate 3.3.1.GA. In the other word it is not running in any container like tomcat or jboss.

I want to enable transaction control in the application by the use of annotation @Tranactional. However after many trial the application does not begin any transaction as I’d expected. (Check on the server side, sybase 12.5, using sp_transactions)

I have read the doco a few time and hopefully I did not miss anything.

I added <tx:annotation-driven transaction-manager="txManager" /> to the application context xml file that contains the bean that needs to take part in a transaction.

Can anyone suggest

1) how can I turn spring logging to find out how spring framework discovers and instrument the @Transactional java classes?

2) I am using org.springframework.orm.hibernate3.HibernateTransactionManager as a transaction manager. Is it correct?

3) Do I need to add any jar to enable this support?

Here is a partial listing of the relevant applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"   
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/util 
        http://www.springframework.org/schema/util/spring-util-2.5.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"
    default-lazy-init="false">

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <property name="driverClassName">
            <value>com.sybase.jdbc3.jdbc.SybDriver</value>
        </property>
        <property name="url">
            <value>${jdbc.connection.url}</value>
        </property>
        <property name="username">
            <value>${jdbc.user}</value>
        </property>
        <property name="password">
            <value>${jdbc.password}</value>
        </property>
        <property name="maxWait">
            <value>30000</value>
        </property>
    </bean>

    <bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="configLocation">
            <value>classpath:hibernate.cfg.xml</value>
        </property>
        <property name="configurationClass">
            <value>org.hibernate.cfg.AnnotationConfiguration
            </value>
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">
                    org.hibernate.dialect.SybaseDialect
                </prop>
                <prop key="hibernate.jdbc.batch_size">
                    50
                </prop>
                <prop key="show_sql">true</prop>
                <prop key="hibernate.cache.provider_class">
                    org.hibernate.cache.EhCacheProvider
                </prop>
                <prop key="hibernate.cache.provider_configuration_file_resource_path">
                    ehcache.xml
                </prop>
                <prop key="hibernate.cache.use_query_cache">
                    true
                </prop>
                <prop key="hibernate.cache.use_second_level_cache">
                    true
                </prop>
            </props>
        </property>
    </bean>

    <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
        <property name="sessionFactory">
            <ref bean="sessionFactory" />
        </property>
    </bean>

EDIT:

In case it is relevant (Spring @Transactional concurrency), I have use @Transactional liberally

  • 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-27T03:08:44+00:00Added an answer on May 27, 2026 at 3:08 am
    1. set logger for org.springframework.transaction to DEBUG
    2. Depends, if you run on a real J2EE server (WAS, JBoss, …) then you should use the provided transactionmanager; if not (tomcat, jetty) you are fine
    3. Javax transaction but if you use maven and hibernate you should already have it (since JTA is a hibernate dependency). Do not deploy this jar if you deploy on JBoss/WAS/… sicne this may conflict with their provided JTA.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say, I have a pretty simple Java application that needs the way to store
I have plain Jar Project that reference by android application. Then, I have Functions.java
I have this java swing application that I intend to sell over the internet.
I have Java code that works on my desk top...its a simple app that
I have a simple form with some plain html input like bellow using ASP.NET
We have a rather simple site (minimal JS) with plain html and CSS. It
In an iPhone application, I have some plain C functions. Is it possible to
In an app I'm working on, I have a plain style UITableView that can
I have an application that extends a Frame. Then, it'll display a few lines
I have a Python server script and a Java client application and the goal

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.