1 package org
.argeo
.slc
.core
.execution
;
3 import org
.apache
.commons
.logging
.Log
;
4 import org
.apache
.commons
.logging
.LogFactory
;
5 import org
.argeo
.slc
.SlcException
;
6 import org
.springframework
.beans
.factory
.InitializingBean
;
8 public class ExceptionIfInitCalledTwice
implements Runnable
, InitializingBean
{
9 private final static Log log
= LogFactory
10 .getLog(ExceptionIfInitCalledTwice
.class);
12 private Boolean calledOnce
= false;
15 log
.info(getClass().getSimpleName() + " ran properly");
18 public void afterPropertiesSet() throws Exception
{
19 log
.info(getClass().getSimpleName() + " init method called");
22 throw new SlcException(getClass().getSimpleName()
23 + "init method called twice.");