final String adapterClass = deploymentUnit.getAttachment(JpaAttachments.ADAPTOR_CLASS_NAME);
PersistenceProviderAdaptor adaptor = null;
if (adapterClass != null) {
try {
adaptor = (PersistenceProviderAdaptor) deploymentModuleClassLoader.loadClass(adapterClass).newInstance();
adaptor.injectJtaManager(JtaManagerImpl.getInstance());
deploymentUnit.putAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_PROVIDER, new PersistenceProviderDeploymentHolder(providerList, adaptor));
} catch (InstantiationException e) {
throw MESSAGES.cannotCreateAdapter(e, adapterClass);
} catch (IllegalAccessException e) {
throw MESSAGES.cannotCreateAdapter(e, adapterClass);