1 package org
.argeo
.slc
.core
.execution
;
3 import org
.argeo
.api
.cms
.CmsLog
;
4 import org
.argeo
.slc
.SlcException
;
5 import org
.springframework
.beans
.factory
.InitializingBean
;
7 public class ExceptionIfInitCalledTwice
implements Runnable
, InitializingBean
{
8 private final static CmsLog log
= CmsLog
9 .getLog(ExceptionIfInitCalledTwice
.class);
11 private Boolean calledOnce
= false;
14 log
.info(getClass().getSimpleName() + " ran properly");
17 public void afterPropertiesSet() throws Exception
{
18 log
.info(getClass().getSimpleName() + " init method called");
21 throw new SlcException(getClass().getSimpleName()
22 + "init method called twice.");