1. There is no synchronized code in my Singleton class.And suppose 1 request is accessing this class.At the same time,another request for this class come.Is the 2nd request queued till 1st request is over?
My first inclination is that the answer is no.
I don't think you can guarantee the order for which request gets priority over the other.
2.I believe that simultaneous request can access singleton class simultaneously.Hence in any application, all classes like service classes, DAO classes, except EJBs, should be singleton. This will improve memory perfomance as number of objects are significantly less.
Pls correct me if I am wrong.
Unless your DAOs have only read methods, I don't think it's a good idea to make them singleton classes. Even if you choose to make them singleton classes, you have better synchronize the methods that will make modifications to your data source.
Well, you might as well just return new DAO instances then because I don't think you'll like to be bothered with multi-threaded practices, and the issues that it comes with. The performance is usually negligible. For service classes, I would rather have non-singletons for those as well.