my dog learned polymorphism
The moose likes EJB and other Java EE Technologies and the fly likes delayed Commit in 9iAS???? 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 "delayed Commit in 9iAS????" Watch "delayed Commit in 9iAS????" New topic

delayed Commit in 9iAS????

syed mraza

Joined: Aug 23, 2001
Posts: 28
does any one know how to force 9iAS to commit the transactions before exiting the method? the problem in question is that i am using SessionEJB to retrieve and process and store some data using EntityEJB.
now it happens tht while storing the data it throws SQLException which it doesnt throw untill the whole processing is being done
while(iterator.hasNext() ){
printed("data saved");
}catch(SQLException e){
print("SQL EXception");
}//end of SessionMethod
So wht happens tht at a particular record whn it should throw SQLException and print "SQLException" it prints "data saved" and proceed to next record and when the iterator ends it throws the exception which is not caught in SQLException.
Any pointers, suggestions?
would realy appriciate ure help.
Thanks & Regards
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Actually I think this is more of an EJB question than specific to Oracle. So I am going to move this thread to the EJB forum.
Oracle can do commits whenever you want it to. But IN EJB there are two ways to do commits. One is letting the App Server/Container do it for you, the other is to use the Transaction package and manually handle transactions. This is where the EJB forum will help you out better.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
syed mraza

Joined: Aug 23, 2001
Posts: 28
Thanks mark for ure help.
Actualy its the container (9iAS) issue. I understand tht in EJB transactions can be container manged or user managed ( jusing JTA) and the container then commit accordingly.
in this particular case EJB transactions r container managed. my hunch is that their might be some setting or seomting in orion-ejb-jar.xml where one can let container know when to do the actual commit. something like timeout which we specify there.
i havent found out anything yet though. thanks for ure help anyways.
I agree. Here's the link:
subject: delayed Commit in 9iAS????
It's not a secret anymore!