felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Winkenbach (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4612) @PostRegistration is not being called
Date Sun, 24 Aug 2014 20:09:37 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108528#comment-14108528
] 

Luke Winkenbach commented on FELIX-4612:
----------------------------------------

Looking through the code, I believe I have found a potential problem.  In DefaultBindingModule,
the PostUnregistration class is bound to the PostRegistrationVisitor object (see DefaultBindingModule.java:272).
 

> @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)

Mime
View raw message