Java 类javax.sql.StatementEvent 实例源码
项目:the-vigilantes
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:OpenVertretung
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:lams
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:ProyectoPacientes
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:BibliotecaPS
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:Geometry-wars
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:TPKB
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:cloudera-cli-scripts
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:cassandra-jdbc-wrapper
文件:PooledCassandraConnection.java
void statementClosed(CassandraPreparedStatement preparedStatement)
{
StatementEvent event = new StatementEvent(this, preparedStatement);
for (StatementEventListener listener : statementEventListeners)
{
listener.statementClosed(event);
}
String cql = preparedStatement.getCql();
Set<CassandraPreparedStatement> freeStatements = freePreparedStatements.get(cql);
Set<CassandraPreparedStatement> usedStatements = usedPreparedStatements.get(cql);
usedStatements.remove(preparedStatement);
preparedStatement.resetResults();
try
{
preparedStatement.clearParameters();
freeStatements.add(preparedStatement);
}
catch (SQLException e)
{
logger.error(e.getMessage());
}
}
项目:cassandra-jdbc-wrapper
文件:PooledCassandraConnection.java
void statementErrorOccurred(CassandraPreparedStatement preparedStatement, SQLException sqlException)
{
StatementEvent event = new StatementEvent(this, preparedStatement, sqlException);
for (StatementEventListener listener : statementEventListeners)
{
listener.statementErrorOccurred(event);
}
String cql = preparedStatement.getCql();
Set<CassandraPreparedStatement> usedStatements = usedPreparedStatements.get(cql);
if (!(event.getSQLException() instanceof SQLRecoverableException))
{
preparedStatement.close();
usedStatements.remove(preparedStatement);
}
}
项目:SMPT42
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:group-five
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:locaviewer
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:locaviewer
文件:JDBC4PreparedStatementWrapper.java
public synchronized void close() throws SQLException {
if (this.pooledConnection == null) {
// no-op
return;
}
MysqlPooledConnection con = this.pooledConnection; // we need this later...
try {
super.close();
} finally {
try {
StatementEvent e = new StatementEvent(con, this);
// todo: pull this all up into base classes when we support *only* JDK6 or newer
if (con instanceof JDBC4MysqlPooledConnection) {
((JDBC4MysqlPooledConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4MysqlXAConnection) {
((JDBC4MysqlXAConnection) con).fireStatementEvent(e);
} else if (con instanceof JDBC4SuspendableXAConnection) {
((JDBC4SuspendableXAConnection) con).fireStatementEvent(e);
}
} finally {
this.unwrappedInterfaces = null;
}
}
}
项目:clearpool
文件:StatementHandler.java
private void close() throws SQLException {
try {
this.statement.close();
} catch (SQLException e) {
this.handleException(e);
}
this.pooledConnection.removeStatement(this.statement);
if (this.statement instanceof PreparedStatement) {
List<StatementEventListener> statementEventListeners =
this.pooledConnection.getStatementEventListeners();
if (statementEventListeners != null) {
StatementEvent event =
new StatementEvent(this.pooledConnection, (PreparedStatement) this.statement);
for (StatementEventListener listener : statementEventListeners) {
listener.statementClosed(event);
}
}
}
}
项目:the-vigilantes
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:the-vigilantes
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:the-vigilantes
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:OpenVertretung
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:OpenVertretung
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:OpenVertretung
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:lams
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:lams
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:lams
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:ProyectoPacientes
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:ProyectoPacientes
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:ProyectoPacientes
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:BibliotecaPS
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:BibliotecaPS
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:BibliotecaPS
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:gemfirexd-oss
文件:ClientPooledConnection40.java
/**
*
* Raise the statementClosed event for all the listeners when the
* corresponding events occurs.
*
* @param statement The PreparedStatement that was closed
*
*/
public void onStatementClose(PreparedStatement statement) {
if (!statementEventListeners.isEmpty()) {
StatementEvent event = new StatementEvent(this,statement);
for (StatementEventListener l : statementEventListeners) {
l.statementClosed(event);
}
}
}
项目:gemfirexd-oss
文件:ClientXAConnection40.java
/**
* Raise the statementClosed event for all the listeners when the
* corresponding events occurs
* @param statement The PreparedStatement that was closed
*/
public void onStatementClose(PreparedStatement statement) {
if (!statementEventListeners.isEmpty()) {
StatementEvent event = new StatementEvent(this,statement);
for (StatementEventListener l : statementEventListeners) {
l.statementClosed(event);
}
}
}
项目:gemfirexd-oss
文件:EmbedPooledConnection40.java
/**
* Raise the statementClosed event for all the listeners when the
* corresponding events occurs
* @param statement PreparedStatement
*/
public void onStatementClose(PreparedStatement statement) {
if (!statementEventListeners.isEmpty()){
StatementEvent event = new StatementEvent(this,statement);
for (StatementEventListener l : statementEventListeners) {
l.statementClosed(event);
}
}
}
项目:gemfirexd-oss
文件:EmbedPooledConnection40.java
/**
* Raise the statementErrorOccurred event for all the listeners when the
* corresponding events occurs
* @param statement PreparedStatement
* @param sqle SQLException
*/
public void onStatementErrorOccurred(PreparedStatement statement,SQLException sqle) {
if (!statementEventListeners.isEmpty()){
StatementEvent event = new StatementEvent(this,statement,sqle);
for (StatementEventListener l : statementEventListeners) {
l.statementErrorOccurred(event);
}
}
}
项目:gemfirexd-oss
文件:EmbedXAConnection40.java
/**
* Raise the statementClosed event for all the listeners when the
* corresponding events occurs
* @param statement PreparedStatement
*/
public void onStatementClose(PreparedStatement statement) {
if (!statementEventListeners.isEmpty()){
StatementEvent event = new StatementEvent(this,statement);
for (StatementEventListener l : statementEventListeners) {
l.statementClosed(event);
}
}
}
项目:gemfirexd-oss
文件:EmbedXAConnection40.java
/**
* Raise the statementErrorOccurred event for all the listeners when the
* corresponding events occurs
* @param statement PreparedStatement
* @param sqle SQLException
*/
public void onStatementErrorOccurred(PreparedStatement statement,SQLException sqle) {
if (!statementEventListeners.isEmpty()){
StatementEvent event = new StatementEvent(this,statement,sqle);
for (StatementEventListener l : statementEventListeners) {
l.statementErrorOccurred(event);
}
}
}
项目:Geometry-wars
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:Geometry-wars
文件:JDBC4SuspendableXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:Geometry-wars
文件:JDBC4MysqlPooledConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}
项目:TPKB
文件:JDBC4MysqlXAConnection.java
void fireStatementEvent(StatementEvent event) throws SQLException {
synchronized (this.statementEventListeners) {
for (StatementEventListener listener : this.statementEventListeners.keySet()) {
listener.statementClosed(event);
}
}
}