[jboss-user] [JCA/JBoss] - Re: Problem with writing JCA adapter
LGSW_Sam
do-not-reply at jboss.com
Fri Dec 1 01:49:36 EST 2006
Hi Weston!
I also noticed that my matchManagedConnections(Set connections, Subject subject, ConnectionRequestInfo info)
connections.size() is always 1..
I have checked that I do get connections.
Here is my cleanup and destroy methods.
|
| private AbstractProtocolHandler handler;
| private Vector <Object> handles;
|
| // Goes throu every item in handles and sets value of valid to false
| public void cleanup() throws ResourceException {
| synchronized (this) {
| for (Iterator it = handles.iterator(); it.hasNext(); )
| {
| Invalidatable i = (Invalidatable)it.next();
| i.invalidate();
| }
| handles = new Vector();
| attributes = new HashMap();
| }
| }
|
| public void invalidate() {
| setValid(false);
| }
|
| // Sets value of closing to true and if there is handler then disconnects its connection.
| public void destroy() throws ResourceException {
| synchronized (this) {
| this.closing = true;
| if (handler != null) {
| try {
| handler.disconnect();
| } catch (ProtocolHandlerException e) {
| e.printStackTrace();
| }
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990363#3990363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990363
More information about the jboss-user
mailing list