[Original] how to understand blueprint

Source: Internet
Author: User

Blueprint is similar to spring. In fact, the source of these two specifications is one.

 

Blueprint is a configuration specification that implements osgi specifications and is injecting dependent on containers.

The role of blueprint for ServiceMix is like the role of spring for the web development framework:

1. blueprint implements osgi specifications. Karaf is an osgi container instance, and ServiceMix implements package release functions based on Karaf. Karaf is part of ServiceMix and is a tool;

2. Spring implements spring specifications. Spring is part of the web development framework and a tool.

 

The so-called blueprint implements osgi specifications, which refer to the element names, child element names, and element attributes defined in blueprint,

All are content specified in osgi specifications. For example, osgi requires bundle to be registered, bind, and start,

Correspondingly, in blueprint, there are service elements, reference elements, bean elements, which represent services, service references, and service implementation beans,

The three can be registered, bind, and start respectively.

 

 

For bundle, there are three important states: 1, registered/unregistered 2, bind/unbind 3, init/destroy

In blueprint, if it is Bean, it has init/destroy;

In blueprint, if it is a service reference (reference or reference list), it has bind/unbind

In blueprint, if it is a service, it has registered/unregistered

These statuses are standardized as Callback functions by blueprint, such,

The bean element can specify init-method = "XXX" Destroy-method = "yyy"

The reference element can specify <reference-listener bind-method = "xxx" unbind-method = "YYY">

The service element can specify <registration-listener regiener-method = "register" unregistration-method = "unregister">

 

[Original] how to understand blueprint

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.