[ 
https://issues.apache.org/jira/browse/FELIX-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clement Escoffier resolved FELIX-2279.
--------------------------------------

    Resolution: Fixed

Fixed in trunk.

Add the post-registration and post-unregistration attributes in the <provides/> 
element. Such callbacks receives the ServiceReference as parameter. You can 
have different callbacks if you have several <provides/>

Also define the @PostRegistration and @PostUnregistration annotations. You can 
use those annotations only once per class.
To use them, you must declare the latest manipulator a dependency of the 
maven-ipojo-plugin:
{code:xml}
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-ipojo-plugin</artifactId>
       <version>1.6.0</version>
        <executions>
          <execution>
            <goals>
              <goal>ipojo-bundle</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
                <dependency>
                        <groupId>org.apache.felix</groupId>
                        
<artifactId>org.apache.felix.ipojo.manipulator</artifactId>
                        <version>1.7.0-SNAPSHOT</version>
                </dependency>
        </dependencies>
      </plugin>
{code}

> Access to ServiceReference in iPOJO service
> -------------------------------------------
>
>                 Key: FELIX-2279
>                 URL: https://issues.apache.org/jira/browse/FELIX-2279
>             Project: Felix
>          Issue Type: New Feature
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> As a convenience, it would be very useful for an iPOJO service to have access 
> to its ServiceReference object. E g for logging purposes this is essential 
> information. Assuming that the service has been registered prior to the 
> @Validate method being called, it makes sense to provide the ServiceReference 
> as an argument to this method.
> If the service is not registered until the @Valid method returns, then 
> another callback (e g @Registered) is needed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to