Spring Framework ResourceOverridingShadowingClassLoader - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ResourceOverridingShadowingClassLoader class.

This code example shows how to use the following methods:override, excludePackage
	 */ 
	public static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml";
 
 
	public OrmXmlOverridingShadowingClassLoader(ClassLoader loader, String realOrmXmlLocation) {
		super(loader);
 
		// Automatically exclude classes from these well-known persistence providers. 
		// Do NOT exclude Hibernate classes -- 
		// this causes class casts due to use of CGLIB by Hibernate. 
		// Same goes for OpenJPA which will not enhance the domain classes. 
		excludePackage("oracle.toplink.essentials");
		excludePackage("junit");
 
		override(DEFAULT_ORM_XML_LOCATION, realOrmXmlLocation);
	} 
 
} 
8
CodeRank
This code example shows how to use the following methods:override, excludePackage
import org.springframework.context.ConfigurableApplicationContext; 
import org.springframework.context.support.GenericApplicationContext; 
import org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver; 
import org.springframework.instrument.classloading.LoadTimeWeaver; 
import org.springframework.instrument.classloading.ResourceOverridingShadowingClassLoader; 
import org.springframework.instrument.classloading.ShadowingClassLoader; 
import org.springframework.orm.jpa.ExtendedEntityManagerCreator; 
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; 
import org.springframework.orm.jpa.SharedEntityManagerCreator; 
import org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager; 
import org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests; 
import org.springframework.util.StringUtils; 
 
/** 
 * This class is only used within tests in the spring-orm module. 
 * 
 * <p>Convenient support class for JPA-related tests. Offers the same contract as 
 * AbstractTransactionalDataSourceSpringContextTests and equally good performance, 
 * even when performing the instrumentation required by the JPA specification. 
 * 
6
CodeRank
See Code Examples for Spring Framework ResourceOverridingShadowingClassLoader Methods: