Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DatabaseConnection connection = World.getConnectionPool().nextFree();
- if (connection == null)
- return false;
- try {
- Statement stmt = connection.createStatement();
- ResultSet rs = stmt.executeQuery("");
- if (rs.next()) {
- return true;
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- if (connection != null) {
- connection.returnConnection();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement