Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4612

@PostRegistration is not being called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • ipojo-manipulator-1.12.1
    • iPOJO
    • None
    • Seen on felix and equinox

    Description

      When a simple service starts up, I expect to see the following:

      1. Constructor called
      2. @Validate method called
      3. @PostRegistration called

      Instead, what is seen is:

      1. Constructor called
      2. @Validate method called
      3. @Post*Un*registration called

      Here is the service implementation:

      TestServiceImpl.java
      @Component
      @Provides
      @Instantiate
      public class TestServiceImpl implements TestService
      {
        @Requires 
        LogService log;
        
        public TestServiceImpl()
        {
          log.log(LogService.LOG_ERROR, "TestServiceImpl Constructor");
        }
        
        @Validate
        public void validate()
        {
          log.log(LogService.LOG_ERROR, "Validate");
        }
        
        @Invalidate
        public void invalidate()
        {
          log.log(LogService.LOG_ERROR, "Invalidate");
        }
        
        @PostRegistration
        public void name(ServiceReference ref)
        {
          log.log(LogService.LOG_ERROR, "PostRegistration");
        }
        
        @PostUnregistration
        public void uname(ServiceReference ref)
        {
          log.log(LogService.LOG_ERROR, "PostUnregistration");
        }
      }
      

      Attachments

        1. post_registration_fix.diff
          0.9 kB
          Luke Winkenbach

        Issue Links

          Activity

            People

              clement.escoffier Clement Escoffier
              lukewink Luke Winkenbach
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: