Patch hibernate code if you can not find Axis API to customize it:
CGLIBLazyInitializer.java
Code:
public static Class getProxyFactory(final Class persistentClass, Class[] interfaces)
throws HibernateException {
// note: interfaces is assumed to already contain HibernateProxy.class
try {
Enhancer en = new Enhancer();
en.setUseCache( true );
en.setCallbackTypes( CALLBACK_TYPES );
en.setCallbackFilter( FINALIZE_FILTER );
en.setSuperclass( interfaces.length == 1 ? persistentClass : null );
en.setInterfaces( interfaces );
[color=red] en.setNamingPolicy( new NamingPolicy(){
public String getClassName(String arg0, String arg1, Object arg2, Predicate arg3) {
return persistentClass.getName() + "$HibernateProxy";
}
});[/color] return en.createClass();
}
catch (Throwable t) {
LogFactory.getLog( BasicLazyInitializer.class )
.error( "CGLIB Enhancement failed: " + persistentClass.getName(), t );
throw new HibernateException( "CGLIB Enhancement failed: " + persistentClass.getName(), t );
}
}