hi,
i'm writing a portlet that will run in jboss (3.2.6). i have tested the portlet separately and it works with hibernate (2.1.8, i believe) just fine (connecting to mysql). the problem comes when i put the portlet in the portal.
the portal uses it's own database (oracle) and stores all the hibernate properties in system properties. i have my xml config file configured correctly and, i believe, loading correctly.
URL url = HibernateSessionFactory.class.getResource("/hibernate_test.cfg.xml");
log.info("Hibernate config file: " + url);
configuration = new Configuration().configure(url);
however, i keep getting oracle jdbc exceptions saying that the tables are not found. so i know that it's not using my configurations and it's still using the portal configurations.
from what i've read elsewhere, hibernate will look to the system properties, then to the xml config file, then to property files. i can clear out the system properties but then that causes all sorts of problems in the portal.
so my question is:
is there any way to force hibernate to look at a config file and ignore all datasources stored in the system properties?
thanks,
matt
|