Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.3, 4.0-beta-1
    • Component/s: None
    • Labels:
      None

      Activity

      Hide
      Thiago Veronezi added a comment -

      Is this bug still open? It seems to be fixed. At least the "DependsOnTest.java" (line 89) test is OK.

      Show
      Thiago Veronezi added a comment - Is this bug still open? It seems to be fixed. At least the "DependsOnTest.java" (line 89) test is OK.
      Hide
      Thiago Veronezi added a comment -

      Indeed... it seems to be working fine. I've just tested it on my current project (its using org.apache.openejb - 3.1.3-SNAPSHOT) and the the "ApplicationImpl.applicationShutdown" method bellow has been called at the system shutdown. Thats a good news for me: I'll need that "preDestroy" call soon. :O)

      //------------------------------------------------------------------------------------------------
      package iserver.iservice.ejb.service;
      .
      .
      .
      @Singleton
      @Startup
      @Local(IApplicationService.class)
      public class ApplicationImpl implements IApplicationService {
      private static final Logger LOG = Logger.getLogger(ApplicationImpl.class);

      @EJB
      private IUserServiceLocal iusr;

      @Override
      @PostConstruct
      public void applicationInitialization() {
      if (LOG.isInfoEnabled())

      { LOG.info("Starting up the iserver EJB application..."); }

      User root = iusr.findByAccount("root");
      if(root == null) {
      if (LOG.isInfoEnabled())

      { LOG.info("This is the first execution! " + "Creating the default root user."); }

      root = iusr.create("root", "root user", "1234");
      }
      }

      @Override
      @PreDestroy
      public void applicationShutdown() {
      if (LOG.isInfoEnabled())

      { LOG.info("Stopping the iserver EJB application."); }

      }
      }

      //------------------------------------------------------------------------------------------------

      LOG:
      .
      .
      .
      [exec] Starting up the iserver EJB application...
      [exec] This is the first execution! Creating the default root user.
      [exec] The EJB server is RUNNING.
      [exec] The WEB server is RUNNING.
      .
      .
      .
      [exec] Stopping the STANDALONE server...
      [exec] The STANDALONE server is STOPPED.
      [exec] Stopping the EJB server...
      [exec] [Server@14384c2]: Initiating shutdown sequence...
      [exec] Stopping the iserver EJB application.
      [exec] [Server@14384c2]: Shutdown sequence completed in 94 ms.
      .
      .
      .

      Show
      Thiago Veronezi added a comment - Indeed... it seems to be working fine. I've just tested it on my current project (its using org.apache.openejb - 3.1.3-SNAPSHOT) and the the "ApplicationImpl.applicationShutdown" method bellow has been called at the system shutdown. Thats a good news for me: I'll need that "preDestroy" call soon. :O) //------------------------------------------------------------------------------------------------ package iserver.iservice.ejb.service; . . . @Singleton @Startup @Local(IApplicationService.class) public class ApplicationImpl implements IApplicationService { private static final Logger LOG = Logger.getLogger(ApplicationImpl.class); @EJB private IUserServiceLocal iusr; @Override @PostConstruct public void applicationInitialization() { if (LOG.isInfoEnabled()) { LOG.info("Starting up the iserver EJB application..."); } User root = iusr.findByAccount("root"); if(root == null) { if (LOG.isInfoEnabled()) { LOG.info("This is the first execution! " + "Creating the default root user."); } root = iusr.create("root", "root user", "1234"); } } @Override @PreDestroy public void applicationShutdown() { if (LOG.isInfoEnabled()) { LOG.info("Stopping the iserver EJB application."); } } } //------------------------------------------------------------------------------------------------ LOG: . . . [exec] Starting up the iserver EJB application... [exec] This is the first execution! Creating the default root user. [exec] The EJB server is RUNNING. [exec] The WEB server is RUNNING. . . . [exec] Stopping the STANDALONE server... [exec] The STANDALONE server is STOPPED. [exec] Stopping the EJB server... [exec] [Server@14384c2] : Initiating shutdown sequence... [exec] Stopping the iserver EJB application. [exec] [Server@14384c2] : Shutdown sequence completed in 94 ms. . . .
      Hide
      David Blevins added a comment -

      Thanks for the testing Thiago!

      Show
      David Blevins added a comment - Thanks for the testing Thiago!

        People

        • Assignee:
          David Blevins
          Reporter:
          David Blevins
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development