private synchronized void init(WebModule wm) {
if (initialized) {
return;
}
ServerContext serverContext = wm.getServerContext();
if (serverContext == null) {
String msg = _rb.getString(NO_SERVER_CONTEXT);
msg = MessageFormat.format(msg, wm.getName());
throw new IllegalStateException(msg);
}
ServiceLocator services = serverContext.getDefaultServices();
im = services.getService(InvocationManager.class);
tm = getJavaEETransactionManager(services);
injectionMgr = services.getService(InjectionManager.class);
initialized = true;
securityContext = serverContext.getDefaultServices().getService(AppServSecurityContext.class);
if (securityContext != null) {
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, SECURITY_CONTEXT_OBTAINED, securityContext);
}
} else {