/** Try to share the connection. */ boolean share(UserPoolItem userPoolItem) { if (this == userPoolItem.getOwnPoolItem()) return true; else if (_mConn == null) // already closed return false; else if (!_cm.isShareable()) // not shareable return false; else if (_mcf != userPoolItem.getManagedConnectionFactory()) return false; else if (_subject != userPoolItem.getSubject()) return false; else if (_requestInfo != userPoolItem.getInfo()) return false; else if (_hasConnectionError) // had a fatal error return false; // skip for now if (true) return false; userPoolItem.associate(this, _mcf, _subject, _requestInfo); return true; }