[Jboss-cvs] JBossAS SVN: r55007 - branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 1 20:54:33 EDT 2006
Author: weston.price at jboss.com
Date: 2006-08-01 20:54:32 -0400 (Tue, 01 Aug 2006)
New Revision: 55007
Added:
branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/NullStaleConnectionChecker.java
branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionChecker.java
branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionException.java
Log:
[JBAS-3453] StaleConnection checker patch implementation.
Added: branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/NullStaleConnectionChecker.java
===================================================================
--- branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/NullStaleConnectionChecker.java 2006-08-02 00:53:42 UTC (rev 55006)
+++ branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/NullStaleConnectionChecker.java 2006-08-02 00:54:32 UTC (rev 55007)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.resource.adapter.jdbc;
+
+import java.sql.SQLException;
+
+/**
+ * A NullStaleConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 46532 $
+ */
+public class NullStaleConnectionChecker implements StaleConnectionChecker
+{
+
+ public boolean isStaleConnection(SQLException e)
+ {
+ return false;
+ }
+
+}
Added: branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionChecker.java
===================================================================
--- branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionChecker.java 2006-08-02 00:53:42 UTC (rev 55006)
+++ branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionChecker.java 2006-08-02 00:54:32 UTC (rev 55007)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.resource.adapter.jdbc;
+
+import java.sql.SQLException;
+
+/**
+ * A StaleConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 46533 $
+ */
+public interface StaleConnectionChecker
+{
+
+ /**
+ * Is the connection stale
+ *
+ * @param e the <code>java.sql.SQLException</code>
+ * @return is the connection stale
+ */
+ public boolean isStaleConnection(SQLException e);
+
+}
Added: branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionException.java
===================================================================
--- branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionException.java 2006-08-02 00:53:42 UTC (rev 55006)
+++ branches/JBoss_4_0_3_SP1_JBAS_3453/connector/src/main/org/jboss/resource/adapter/jdbc/StaleConnectionException.java 2006-08-02 00:54:32 UTC (rev 55007)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.resource.adapter.jdbc;
+
+import java.sql.SQLException;
+
+/**
+ * A StaleConnectionException.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 46533 $
+ */
+public class StaleConnectionException extends SQLException
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -2789276182969659546L;
+
+ public StaleConnectionException(SQLException e)
+ {
+ super(e.getMessage(), e.getSQLState(), e.getErrorCode());
+
+ }
+
+ public StaleConnectionException()
+ {
+ super();
+ }
+
+ public StaleConnectionException(String reason, String SQLState, int vendorCode)
+ {
+ super(reason, SQLState, vendorCode);
+ }
+
+ public StaleConnectionException(String reason, String SQLState)
+ {
+ super(reason, SQLState);
+ }
+
+ public StaleConnectionException(String reason)
+ {
+ super(reason);
+
+ }
+
+}
More information about the jboss-cvs-commits
mailing list