Author: bdaw
Date: 2007-11-11 15:40:50 -0500 (Sun, 11 Nov 2007)
New Revision: 8866
Modified:
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java
Log:
beware of hardcoded values...
Modified:
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java
===================================================================
---
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java 2007-11-11
19:19:12 UTC (rev 8865)
+++
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/HibernateSupport.java 2007-11-11
20:40:50 UTC (rev 8866)
@@ -412,11 +412,11 @@
}
}
- public synchronized static Config getConfig(String name) throws Exception
+ public synchronized static Config getConfig(String name, String hibernates) throws
Exception
{
if (configs == null)
{
- URL url =
Thread.currentThread().getContextClassLoader().getResource("hibernates.xml");
+ URL url =
Thread.currentThread().getContextClassLoader().getResource(hibernates);
configs = fromXML(url);
// Remove and merge default with all
@@ -439,4 +439,9 @@
//
return (Config)configs.get(name);
}
+
+ public synchronized static Config getConfig(String name) throws Exception
+ {
+ return getConfig(name, "hibernates.xml");
+ }
}
Show replies by date