• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

delayed Commit in 9iAS????

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic