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 657727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:51:21+00:00 2026-05-13T22:51:21+00:00

I have a j2ee application running on spring framework. I am trying to apply

  • 0

I have a j2ee application running on spring framework. I am trying to apply transaction management using aop but apparently it won’t work. I am trying to apply transaction to a function from a class named RegisterBLogic with function name execute(ParamObject obj). My function inserts into a database. I also put a throw ne Exception my function to force the throwing of exception.

Inside userManagerContext:

  <bean id="RegisterBLogic"
     scope="singleton"  
    class="jp.co.anicom.fw.web.usermanager.blogic.RegisterBLogic">
     <property name="queryDAO"
     ref="queryDAO" />   <property
     name="updateDAO" ref="updateDAO" /> 
    </bean>

Inside ApplicationContext

  <bean id="TerasolunaDataSource"  class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="PrototypeDataSource" />
  </bean>
 <tx:advice id="transactionInterceptor" transaction-manager="transactionManager">
   <tx:attributes>
   <tx:method name="insert*" propagation="REQUIRED"
    rollback-for="java.lang.Exception" />
   <tx:method name="execute*" propagation="REQUIRED"
    rollback-for="java.lang.Exception" />
   <tx:method name="*" propagation="REQUIRED" read-only="true" />
  </tx:attributes>
 </tx:advice>
 <!-- AOPの設定 -->
 <aop:config>
  <aop:pointcut id="blogicBeans" expression="bean(*BLogic)" />
  <aop:pointcut id="serviceBeans" expression="bean(*Service)" />
  <aop:advisor pointcut-ref="blogicBeans" advice-ref="transactionInterceptor" />
  <aop:advisor pointcut-ref="serviceBeans" advice-ref="transactionInterceptor" />
 </aop:config>

Yeah these beans already exist. I have this bean declaration under userManagerCOntext.xml. This xml is loaded in the struts config through

 <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
  <set-property property="contextConfigLocation"
   value="/WEB-INF/userManager/userManagerContext.xml"/>

 </plug-in>

I found the problem. Currently i am using a data source from a JNDI.

class=”org.springframework.jndi.JndiObjectFactoryBean”>

i changed it to normal data source with property defaultAutoCommit set to false

    <bean id="dataSource"
    class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName"
        value="oracle.jdbc.OracleDriver" />
    <property name="url"
        value="jdbc:oracle:thin:@192.168.178.82:1521:anicom" />
    <property name="username" value="jay" />
    <property name="password" value="jay" />
    <property name="initialSize" value="5" />
    <property name="maxActive" value="10" />
    <property name="defaultAutoCommit" value="false" />
           </bean>

How do I use JNDI data source but be able to set a property somewhat similar to defaultAutoCommit to false. I am using Oracle weblogic server and my data source is stored in it accessed through JNDI

  • 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-13T22:51:21+00:00Added an answer on May 13, 2026 at 10:51 pm

    First of all, this XML is malformed (should be </tx:advice>).

    Are the beans you want to wrap in AOP already present when this configuration is processed?

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

Sidebar

Ask A Question

Stats

  • Questions 402k
  • Answers 402k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The normal thing to do is just write the EDIFACT… May 15, 2026 at 4:57 am
  • Editorial Team
    Editorial Team added an answer Use: UPDATE tb_Test SET dt_modified = CURRENT_TIMESTAMP WHERE ? --… May 15, 2026 at 4:57 am
  • Editorial Team
    Editorial Team added an answer The absolute fastest I can think of would be to… May 15, 2026 at 4:57 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.