• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMP transaction in DAO

 
Rashika Khanna
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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.
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • 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: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • 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
  • 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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic