public class JndiConnectionProvider extends Object implements ConnectionProvider
Constructor and Description |
---|
JndiConnectionProvider() |
JndiConnectionProvider(String connectionPath,
String username,
String password) |
Modifier and Type | Method and Description |
---|---|
Connection |
createConnection(String user,
String password)
Although named getConnection() this method should always return a new connection when being queried or should wrap
the connection in a way so that calls to "close()" on that connection do not prevent subsequent calls to this
method to fail.
|
boolean |
equals(Object o) |
Object |
getConnectionHash() |
String |
getConnectionPath() |
String |
getPassword() |
String |
getUsername() |
int |
hashCode() |
void |
setConnectionPath(String connectionPath) |
void |
setPassword(String password) |
void |
setUsername(String username) |
public String getConnectionPath()
public void setConnectionPath(String connectionPath)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public Connection createConnection(String user, String password) throws SQLException
createConnection
in interface ConnectionProvider
user
- the user name.password
- the password.SQLException
- if the connection has errors.public Object getConnectionHash()
getConnectionHash
in interface ConnectionProvider