[jboss-cvs] JBossAS SVN: r64282 - trunk/cluster/src/main/org/jboss/ha/jndi.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 25 16:36:40 EDT 2007
Author: jerrygauth
Date: 2007-07-25 16:36:40 -0400 (Wed, 25 Jul 2007)
New Revision: 64282
Modified:
trunk/cluster/src/main/org/jboss/ha/jndi/TreeHead.java
Log:
JBAS-4539, don't leak CacheException in HA-JNDI
Modified: trunk/cluster/src/main/org/jboss/ha/jndi/TreeHead.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jndi/TreeHead.java 2007-07-25 18:39:45 UTC (rev 64281)
+++ trunk/cluster/src/main/org/jboss/ha/jndi/TreeHead.java 2007-07-25 20:36:40 UTC (rev 64282)
@@ -158,9 +158,10 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
- throw ne;
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
+ throw ne;
}
int size = name.size();
@@ -193,8 +194,9 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
}
@@ -224,8 +226,9 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
@@ -257,8 +260,9 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
return result;
@@ -369,8 +373,9 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
return list;
@@ -438,8 +443,9 @@
}
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
return list;
@@ -490,8 +496,9 @@
m_cache.put(newf, new HashMap());
} catch (CacheException ce)
{
- NamingException ne = new NamingException();
- ne.setRootCause(ce);
+ // don't chain CacheException since JBoss Cache may not be on remote client's classpath
+ NamingException ne = new NamingException(ce.getClass().getName() + ": " + ce.getMessage());
+ ne.setStackTrace(ce.getStackTrace());
throw ne;
}
More information about the jboss-cvs-commits
mailing list