Hi, When I removed the annotation it still gets the 'ProtoBufServletContextInitializer'.
Thanks On Thu, May 29, 2014 at 8:17 PM, Sagara Gunathunga <sag...@wso2.com> wrote: > > [Adding dev@wso2] > > what happen if you comment out @HandlesType(...). annotation ? > > Thanks ! > > > On Thu, May 29, 2014 at 7:52 PM, Denuwanthi De Silva > <denuwan...@wso2.com>wrote: > >> Yes I added the @Protobuf to my webapp service class. In tomcat the >> onstartup method identifies that class properly. >> >> But here now the initializer instance is created, but, #onStartup method >> is not triggered. >> >> >> >> >> On Thu, May 29, 2014 at 7:45 PM, Kasun Gajasinghe <kas...@wso2.com>wrote: >> >>> >>> Great.. >>> >>> You do not have to manually call #onStartup method. It will get >>> automatically called when it finds a class that has the annotation class >>> mentioned in @HandlesType(...). >>> >>> So, just add your @ProtoBuff.. service class to your webapp, and see >>> whether the SCI gets invoked. >>> >>> >>> On Thu, May 29, 2014 at 7:40 PM, Denuwanthi De Silva < >>> denuwan...@wso2.com> wrote: >>> >>>> Hi, >>>> >>>> Yes, I changed it to 3.0 earlier due to that reason. >>>> I was mistaken earlier, it does go into our probuf.war too. >>>> Now the initializer class can be accessed. Only problem is to call >>>> onStartup(java.util.Set<java.lang.Class<?>> c, >>>> ServletContext<http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html> >>>> ctx). >>>> Now i'm working on it >>>> >>>> Thanks. >>>> >>>> >>>> On Thu, May 29, 2014 at 7:31 PM, Kasun Gajasinghe <kas...@wso2.com>wrote: >>>> >>>>> Hi, >>>>> >>>>> Just found out that ServletContainerInitializer s are only processed >>>>> if the version attribute in web.xml is set to 3.0 or latter. The reason is >>>>> this feature was introduced in Servlet 3.0 spec. So, make sure your >>>>> webapps >>>>> have the proper version. >>>>> >>>>> -- >>>>> >>>>> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc. >>>>> email: kasung AT spamfree wso2.com >>>>> linked-in: http://lk.linkedin.com/in/gajasinghe >>>>> blog: http://kasunbg.org >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Denuwanthi De Silva >>>> Software Engineer; >>>> WSO2 Inc.; http://wso2.com, >>>> Email: denuwan...@wso2.com >>>> >>>> >>>> >>> >>> >>> -- >>> >>> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc. >>> email: kasung AT spamfree wso2.com >>> linked-in: http://lk.linkedin.com/in/gajasinghe >>> blog: http://kasunbg.org >>> >>> >>> >> >> >> >> -- >> Denuwanthi De Silva >> Software Engineer; >> WSO2 Inc.; http://wso2.com, >> Email: denuwan...@wso2.com >> >> >> > > > -- > Sagara Gunathunga > > Senior Technical Lead; WSO2, Inc.; http://wso2.com > V.P Apache Web Services; http://ws.apache.org/ > Linkedin; http://www.linkedin.com/in/ssagara > Blog ; http://ssagara.blogspot.com > > -- Denuwanthi De Silva Software Engineer; WSO2 Inc.; http://wso2.com, Email: denuwan...@wso2.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev