/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // START CR 6411114 if (started) // Ignore multiple starts return; super.start(); // END CR 6411114 if (debug >= 1) log(rb.getString(LogFacade.START_COMPONENT_INFO)); }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // START CR 6411114 if (started) // Ignore multiple starts return; super.start(); // END CR 6411114 // Initialize the timeZone, Date formatters, and currentDate timeZone = calculateTimeZoneOffset(DEFAULT_TIME_ZONE.getRawOffset()); if (fileDateFormat==null || fileDateFormat.length()==0) fileDateFormat = "yyyy-MM-dd"; dateFormatter = new ThreadLocal<SimpleDateFormat>() { @Override protected SimpleDateFormat initialValue() { SimpleDateFormat f = new SimpleDateFormat(fileDateFormat); f.setTimeZone(DEFAULT_TIME_ZONE); return f; } }; currentDate = new Date(); dateStamp = dateFormatter.get().format(currentDate); open(); }