This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes JBoss JCA 1.5 - how do I return my connections to the connection pool? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss JCA 1.5 - how do I return my connections to the connection pool?" Watch "JBoss JCA 1.5 - how do I return my connections to the connection pool?" New topic
Author

JBoss JCA 1.5 - how do I return my connections to the connection pool?

Kevin Halk
Greenhorn

Joined: Feb 09, 2010
Posts: 10
Hello,
I am implementing my own JCA 1.5 resource adapter in JBoss 5.1. I have used Iron Jacamar to auto-generate corresponding skeleton code for JCA 1.5.

My question is, where/how do I actually return the connection to the connection pool?

From the end user's perspective, this would entail something like connect.close(), however I'm not sure where exactly in the JCA stuff I'm supposed to handle this. Somewhere in the the ManagedConnection I'm assuming? There are two functions destroy and cleanup however there is no implemention for them and they sound like they actually physically close the connection.

Also wouldn't I need to somehow call a function on the connection pool to let it know? This may be accomplished by triggering an event to a listener but again I'm not sure the details of implementing this or where it should occur.

Thank you!
Kevin
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I've never looked a connection pools from the other side of the fence. Perhaps if you looked at how JBoss AS does this for data sources, you could mimic that. I'm not sure where the exact source code is, but I would write a simple app that opened a datasource and printed out the full classpath for the class returned by JNDI when I look it up. The source for that class, and its close() method, should provide some clues.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss JCA 1.5 - how do I return my connections to the connection pool?
 
Similar Threads
JCA 1.5 - how do I return my connections to the connection pool?
JCA Connector question
how we should return a connection to connectio pool
apache commons pool: out of memory
Resource Adapter: asking container to throw connections whenever IOError occurs?