aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes BMP transaction in DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "BMP transaction in DAO" Watch "BMP transaction in DAO" New topic
Author

BMP transaction in DAO

Rashika Khanna
Greenhorn

Joined: Aug 25, 2004
Posts: 13
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

Joined: Feb 27, 2002
Posts: 8919

Are you able to exceute the query in the update statement using normal database login? My guess is something is wrong in the query.


Groovy
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
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?


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I think the poster meant BMT and not BMP.
Rashika Khanna
Greenhorn

Joined: Aug 25, 2004
Posts: 13
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

Joined: Jul 04, 2003
Posts: 1312
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 ???


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
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 ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BMP transaction in DAO