I am needing to intercept the call of a constructor in my application.  
When the instantiation occurs within of a method called for the system executes 
correctly. However, the instantiation occurs, in fact, inside of a constructor 
of another object. This another object is singleton. In this case the pointcut 
is not running. What it can be?  

  | 
  | Running:
  | 
  | public class ServletInit extends HttpServlet {
  | 
  |    public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
  |             EmployeeRecord er = new EmployeeRecord(null);
  |         ...
  |     }
  | }
  | 
  | 



  | ERROR:
  | 
  | 
  | public class ServletInit extends HttpServlet {
  | 
  |    public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
  |             HealthWatcherFacade.getInstance();
  |         ...
  |     }
  | }
  | 
  | 
  | 
  | public class HealthWatcherFacade {
  |     private static HealthWatcherFacade singleton; //padrao singleton
  |     private ComplaintRecord complaintRecord;
  |     private HealthUnitRecord healthUnitRecord;
  |     private MedicalSpecialtyRecord specialtyRecord;
  |     private DiseaseRecord diseaseRecord;            
  |     private EmployeeRecord employeeRecord;
  | 
  |     private HealthWatcherFacade() {         
  |             complaintRecord = new ComplaintRecord(null);
  |             healthUnitRecord = new HealthUnitRecord(null);
  |             specialtyRecord = new MedicalSpecialtyRecord(null);
  |             diseaseRecord = new DiseaseRecord(null);                
  |             employeeRecord = new EmployeeRecord(null);
  |     }
  |     public synchronized static HealthWatcherFacade getInstance() {          
  |             if (singleton == null) {
  |                     singleton = new HealthWatcherFacade();
  |             }
  | 
  |             return singleton;
  |     }
  | ...
  | }
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992132#3992132

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992132
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to