You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Luke Winkenbach (JIRA)" <ji...@apache.org> on 2014/08/24 18:06:37 UTC

[jira] [Created] (FELIX-4612) @PostRegistration is not being called

Luke Winkenbach created FELIX-4612:
--------------------------------------

             Summary: @PostRegistration is not being called
                 Key: FELIX-4612
                 URL: https://issues.apache.org/jira/browse/FELIX-4612
             Project: Felix
          Issue Type: Bug
          Components: iPOJO
         Environment: Seen on felix and equinox
            Reporter: Luke Winkenbach


When a simple service starts up, I expect to see the following:
# Constructor called
# @Validate method called
# @PostRegistration called

Instead, what is seen is:
# Constructor called
# @Validate method called
# @Post*Un*registration called

Here is the service implementation:
{code:title=TestServiceImpl.java|borderStyle=solid}
@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");
  }
}
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)