After writing the analysis of the service framework based on OSGi, the decision was made to implement a distributed service framework based on OSGi, and its feature would be implemented in accordance with the elements of the service framework previously written, based on the previous analysis, This implementation process is divided into three major steps to complete: spike phase, implementation phase and te
Use osgi to develop HTTP services. The default port is 80 at startup. However, this port may have been occupied by other programs on the local machine. There are two solutions to the problem: 1) closing or modifying the port that occupies the program; 2) modifying the port at osgi startup.
It is also easy to modify the port number when osgi is started. You can a
The following is from Zhou Zhiming's in-depth understanding of Java virtual machines.Learn the JEE specification, go to the JBoss source code, learn the class loader, to see the OSGi source code.OSGI, the Open Service Gateway Initiative, is a dynamic modular specification based on the Java language.Only the export package can be accessed by an external module.OSGi allows for module-level hot-swappable functions.The relationship between the loaders in
Equinox is an osgi Implementation of eclipse, and later versions of eclipse3.1 are all started through it.
You can download the latest equinox version from the eclipse website at http://download.eclipse.org/equinox /. If you have installed a version later than eclipse 3.1You can findOrg. Eclipse. osgi_3.2.0_xxx.jarThis is the implementation file of equinox.
HereArticleWe useOrg. Eclipse. osgi_3.7.2.v20120110-1415.jarFor example.
Create
The MVC framework, such as SPRINGMVC, is temporarily unsupported in OSGi, and when we write a method, we need to create a new servlet, which is cumbersome, so we want to implement an MVC framework that works in an OSGi environment, mimicking the SPRINGMVC or struts2 framework.1. First we look at the configuration of Web. Xml. It defines a servlet that filters all URIs with. Do, and initializes the parameter
Felix is an Apache-owned framework for implementing OSG specification I. Access Address: http://felix.apache.org/
Building the basic OSGi framework only requires downloading the Felix framework.
Unzip to any directory (for example: D:\felix-framework-4.4.1), open cmd Command window in felix-framework-4.4.1 directory, execute launch Felix framework command
Java-jar Bin/felix.jar
Enter the LB command to view the current launch of Felix's bundle afte
It looks normal when you are working directly with the plugin that you are developing. But when the export was put into eclipse, there was something wrong with the plugin running. This time you need to debug the plugin in the console of OSGi, this article will tell you how to debug the Eclipse plug-in simply (the plugin has been exported).1. Send the eclipse.exe of the eclipse that was placed into the plugin to the desktop shortcutPS: I developed the
The first step is to build an OSGI environment;Open Eclipse, click run-"Run Configration:, configure as follows, click Run."The result of the operation is as follows: The OSGi environment is built.Step two: Build an OSGi-based Web development environmentTwo ways: The first, tick the required bundle, list asSecond, tick the box below and click Add Required bundles
Fault condition Description
System abbreviation
OSGi Based business Application system
Fault Name
System in the customer production environment: websphere7.0, OSGi-based application system, the external system calls the WebService service provided by the system Soapmessagefactory class loading exception, resulting in the WebService service can not be call
Osgj: equinox for eclipse (Luna) command
Launch-Start the osgi frameworkShutdown-Shutdown the osgi frameworkClose-Shutdown and exitExit-Exit immediately (system. Exit)Init-Uninstall all bundlesSetprop -Set the osgi Property
--- Controlling bundles ---Install-Install and optionally start bundle from the given URLUninstall-Uninstall the specified bundle (s)Star
Class loading in OSGiIn OSGi, there are multiple classloader, each of which loads a separate module, and when other modules need to find the class, the OSGi framework relies on the relational table to find the loader that the class is in, and the loader is commissioned to runClass loading in OFBizOFBiz integrates many applications, such as order, security, login, online, and Tomcat are also integrated into
## http://www.apache.org/licenses/LICENSE-2.0## unless required by applicable or agreed to writing, software# Distributed under the License is distributed on a "as is" BASIS,# without warranties or CONDITIONS of any KIND, either express or implied.# See the License for the specific language governing permissions and# Limitations under the License.################################################################################## Root LoggerLog4j. Rootlogger=info, stdout, out,
In the traditional way, we can register the service through Bundlecontext.registerservice () in the bundle's activator (called when the bundle starts), through SERVICEREFERENCESR = Bundlecontext.getservicereference () and Bundlecontext.getservice (SR) are serviced in two steps. But there are many drawbacks to this approach:
1. Generate more Duplicate code
2, at startup to instantiate all the services to be published, affecting the startup time
3, some registered services will not be used during
This article describes how to configure a simple Web application based on Eclipse Equinox OSGi in Eclipse to build a more complex application based on the Eclipse version 3.3.1, which is used in this article. If your eclipse version is 3.2.0 or above, it should be OK.
One, support static pages and servlet
1. Create a new plugin project, Net.bjzhanghao.osgi.test, in the first step of the wizard, select this plug-in is target, and in the next "Plug-in
Tags: blog http ar os using Java for file dataDevelopment environment: WINDOWS2008R2 64-bit +myeclipse10+jdk1.7.0_67+mysql5.5Software Installation: Myeclipse-10.0-offline-installer-windows.exe,jdk-7u67-windows-x64.exe,mysql-5.5.28-winx64.msi,mysql-connector-net-6 .3.7.msi,navicat_for_mysql_11.0.10.exeProblem solving: This article is primarily to address the problem of creating an Eclipse plug-in that conforms to the OSGi specification, and to give a c
bit and this demand is not very fitting, In particular, the Jini itself is a service framework that is not very powerful, if adopted it will cause also need to transform, stripped of its service that block of mechanism or do compatibility, and Jini in use for Jini itself is too dependent on the package, which we expect the Pojo mechanism is very troublesome, of course, Jini is not without merit, if you look at the Jini implementation framework of the visual services of the monitoring end, it is
1. After the packaged product will have an. exe file, create a new shortcut, right-click Properties, will pop up a window, in the window can find the target of a column2. In the back, add some parameters to run, here we need to add a-console3. When you are sure, use this shortcut to start the product3. There will be a console pop-up that can be viewed on this console to see how the plugin is running4. osgi> SS can see the operation of all plugins.Note
System Architect Java Virtual machine, OSGI-JVM Advanced Performance Architecture Project Combat developmentShare Network address: https://pan.baidu.com/s/1bproUYj Password: q6i3This course provides a comprehensive and systematic introduction to Java Virtual Machine Foundation, application, management, performance optimization, database architecture, environment building examples, programming examples and so on. Each chapter in the course provides a l
1. Spring STS (Spring recently changed the site is not too familiar at the moment)Http://spring.io/tools/sts/all2. Download the Virgo pluginHttp://download.eclipse.org/virgo/milestone/tooling3. Eclipse Download the official Virgo + Jetty Development Kithttp://www.eclipse.org/virgo/download/4. Configure Virgo serverIn EclipseWindow---Preferences---Runtime enviroments-----Server install Direc Tory specify can be---------------------------------------------------------------------------------------
Development Environment: Windows2008R264-bit + MyEclipse10 + jdk1.7.0 _ 67 + MySql5.5 software installation: Problem Solving
Development Environment: Windows2008R2 64-bit + MyEclipse10 + jdk1.7.0 _ 67 + MySql5.5 software installation: Solution to the Failover Problem
Development Environment: Windows2008R2 64-bit + MyEclipse10 + jdk1.7.0 _ 67 + MySql5.5
Software Installation: Installation
Solution: This article mainly solves the problem that the database cannot be connected when an Eclipse plu
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.