felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Felix > Apache Felix Dependency Manager - Using Annotations
Date Wed, 08 Sep 2010 20:40:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=FELIX&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations">Apache
Felix Dependency Manager - Using Annotations</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~pderop">Pierre
De Rop</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-unchanged" >h1. Using Annotations <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">To
write an OSGi application is to first develop bundle dependencies  using Import-Package or
Export-Package headers. But bundles can also  cooperate using services. Basically, using the
OSGi Service Regsitry, a  service providing bundle can publish a service (a Java object),
while a  client bundle can discover and bind to other services on which it  depends. All these
activities are dynamic and create a unique challenge  when using services: when a service
is required, it may not be available  yet, so that the client service is left clumsy. On the
other hand, even  if the dependency service is registered and available, then it can be  unregistered
later, leaving the client service with a stale service  reference. In this context, a first
solution to handle service  dependencies consists in using the OSGi API  (BundleContext/ServiceTracker),
but this programmatic API for  registering and acquiring services is often challenging, and
 DependencyManager addresses theses issues. <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Dependency Manager provides a compact
and versatile java API,  allowing to declaratively and programmatically register, acquire,
and  manage dynamic OSGi services. But since recently, support for  annotations has been introduced
in Dependency Manager, and you can also  manage your service component dependencies using
Java 5 annotations. In  this chapter, we will detail the Dependency Manager Annotations which
 can be used to describe service components. We will also discuss the DM  component lifecycle
and how components can interract with the dynamic  OSGi service model. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="ApacheFelixDependencyManager-UsingAnnotations-UsingAnnotations"></a>Using
Annotations</h1>

<p>Dependency Manager provides a compact and versatile java API,  allowing to declaratively
and programmatically register, acquire, and  manage dynamic OSGi services. But since recently,
support for  annotations has been introduced in Dependency Manager, and you can also  manage
your service component dependencies using Java 5 annotations. In  this chapter, we will detail
the Dependency Manager Annotations which  can be used to describe service components. We will
also discuss the DM  component lifecycle and how components can interract with the dynamic
 OSGi service model.</p>

<h1><a name="ApacheFelixDependencyManager-UsingAnnotations-TableofContents"></a>Table
of Contents</h1>

<ul>
	<li><a href="/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations+-+Quick+Tour"
title="Apache Felix Dependency Manager - Using Annotations - Quick Tour">Quick Tour</a>
helps you with the basic concepts using a SpellChecker sample code.</li>
	<li><a href="/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations+-+Components"
title="Apache Felix Dependency Manager - Using Annotations - Components">Writing Components</a>
Explains how to write DM service components using annotations.</li>
	<li><a href="/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations+-+Dependencies"
title="Apache Felix Dependency Manager - Using Annotations - Dependencies">Using Dependencies</a>
Explains how to annotate dependencies for a given component.</li>
	<li><a href="/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations+-+Lifecycle"
title="Apache Felix Dependency Manager - Using Annotations - Lifecycle">Lifecycle</a>
Explains the DM component lifecycle and how components interact with the dynamic OSGI service
model.</li>
	<li><a href="/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations+-+Composition"
title="Apache Felix Dependency Manager - Using Annotations - Composition">Composition</a>
Explains how a component may be implemented using multiple object instances.</li>
</ul>


<h1><a name="ApacheFelixDependencyManager-UsingAnnotations-"></a></h1>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23334954&revisedVersion=5&originalVersion=4">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Dependency+Manager+-+Using+Annotations?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message