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

@PostRegistration is not being called

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ipojo-manipulator-1.12.1
    • Component/s: iPOJO
    • Labels:
      None
    • Environment:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: