* @param type A binding type.
* @return A {@link ClassDescriptorResolver} instance.
*/
public static ClassDescriptorResolver createClassDescriptorResolver(final BindingType type) {
if (type == BindingType.JDO) {
return new JDOClassDescriptorResolverImpl();
} else if (type == BindingType.XML) {
XMLClassDescriptorResolver resolver = new XMLClassDescriptorResolverImpl();
// for cases in which users really work with the factory only and not
// with any kind of InternalContext...
resolver.setResolverStrategy(new CastorXMLStrategy());