• 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

Resource Adapter: asking container to throw connections whenever IOError occurs?

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm writing a Resource Adapter (Connector), and would like to rely on my container (currently, Websphere or Jboss) to pool my connections.
However, whenever there's a communication error (IOException), i'd like to report it back to the container, and ask it to throw the connection away from the pool and not re-use it.... can this be done ?

In detail:
I'm writing a Resource Adapter, providing customized connections to our legacy system.
I'm hoping the container (its ConnectionManager) will manage the pool for me.

Now, my connections may sometimes throw IOException, indicating errors in the communication channel. I can easily arrange it so that my Connection (and ManagedConnection) knows about every such error, and can report it to whoever needs to know...
But how exactly do I report it back to the container/ConnectionMananger ? And how do I tell it to remove the erronous connection from the pool ?

Thanx
 
reply
    Bookmark Topic Watch Topic
  • New Topic