2 Replies Latest reply on Oct 21, 2008 8:11 AM by John Harrison

    @WebServiceProvider @Stateless and @PostConstruct

    John Harrison Newbie

      I have a web service which is stateless but needs to do some one time initialization.

      Originally I used the @WebService, @Stateless and @PostConstruct annotation and everything worked well. My @PostConstruct method was called once only (and my ctor incidentally) no matter how many times the web service was called.

      For reasons beyond my control I've had to switch to @WebServiceProvider and have my service class implement Provider SOAPMessage. Now @Stateless and @PostConstruct don't seem to work. My ctor is called once for each service call and my post construct method is never called at all.

      Have I done something wrong? Or misunderstood something (very likely).

      If it's not possible to get this working using annotations what would be the best way to get my one-time initialization to work.