I have annotated some classes with @SipListener (they implement session activation listeners). When I try to deploy an application that contains these classes, it appears that the container is trying to instantiate these classes at deployment time.
In server log, I see a stack trace that starts with:
User defined listener com.bea.wcp.sip.engine.SipContainerServletContextListener failed: java.lang.RuntimeException: com.bea.wcp.sip.engine.server.SetupException: Failed to load listener: "com.xxx.MyClass.
java.lang.RuntimeException: com.bea.wcp.sip.engine.server.SetupException: Failed to load listener: "com.xxx.MyClass
I tried defining a zero-args constructor for com.xxx.MyClass, and that seemed to satisfy the container - for that class. But it bombed on the next class that was annotated as a @SipListener.
Must I implement zero-args constructors for every class that is a @SipListener? This is laborious, and instances created in such a way have no meaning to the application.
Subject edited by: yotommy on Aug 27, 2009 12:50 PM
My understanding is that the container instantiates one instance of each class annotated with @SipListener, and then when an event occurs the container calls the appropriate instance method of that object. Therefore, it is necessary that the annotated classes each have a zero-arg constructor.