Java Reference
In-Depth Information
</property>
</bean>
</blueprint>
The Blueprint version of the application descriptor is slightly different, in that it uses the
OSG i Service Registry to find the DataSource , but functionally it's doing exactly the same
job, and it looks remarkably similar. We haven't picked a particularly special example
here; most of Spring's XML syntax can be directly used in Blueprint with few, or some-
times no, changes. These parallels are explicitly listed in the documentation for Eclipse
Gemini (the reference implementation for the Blueprint container service), which was
contributed to Eclipse by SpringSource. This documentation is available at http://
www.eclipse.org/gemini/blueprint/documentation/reference/1.0.1.RELEASE/html/
blueprint.html#blueprint:differences . Most usefully, this page includes a table indicat-
ing the different names used by Spring and Blueprint for the same logical structures. A
subset of this table is visible in table 11.1.
Table 11.1
A comparison of Spring and Blueprint XML syntax
Element/Attribute meaning
Spring syntax
Blueprint syntax
Namespace declaration
http://www.springframework.org/schema/
beans or http://www.springframework.org/
schema/osgi
http://www.osgi.org/
xmlns/blueprint/v1.0.0
Root element
<beans>
<blueprint>
Default bean activation policy
default-lazy
default-activation
Bean ID
id
id
Bean class
class
class
Bean scope
scope
scope
Built-in scopes
singleton, prototype, request, session, bundle
singleton, prototype
Default bean activation policy
lazy-init=true/false
activation=lazy/eager
Explicit dependencies
depends-on
depends-on
Initialization method
init-method
init-method
Destruction method
destroy-method
destroy-method
Bean static/Instance
factory method
factory-method
factory-method
Instance factory bean
factory-bean
factory-ref
Instantiation argument
<constructor-arg>
<argument>
Injection property
<property>
<property>
Injecting bean references
ref
ref
Injection value
<value>
<value>
 
 
 
 
 
Search WWH ::




Custom Search