environment.setContext(transactionContext);
EnvironmentImpl.pushEnvironment(environment);
try {
// finish the creation of the environment wire context
transactionContext.create();
} catch (RuntimeException e) {
EnvironmentImpl.popEnvironment();
throw e;
}