Source: http://www.blogjava.net/BlueDavy/archive/2009/04/24/267425.htmlWhen using OSGi, there are times when you need to get OSGi services outside of the OSGi container, load the class that the OSGi container loads, or you need to embed an OSGi container, and this blog is a
Now it's all in the HelloWorld. To cover all three levels of the OSGi framework, this HelloWorld may be a little more complicated than the other OSGi HelloWorld programs you see. If you're unfamiliar with some of the APIs in your code, remember to go back to the previous entry to find the corresponding content, which will help you understand the code. The key cod
What's 1.1 Equinox?
From a code standpoint, Equinox is actually a complete implementation of the OSGi core standard, and adds some additional functionality on this basis (such as adding a command line and a program execution entry for the framework). All of the things we've been explaining in the previous introductory article are a small part of the OSGi core sta
After having a preliminary understanding of osgi, we are ready to write some code to run and try our best,First, I downloaded a copy of bluedavy's osgi practice.There is code that can be run directly in it. Double-click Run. BAT to run normally, which is cool!Start to practice the user login authentication module in osgi practice, and repeat the code in a row. Th
After having a preliminary understanding of osgi, we are ready to write some code to run and try our best,First, I downloaded a copy of bluedavy's osgi practice.There is code that can be run directly in it. Double-click Run. BAT to run normally, which is cool!Start to practice the user login authentication module in osgi practice, and repeat the code in a row. Th
module that allows spring developersIn addition to the architecture and dynamic configuration, the spring dynamic model also provides low-level programming required by most osgi applications, so you can focus on the business logic of the application.
In the first section of this series of articles (hello, osgi, firstSection: getting started with bundles), We introduced a standard
Java software development platform. On the Internet, many connections still direct to Visual Age Micro Edition (VAME). This is also one reason why SWT is conceived and they want to use SWT in the user interface of embedded devices. This relationship explains why OSGI specifications were selected at the time.Another reason is that there are no other specifications except OSGI...
...
, Add:
In the http://zh
implement dynamic insertion, the classloader itself is not a common tool for application developers.
1.1.2 what does osgi do for you?
Osgi checks the dependencies of your code before running your code. osgi checks the dependencies and consistency of libraries in the class path, you can package and deploy the classes you need (excluding the classes you don't nee
the osgi framework. Therefore, you have a great degree of freedom to define these attributes.
2.5.2 bundle Recognition
Bundle-symbolicname is used by the osgi framework to uniquely identify a bundle. Its value is similar to the Java package and is separated by vertices, we recommend that you use the inverted write of
platform on network devices such as servers and embedded devices, you can manage the lifecycle of software components running on those devices anywhere on the network, installing, upgrading, or uninstalling them in the background without interrupting the device's normal operation.In recent years, OSGi technology has been widely used in embedded system and network equipment market. Now, thanks to Eclipse's success,
-inproject" and click "Next". The plug-in project dialog box is displayed;
3) in the plug-in project dialog box, enter the following values:
Project name (project name): COM. javaworld. sample. helloworld
Target Platform: An osgiframework-> standard (osgi framework-> Standard)
4) for other requirements, enter the default value and click "Next". You will see the plug-in context dialog box;
5) in the plug-in
This article isGood, osgiThe fourth part of the series. The following describes the osgi service. Readers who are not familiar with osgi can first read what osgi is.Article.
Osgi Service
As mentioned above, the osgi architecture is very suitable for implementing service-orie
.
Spring DM calls bundlecontext. getservicereference () to find and implementCom. javaworld. sample. osgi. Spring. Contact. contactdao interface service. IfIn the framework, if more than one service matches the requirement, the Service with the highest level will be returned. In addition, you can use the filter attribute to precisely define the services you want.
Next, we will modify the helloworld. xml fil
Dispatcherservlet (), props);
The first parameter of the Context.registerservice method represents the type of service, because we provide a Web request service, so the service type here is one javax.servlet.Servlet , so you need to javax.servlet.Servlet pass in the method
The second parameter is the service processing class, where a routing servlet is configured, followed by a corresponding program to process the specific request.
The third parameter is a Bundle property that
Osgi 4.2 specification released
Original article: osgi 4.2 released, Infoq
Author:Alex Blewitt September 16, 2009
Translators: 88250September 17, 2009
Osgi AllianceOsgi 4.2 was released the day before yesterdaySpecification. Although early drafts have been available, this is the final standard release version.
Some osgi
runBundleTimesClassNotFoundException. These exceptions are caused by the absence of configuration files. After understanding the configuration method of the configuration file, the 60% exception can be solved.Import-Package
InBundleOfImport-PackageThe attribute is configured in the following format:
Separate packages with commas
You can use wildcard characters such as * to indicate all packages in this package. If you do not want to use wildcards, other packages under the same package can u
After nearly two years of preparation, the OSGi Alliance finally released the latest version of the OSGi Service Platform V4.2 specification in September 2009. Among them, the new Core Specification V4.2 specification adds Framework Launching,service Hooks concept, and the Conditional Permission Admin standard is improved and supplemented to facilitate Ann Fully
[51cto] in the previous "Hello, osgi" SeriesMedium,We have laid the foundation for understanding how the osgi service platform works. In the last few articles, we will learn how to apply osgi pluggable and component-based development models to the WebApplication. You will create an osgi Application Based on bundle, whi
The main console commands are listed below:Table 1. Equinox OSGi main console command table
Category
Command
Meaning
Control framework
launch
Start frame
shutdown
Stop frame
close
Close, exit frame
exit
Exit immediately, equivalent to System.exit
init
Uninstall all bundles (if
SOA strategy for deploying and supporting multiple versions of WEB services
Brief introduction
OSGi is a Java-oriented dynamic modular system. The OSGi Alliance publishes specifications for the module system. Some of the popular OSGi containers include Eclipse Equinox and Apache Felix, among others. As a framework fo
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.