Lines 63-68
Link Here
|
63 |
import org.apache.naming.ResourceLinkRef; |
63 |
import org.apache.naming.ResourceLinkRef; |
64 |
import org.apache.naming.ResourceRef; |
64 |
import org.apache.naming.ResourceRef; |
65 |
import org.apache.naming.TransactionRef; |
65 |
import org.apache.naming.TransactionRef; |
|
|
66 |
import org.apache.tomcat.dbcp.dbcp.BasicDataSource; |
66 |
|
67 |
|
67 |
|
68 |
|
68 |
/** |
69 |
/** |
Lines 261-266
Link Here
|
261 |
if (!initialized) |
262 |
if (!initialized) |
262 |
return; |
263 |
return; |
263 |
|
264 |
|
|
|
265 |
ContextResource[] cr = namingResources.findResources(); |
266 |
for (int i = 0; i < cr.length; i++) { |
267 |
try { |
268 |
Object resource = envCtx.lookup(cr[i].getName()); |
269 |
if (resource instanceof BasicDataSource) { |
270 |
((BasicDataSource) resource).close(); |
271 |
} |
272 |
} catch (Exception e) { |
273 |
logger.error(sm.getString("naming.resourceReleaseFailed", e)); |
274 |
} |
275 |
} |
264 |
// Setting the context in read/write mode |
276 |
// Setting the context in read/write mode |
265 |
ContextAccessController.setWritable(getName(), container); |
277 |
ContextAccessController.setWritable(getName(), container); |
266 |
ContextBindings.unbindContext(container, container); |
278 |
ContextBindings.unbindContext(container, container); |