• 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

do we need to close context in websphere

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Any body can tell me i am doing a connection pooling programe in websphere 3.0.2 and back end is DB2 as400

when i was writting a program i forgot close the connection context.close in my programe
do i need to close alway this context.
Because my connection pooling programe is faiiling , i could not able to find the reason. i think it may one reason.
can any body tell me do i need to close it(context.close())
I would appricate any bodys help
Thank YOu
Babu
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you mean close each Connection the answer is YES. Closing a connection returns it to the connection pool in the datasource. Otherwise, it will remain "used" until the reaper thread recovers it (the default timeout here is 30 minutes -- see the Websphere admin documentation on DataSource setup).
If you mean InitialContexts or Datasources, no you do not close them.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Evildoers! Eat my justice! And this tiny ad's justice too!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic