Created
August 6, 2016 11:36
-
-
Save mjedynak/4f5b5f4bc8977c22c8f4fad8eb051d36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App { | |
private static final Logger logger = LoggerFactory.getLogger(App.class.getName()); | |
public static void main(String[] args) { | |
invoke(new DefaultService()); | |
logger.debug("----------------------\n"); | |
invoke(new LazyInitService()); | |
logger.debug("----------------------\n"); | |
invoke(LazyInitWithProxyServiceFactory.createService()); | |
logger.debug("----------------------\n"); | |
invoke(LazyInitWithProxyThreadSafeServiceFactory.createService()); | |
} | |
private static void invoke(Service service) { | |
logger.debug("Invoking method"); | |
logger.debug("Current time:" + service.getTime().toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment