public void afterPropertiesSet() throws Exception { environment = EnvironmentFactory.newEnvironment(); if (entityManagerFactory != null) { environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, entityManagerFactory); } if (transactionManager != null) { environment.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager); } if (globals != null) { environment.set(EnvironmentName.GLOBALS, globals); } if (calendars != null) { environment.set(EnvironmentName.CALENDARS, calendars); } if (objectMarshallersOrder != null && !objectMarshallersOrder.isEmpty()) { List<ObjectMarshallingStrategy> strategies = getStrategies(); environment.set(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES, strategies.toArray(new ObjectMarshallingStrategy[]{})); } if (appScopedEntityManager != null) { environment.set(EnvironmentName.APP_SCOPED_ENTITY_MANAGER, appScopedEntityManager); } if (cmdScopedEntityManager != null) { environment.set(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, cmdScopedEntityManager); } }
public void afterPropertiesSet() throws Exception { environment = EnvironmentFactory.newEnvironment(); if (entityManagerFactory != null) { environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, entityManagerFactory); } if (transactionManager != null) { environment.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager); } if (globals != null) { environment.set(EnvironmentName.GLOBALS, globals); } if (calendars != null) { environment.set(EnvironmentName.CALENDARS, calendars); } if (objectMarshallersOrder != null && !objectMarshallersOrder.isEmpty()) { List<ObjectMarshallingStrategy> strategies = getStrategies(); environment.set(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES, strategies.toArray(new ObjectMarshallingStrategy[]{})); } if (appScopedEntityManager != null) { environment.set(EnvironmentName.APP_SCOPED_ENTITY_MANAGER, appScopedEntityManager); } if (cmdScopedEntityManager != null) { environment.set(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, cmdScopedEntityManager); } }