title: Singleton Enum implementation with parameters
body: <p>I am trying to implement a Singleton with Java enum.</p>
  
  <p>But I also want to pass some parameters to the constructor when it is initialized for the first time.</p>
  
  <p>How do I achieve that? Is it a good practice to have Singletons with parameter?</p>
  
  <pre><code>public enum DaoManager {
      INSTANCE;
      private static ILog logger; //for passing the logger;
      private static DatabasePool pool; //passing the Database pool
  
      public void init(ILog logger, DatabasePool pool){
            this.logger = logger;
            this.pool = pool;   
      }
  
   }
  </code></pre>
  
  <p>Right now I am using a init method to pass the logger and database pool to DaoManager.</p>
  
  <p>But if client fails to invoke the init() method then there a good chance of failure.</p>
  
  <p>Can someone please guide me on how do I do this?</p>