Singleton class, traditionally called as PrivilegesMgr.getInstance() and not privilegesMgr.getInstance()
Yes, it's considered bad form to call a static method through it's class rather than an object reference, but there is really no difference in
Java - it works either way. There's also no need to call "getInstance()" explicitly in your code - Spring has already called "getInstance()" for you - you can just call it as:
when, try to do PrivilegesMgr.getInstance(), i get null pointer, which is logical, as their is no bean available.
Why do you think there is no bean available? The code you posted looked OK - are you sure you're loading the beans XML configuration containing your "privilegesMgr" bean? Can you post relevant sections from your web.xml deployment descriptor?