1 22 package org.jboss.resource.connectionmanager; 23 24 import javax.resource.ResourceException ; 25 import javax.resource.spi.ConnectionEventListener ; 26 import javax.resource.spi.ManagedConnection ; 27 import javax.transaction.SystemException ; 28 29 37 public interface ConnectionListener extends ConnectionEventListener 38 { 39 40 public static final int NORMAL = 0; 41 42 43 public static final int DESTROY = 1; 44 45 46 public static final int DESTROYED = 2; 47 48 53 ManagedConnection getManagedConnection(); 54 55 60 ManagedConnectionPool getManagedConnectionPool(); 61 62 70 void tidyup() throws ResourceException ; 71 72 77 Object getContext(); 78 79 84 int getState(); 85 86 89 void setState(int newState); 90 91 97 boolean isTimedOut(long timeout); 98 99 102 void used(); 103 104 109 void registerConnection(Object handle); 110 111 116 void unregisterConnection(Object handle); 117 118 123 boolean isManagedConnectionFree(); 124 125 128 void enlist() throws SystemException ; 129 130 133 void delist() throws ResourceException ; 134 135 140 boolean isTrackByTx(); 141 142 147 void setTrackByTx(boolean trackByTx); 148 149 154 boolean hasPermit(); 155 156 161 void grantPermit(boolean value); 162 163 168 long getLastValidatedTime(); 169 170 171 176 void setLastValidatedTime(long interval); 177 } 178 | Popular Tags |