0 Replies Latest reply: Aug 28, 2012 6:15 AM by 958437 RSS

    Singleton class with @Startup annotation WL 11g

    958437
      Hello, i have a problem deploying my webservice to Weblogic 11g.

      JAVA: JRockit 1.6.x

      I need to run a method on webservice deployment and i made this code:
      @Singleton
      @Startup
      public class StartupBean {
      
          Logger logger = Logger.getLogger(StartupBean.class);
      
          @PostConstruct
          private void postConstruct() {
             logger.error("WS started.");
      
          }
      
          @PreDestroy
          private void preDestroy() {
              logger.error("WS stoped.");
          }
      }
      without any additional xml config.

      It works normally on 12c but i need it on 11g.

      What is the workaround?

      Thanks