This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
a. Can the listener class have a non default constructor and an unaccessible default constructor (say provat etc.). In this case how would the listener code get fired?
Hi, The listener class cannot have an unaccessible default constructor, I think it is because the container uses Reflection to instantiate the class, In case of tomcat , the application intialization itself fails , with the following message.
java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardContext can not access a member of class com.example.ReqAttrListener with modifiers "private"