Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

delayed Commit in 9iAS????

 
syed mraza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
syed mraza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic