1 22 package org.jboss.ejb3; 23 24 import java.util.Properties ; 25 import java.net.URL ; 26 27 33 public class DefaultPersistenceProperties 34 { 35 private Properties properties; 36 37 public DefaultPersistenceProperties() throws Exception 38 { 39 URL propsUrl = this.getClass().getClassLoader().getResource("META-INF/persistence.properties"); 40 properties = new Properties (); 41 properties.load(propsUrl.openStream()); 42 45 String bcprovider = properties.getProperty("hibernate.bytecode.provider", "javassist"); 46 System.setProperty("hibernate.bytecode.provider", bcprovider); 47 48 } 49 50 public Properties getProperties() 51 { 52 return properties; 53 } 54 55 } 56 | Popular Tags |