Spring and osgi, spring2.1 will support osgi

Source: Internet
Author: User
Spring, the popular full-stack Java/Jee application framework in recent years. With the release of 2.0, spring is more comprehensive and powerful. osgi is not so famous, but everyone in eclipse is familiar with it. After eclipse 3.0, osgi is used as the basis for its plug-in architecture implementation.
To talk about osgi, osgi is mainly divided into bundle and service. It can be considered that bundle is a module manager and mainly manages the lifecycle of the module through bundleactivator, the service is the externally accessible service object of this module. It represents a difference between osgi and the traditional plug-in framework. The management and static structures are separated by manifest in osgi. add some content to the MF file to publish the bundle, which describes the bundle provider, version, unique ID, classpath, exposed package, and dependent package; each bundle has its own classloader and context, which can be used for service registration and uninstallation. These operations are broadcast to other bundle through the event mechanism; in general, you need to compile the method of the service to be registered in the bundle to complete the exposure function of the service that bundle can be used externally. If you need to call the services provided by other plugins The service can first obtain the Service handle through getservicereference of context, and then obtain the service entity through context. getservice (servicereference.
Through understanding osgi, we can explore a series of advantages of spring and osgi:
Modularize low-coupling applications ";
Deploy applications of multiple versions at the same time and dynamically select (runtime );
Replacement of multiple modules (services) during runtime;
Dynamic deployment, update, or reverse deployment module during runtime;
Apply spring configuration and Assembly modules;
Develop programs with osgi characteristics in simple and familiar programming mode
.........
Let's wait and see the birth of these two cool technologies!
Spring and osgi: http://www.osgi.org/blog/2006/08/osgi-and-spring_29.html
Osgi also has an opendoc, which can be found at the javaeye or manjianghong site.

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.