The moose likes EJB and other Java EE Technologies and the fly likes Resource Adapter: asking container to throw connections whenever IOError occurs? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Resource Adapter: asking container to throw connections whenever IOError occurs?" Watch "Resource Adapter: asking container to throw connections whenever IOError occurs?" New topic
Author

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

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 310
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Resource Adapter: asking container to throw connections whenever IOError occurs?
 
Similar Threads
This Weeks Giveaway
Disabling JCA connection pooling on WAS5
Interface reuse
Best way to track down connection leak
connection pooling