[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...
Galder Zamarreno
galder.zamarreno at jboss.com
Wed Jan 17 13:53:29 EST 2007
User: gzamarreno
Date: 07/01/17 13:53:29
Modified: src/org/jboss/cache/loader JDBCCacheLoader.java
Log:
[JBCACHE-802] SQLExceptions generated in JDBCCacheLoader hides the original Exception which is wrong! Changed so that the original exceptions are thrown back. JDBCCacheLoaderTest improved so that with reasonable little effort, you can run the tests getting DataSource from AS. Added jndi.properties to help here, but commented out for general purpouse. Added table properties for Hypersonic to cache-jdbc.properties. Client AS library missing as I'm temporarily using jbossall-client.jar. This should be sorted soon.
Revision Changes Path
1.29 +5 -5 JBossCache/src/org/jboss/cache/loader/JDBCCacheLoader.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: JDBCCacheLoader.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/JDBCCacheLoader.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- JDBCCacheLoader.java 15 Jan 2007 18:10:55 -0000 1.28
+++ JDBCCacheLoader.java 17 Jan 2007 18:53:29 -0000 1.29
@@ -77,7 +77,7 @@
* @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
* @author <a href="mailto:hmesha at novell.com">Hany Mesha </a>
* @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
- * @version <tt>$Revision: 1.28 $</tt>
+ * @version <tt>$Revision: 1.29 $</tt>
*/
public class JDBCCacheLoader extends AbstractCacheLoader
{
@@ -830,7 +830,7 @@
}
catch (Exception e)
{
- throw new SQLException("Unable to load to deserialize result: " + e);
+ throw new Exception("Unable to load to deserialize result: ", e);
}
finally
{
@@ -839,10 +839,10 @@
}
}
}
- catch (SQLException e)
+ catch (Exception e)
{
- log.error("Failed to load node for fqn " + name + ": " + e.getMessage(), e);
- throw new IllegalStateException("Failed to load node for fqn " + name + ": " + e.getMessage());
+ log.error("Failed to load node for fqn " + name + ": ", e);
+ throw new IllegalStateException("Failed to load node for fqn " + name + ":", e);
}
finally
{
More information about the jboss-cvs-commits
mailing list