SimpleConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET);
DeploymentContext context = new DeploymentContext(basedir, null, environment, null, ConfigurationModuleType.CAR, new Jsr77Naming(), configurationManager, Collections.EMPTY_SET);
Enhancer enhancer = new Enhancer();
enhancer.setInterfaces(new Class[]{DataSource.class});
enhancer.setCallbackType(MethodInterceptor.class);
enhancer.setStrategy(new DefaultGeneratorStrategy() {
public byte[] transform(byte[] b) {
classBytes = b;
return b;
}
});