• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BMP transaction in DAO

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a problem.
I am calling DAO from my bean managed session bean. I am starting the transaction in session bean and then calling the DAO in between. In DAO I m getting the connection from DataSource. In my DAO when I call stmt.executeUpdate(query), server just hangs there and nothing happens.

Please somebody tell me where is the problem and how to solve it.

Thanks,
Rashmi
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you able to exceute the query in the update statement using normal database login? My guess is something is wrong in the query.
 
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rashmi kapoor:
Hi All,

I have a problem.
I am calling DAO from my bean managed session bean.



I am slightly confused, in the subject line you have mentioned "BMP transaction in DAO", but i am unable to figure out where is BMP?
Also "bean managed session bean" is a new term to me, If i remember correctly Session Bean can either be stateful or stateless. The terms Bean Managed and Container managed is used only for Entity Beans.

Also try running your query directly and see if there is any difference?
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the poster meant BMT and not BMP.
 
Rashika Khanna
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yaa, I m able to run my query separately.
By bean managed session bean, I mean that I am starting a user transation in session bean and then calling dao, in which I m trying to execute a query but executeUpdate or any execute command doesnt work.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rashmi kapoor:
Hi All,

I have a problem.
I am calling DAO from my bean managed session bean. I am starting the transaction in session bean and then calling the DAO in between. In DAO I m getting the connection from DataSource. In my DAO when I call stmt.executeUpdate(query), server just hangs there and nothing happens.

Please somebody tell me where is the problem and how to solve it.

Thanks,
Rashmi




You should be debug your code again what happen ???
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rashmi kapoor:
Yaa, I m able to run my query separately.
By bean managed session bean, I mean that I am starting a user transation in session bean and then calling dao, in which I m trying to execute a query but executeUpdate or any execute command doesnt work.



please post your code for more detail ...
reply
    Bookmark Topic Watch Topic
  • New Topic