public void contextInitialized(ServletContextEvent event) { log.info( "Welcome to Mock Seam " + Seam.getVersion() ); event.getServletContext().setAttribute( Seam.VERSION, Seam.getVersion() ); servletContext = event.getServletContext(); // Sabotage Mojarra initialization. // This is required as Mojarra will attempt to initialize even if there is no FacesServlet configured in web.xml servletContext.removeAttribute("com.sun.faces.facesInitializerMappingsAdded"); }
public void info(Object object, Object... params) { if ( isInfoEnabled() ) { log.info( interpolate(object, params) ); } } public void info(Object object, Throwable t, Object... params)
public void info(Object object, Throwable t, Object... params) { if ( isInfoEnabled() ) { log.info( interpolate(object, params), t ); } } public void warn(Object object, Object... params)
public void contextInitialized(ServletContextEvent event) { log.info( "Welcome to Seam " + Seam.getVersion() ); event.getServletContext().setAttribute( Seam.VERSION, Seam.getVersion() ); ServletLifecycle.beginApplication( event.getServletContext() ); new Initialization( event.getServletContext() ).create().init(); }
private void installScannedComponentAndRoles(Class<?> scannedClass) { try { if ( scannedClass.isAnnotationPresent(Name.class) ) { addComponentDescriptor( new ComponentDescriptor(scannedClass) ); } if ( scannedClass.isAnnotationPresent(Role.class) ) { installRole( scannedClass, scannedClass.getAnnotation(Role.class) ); } if ( scannedClass.isAnnotationPresent(Roles.class) ) { Role[] roles = scannedClass.getAnnotation(Roles.class).value(); for (Role role : roles) { installRole(scannedClass, role); } } } catch(TypeNotPresentException e) { log.info("Failed to install "+scannedClass.getName()+": "+e.getMessage()); } }
log.info("two components with same name, higher precedence wins: " + name);
private Properties loadFromResource(String resource) { Properties props = new Properties(); InputStream stream = Resources.getResourceAsStream(resource, servletContext); if (stream != null) { try { log.info("reading properties from: " + resource); try { props.load(stream); } catch (IOException ioe) { log.error("could not read " + resource, ioe); } } finally { Resources.closeStream(stream); } } else { log.debug("not found: " + resource); } return props; }
public void init(FilterConfig filterConfig) throws ServletException { Lifecycle.setupApplication(new ServletApplicationMap(filterConfig.getServletContext())); try { filters = getSortedFilters(); for ( Filter filter : filters ) { log.info( "Initializing filter: " + Component.getComponentName(filter.getClass())); filter.init(filterConfig); } } finally { Lifecycle.cleanupApplication(); } }
private void initComponentsFromXmlDocument(String resource) { InputStream stream = Resources.getResourceAsStream(resource, servletContext); if (stream != null) { log.info("reading " + resource); try { installComponentsFromXmlElements( XML.getRootElement(stream), getReplacements() ); } catch (Exception e) { throw new RuntimeException("error while reading /WEB-INF/components.xml", e); } finally { Resources.closeStream(stream); } } }
break; case info: log.info("handled and logged exception", e); break; case debug:
getJndiName(applicationContext) : componentJndiName; log.info( "Component: " + getName() + ", scope: " + getScope() +