Include Page |
---|
| apache-felix-ipojo-header |
---|
| apache-felix-ipojo-header |
---|
|
HTML |
---|
Wiki Markup |
---|
{html}
<div class="content">
{html} |
The iPOJO Snack Bar
This tutorial illustrates some advanced features of iPOJO
Div |
---|
|
|
Wiki Markup |
---|
{div:class=toc}
{toc:maxLevel=4|minLevel=2}
{div} |
Context
This tutorial is based on a very simple application; customers are using a vendor service to buy hot dog or pop corn according to the availability of appropriate providers. Both of the vendors implement (and provide) the vendor service. The hot dog vendor depends on two others services to get the ingredients (buns and wiener). To sell pop corn, the pop corn vendor requires having enough corn in stock.
...
When a provider does no more matches with the LDAP filter, the provider is no more used, and another (matching with the filter) is tracked. If no provider fulfilling the constraint is found, the instance becomes invalid and waits a matching provider.
HTML |
---|
Wiki Markup |
---|
{html}
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Instance invalidation and services</b>
</div>
</div>
<div class="box-blue-content">
When an instance becomes invalid, all its provided services are withdrawn from the service registry. So, this instance is no more _accessible_ from the service registry.
</div>
<div class="box-blue-footer"></div>
</div>
{html} |
Immediate component instance
...
By default, all all components that do not provide any service are immediate. Other components create call their constructors when they are used for the first time.
HTML |
---|
Wiki Markup |
---|
{html}
<div class="box">
<div class="box-blue-header">
<div class="box-blue-title">
<img src="http://people.apache.org/~clement/ipojo/site/information.gif"> <b>Difference between 'validate' and 'immediate'</b>
</div>
</div>
<div class="box-blue-content">
There is a difference between immediate components and components with a 'validate' lifecycle callback. Indeed, the callback is call at each time the instance becomes valid and calls the constructor only if no object already exists. On the other side, the immediate component's constructor is call only once.
</div>
<div class="box-blue-footer"></div>
</div>
{html} |
Creating instances from an external component type
...