aspose file tools*
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
Author

delayed Commit in 9iAS????

syed mraza
Greenhorn

Joined: Aug 23, 2001
Posts: 28
Hi
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
SessionEJBMethod{
while(iterator.hasNext() ){
try{
entityEJB.store();
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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

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.
Thanks
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
syed mraza
Greenhorn

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.
regards
 
Consider Paul's rocket mass heater.
 
subject: delayed Commit in 9iAS????