protected void info(Object object, Throwable t, Object... params) { log.info(object, t, params); }
protected void info(Object object, Object... params) { log.info(object, params); }
@Override public void process() throws ServletException, IOException, LoginException { try { doFilter(httpRequest, httpResponse, service); } catch (InvalidRequestException e) { httpResponse.setStatus(HttpServletResponse.SC_BAD_REQUEST); if (log.isInfoEnabled()) { log.info("Bad request received from {0} ({1})", e.getCause(), httpRequest.getRemoteHost(), e .getDescription()); } } } }.run();
public void fireOrderProcessedEvent() { log.info("SipFactory " + sipFactory); log.info("timerService " + timerService); log.info("*************** Fire ORDER_PROCESSED ***************************"); log.info("First Name = " + customerfullname); log.info("Phone = " + cutomerphone); log.info("orderId = " + orderId);
public void cancelOrder(long orderId) { Order order = (Order) em.createQuery( "select o from Order o where o.orderId = :orderId") .setParameter("orderId", orderId).getSingleResult(); order.setStatus(Order.Status.CANCELLED); ServletTimer deliveryDateTimer = (ServletTimer) Contexts.getApplicationContext().get("deliveryDateTimer" + orderId); ServletTimer adminTimer = (ServletTimer) Contexts.getApplicationContext().get("adminTimer" + orderId); if(deliveryDateTimer!=null) { deliveryDateTimer.cancel(); Contexts.getApplicationContext().remove("deliveryDateTimer" + orderId); log.info("Delivery Timer for order "+ orderId +" cancelled"); } else { log.info("No Delivery Timer to cancel"); } if(adminTimer!=null) { adminTimer.cancel(); Contexts.getApplicationContext().remove("adminTimer" + orderId); log.info("Admin Timer for order "+ orderId +" cancelled"); } else { log.info("No Admin Timer to cancel"); } }
public void fireBeforeOrderProcessedEvent() log.info( "***************Fire BEFORE_ORDER_PROCESSED . Custom event to call user to set date ***************************" ); log.info( "Customer Name = " + customerfullname); log.info( "Phone = " + cutomerphone); log.info( "orderId = " + orderId); log.info( "Amount = " + amount);
@Create public void create() { jbossMBeanServer = locateJBoss(); if (!isJBoss()) { return; } try { clusteringCacheObjectName = new ObjectName("jboss.cache:service=TomcatClusteringCache"); serverObjectName = new ObjectName("jboss.system:type=Server"); } catch (MalformedObjectNameException e) { log.warn("Invalid JMX name: " + e.getMessage()); } try { jbossMBeanServer.getMBeanInfo(clusteringCacheObjectName); clustered = true; log.info("JBoss cluster detected"); } catch (Exception e) {} }
log.info("registering built-in RESTEasy providers"); RegisterBuiltin.register(getDispatcher().getProviderFactory());
@Override public void encodeBegin(FacesContext facesContext) throws IOException { log.info("Loading template #0", getURL()); if (getURL().indexOf("://") < 0) { reader = new PdfReader(ResourceLoader.instance().getResourceAsStream(getURL())); } else { reader = new PdfReader(new URL(getURL())); } buffer = new ByteArrayOutputStream(); try { stamper = new PdfStamper(reader, buffer); Contexts.getEventContext().set(STAMPER_KEY, stamper); } catch (DocumentException e) { throw new FacesException("Could not create PDF stamper", e); } fields = stamper.getAcroFields(); Contexts.getEventContext().set(FIELDS_KEY, fields); }
@Create public void init() { log.info("bootstrapping JAX-RS application"); // Custom ResteasyProviderFactory that understands Seam component lookup at runtime SeamResteasyProviderFactory providerFactory = createProviderFactory(); dispatcher = createDispatcher(providerFactory); initDispatcher(); // Always use the "deployment sensitive" factory - that means it is handled through ThreadLocal, not static // TODO: How does that actually work? It's never used because the dispatcher is created with the original one SeamResteasyProviderFactory.setInstance(new ThreadLocalResteasyProviderFactory(providerFactory)); // Put Providers, Registry and Dispatcher into RESTEasy context. dispatcher.getDefaultContextObjects().put(Providers.class, providerFactory); dispatcher.getDefaultContextObjects().put(Registry.class, dispatcher.getRegistry()); dispatcher.getDefaultContextObjects().put(Dispatcher.class, dispatcher); Map contextDataMap = SeamResteasyProviderFactory.getContextDataMap(); contextDataMap.putAll(dispatcher.getDefaultContextObjects()); // Seam can scan the classes for us, we just have to list them in META-INF/seam-deployment.properties DeploymentStrategy deployment = (DeploymentStrategy) Component.getInstance("deploymentStrategy"); AnnotationDeploymentHandler handler = (AnnotationDeploymentHandler) deployment.getDeploymentHandlers().get(AnnotationDeploymentHandler.NAME); Collection<Class<?>> providers = findProviders(handler); Collection<Class<?>> resources = findResources(handler); Collection<Component> seamComponents = findSeamComponents(); registerProviders(seamComponents, providers); registerResources(seamComponents, resources); }
log.info("waiting to get the SDP from Media Server before sending the INVITE to " + callerAddress + "@" + callerDomain); MediaGroup mg = mediaSession.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR); sipServletRequest.getSession().setAttribute("customerName", customerName);
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) public void call() { log.info("the phone number to call is " + phoneNumber); String customerPhone = "sip:" + phoneNumber + "@" + (String)Contexts.getApplicationContext().get("caller.domain");; try {