users@glassfish.java.net

Re: Curious about this -- any explanation?

From: <glassfish_at_javadesktop.org>
Date: Fri, 08 Oct 2010 10:58:51 PDT

> Yes. You should create constructors that don't do
> anything and put
> every initialization logic into a method annotated
> with
> @PostConstruct

Thanks for the pointer. I think you have saved me from getting into trouble in the future.

>
> Also you should switch from System.out.println to a
> logger (e.g. Log4J)
> as System.out.println will slow down your system in
> production.

Understood. I would never put the System.out calls in production code -- but they are convenient for helping me learn how the container environment works. (case in point is this thread) I delete them all once I am done working on the code.
[Message sent by forum member 'alan94539']

http://forums.java.net/jive/thread.jspa?messageID=484790