2014-01-27

Introduction to Singleton pattern(example with jdbc/sqlserver)


11 comments:

  1. Simply described...:-)

    ReplyDelete
  2. Clear explanation.. Easily understandable...Thanks

    ReplyDelete
    Replies
    1. What should we do if we want to create a method called getConnection() within this class and use that connection object in various daos to perform crud operations.. In such a case which is better option to make the whole class final only the getConnection method synchronized???

      Delete
    2. In a case where I have a method called getConnection() for it should be called to perform crud operation in daos, which option would be better - to make the class as final or to make the method synchronized.. Also I have placed a method for closing the resources in this class itself.. as close(rs,st,con)..

      Delete
  3. You have mentioned "I have shared a small eclipse project here...".. But it shows empty folder in google dirve.. pls check to it..

    ReplyDelete
    Replies
    1. Again the page shows:

      Google logo Drive Sign in

      JdbcSingleTone Empty folder

      Delete
    2. try this https://drive.google.com/file/d/0B-OmBwkwiTCQUkQ0dER2c0xjUXM/edit?usp=sharing

      Delete
    3. Thanks for your reply..

      Delete