- 浏览: 1151028 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (411)
- Java Foundation (41)
- AI/机器学习/数据挖掘/模式识别/自然语言处理/信息检索 (2)
- 云计算/NoSQL/数据分析 (11)
- Linux (13)
- Open Source (12)
- J2EE (52)
- Data Structures (4)
- other (10)
- Dev Error (41)
- Ajax/JS/JSP/HTML5 (47)
- Oracle (68)
- FLEX (19)
- Tools (19)
- 设计模式 (4)
- Database (12)
- SQL Server (9)
- 例子程序 (4)
- mysql (2)
- Web Services (4)
- 面试 (8)
- 嵌入式/移动开发 (18)
- 软件工程/UML (15)
- C/C++ (7)
- 架构Architecture/分布式Distributed (1)
最新评论
-
a535114641:
LZ你好, 用了这个方法后子页面里的JS方法就全不能用了呀
页面局部刷新的两种方式:form+iframe 和 ajax -
di1984HIT:
学习了,真不错,做个记号啊
Machine Learning -
赵师傅临死前:
我一台老机器,myeclipse9 + FB3.5 可以正常使 ...
myeclipse 10 安装 flash builder 4.6 -
Wu_Jiang:
触发时间在将来的某个时间 但是第一次触发的时间超出了失效时间, ...
Based on configured schedule, the given trigger will never fire. -
cylove007:
找了好久,顶你
Editable Select 可编辑select
一个 web 项目,可以通过将各个 layer(prensentation - service - model - dao)的 classes,单独打成 jar, 实现 development time modularity. 但是,这些 module 最终还是需要作为 war 的依赖部署到web container 中,任何一个jar的变更,还是需要重新部署整个war。
OSGi带来的是,是 runtime module system.比如在不用重新部署整个web项目的情况单独升级某个dao jar。
An introduction to OSGi:
http://www.developerfusion.com/article/84923/an-introduction-to-osgi/
OSGi Modularity - Tutorial:
http://www.vogella.com/tutorials/OSGi/article.html
引用
使用 eclipse 的 export -> "deployable plugins and fragments" 导出 bundle jar 到 Felix 目录下,该 jar 会被放到一个叫 plugins 的目录下,而不是默认的 bundle 目录下。这两个目录,或者说在 osgi 环境下 bundle 与 plugin 有区别吗?答案是没有区别,只是 felix 将一个 osgi 服务叫做 bundle,而 eclipse 通常称其为 plugin 而已:
bundle = Deployable service = plugin,一般就是个jar包。
All these restrictions are enforced via a specific OSGi classloader. Each bundle has its own classloader. Access to restricted classes is not possible.
引用
1.2. Bundle vs. plug-in
In Eclipse the smallest unit of modularization is a plug-in. The terms plug-in and bundle are (almost) interchangeable. An Eclipse plug-in is also an OSGi bundle and vice versa.
所以在 osgi 的语境下我们认为:
In Eclipse the smallest unit of modularization is a plug-in. The terms plug-in and bundle are (almost) interchangeable. An Eclipse plug-in is also an OSGi bundle and vice versa.
bundle = Deployable service = plugin,一般就是个jar包。
All these restrictions are enforced via a specific OSGi classloader. Each bundle has its own classloader. Access to restricted classes is not possible.
Apache Felix Framework Usage Documentation:
http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html
引用
A bundle is the OSGi term for a component for the OSGi framework
OSGi and Class Loader:
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Managing_OSGi_Dependencies/files/BCL-ClassLoader.html
引用
In the context of OSGi, where a typical application depends on multiple class loaders (one for each bundle), it is important to understand that the fully-qualified class name—for example, org.foo.Hello—is not sufficient to identify a loaded class uniquely. In general, a loaded class is uniquely identified by combining the classloader identity with the fully-qualified class name.
Remote services(aka, Dosgi - distributed osgi):
http://blog.akquinet.de/2009/09/14/dynamokos-dealing-with-dynamism-in-osgi-distributed-web-applications/
eclipse 下 osgi 项目的创建与 deploy:
https://blogs.oracle.com/arungupta/entry/totd_126_creating_an_osgi
Introduction to the Apache Felix DependencyManager – part two
http://arnhem.luminis.eu/introduction-apache-felix-dependencymanager-part-2/
常见 OSGI MANIFEST.MF configs:
引用
Import-Package:the packages that it needs to run
Export-Package:the packages that it may export for other bundles to use
Bundle-RequiredExecutionEnvironment:the execution environment that it requires
Export-Package:the packages that it may export for other bundles to use
Bundle-RequiredExecutionEnvironment:the execution environment that it requires
引用
Chapter 5. Bundles and Application Contexts
The unit of deployment (and modularity) in OSGi is the bundle (see section 3.2 of the OSGi Service Platform Core Specification). A bundle known to the OSGi runtime is in one of three steady states: installed, resolved, or active. Bundles may export services (objects) to the OSGi service registry, and by so doing make these services available for other bundles to discover and to use. Bundles may also export Java packages, enabling other bundles to import the exported types.
In Spring the primary unit of modularity is an application context, which contains some number of beans (objects managed by the Spring application context). Application contexts can be configured in a hierarchy such that a child application context can see beans defined in a parent, but not vice-versa. The Spring concepts of exporters and factory beans are used to export references to beans to clients outside of the application context, and to inject references to services that are defined outside of the application context.
There is a natural affinity between an OSGi bundle and a Spring application context. Using Spring Dynamic Modules, an active bundle may contain a Spring application context, responsible for the instantiation, configuration, assembly, and decoration of the objects (beans) within the bundle. Some of these beans may optionally be exported as OSGi services and thus made available to other bundles, beans within the bundle may also be transparently injected with references to OSGi services.
After a refreshPackages operation, packages exported by older versions of updated bundles, or packages exported by uninstalled bundles, are no longer available.
When a Spring-powered bundle is stopped, the application context created for it is automatically destroyed.
If a Spring-powered bundle that has been stopped is subsequently re-started, a new application context will be created for it.
The Spring extender recognizes a bundle as "Spring-powered" and will create an associated application context when the bundle is started and one or both of the following conditions is true:
The bundle path contains a folder META-INF/spring with one or more files in that folder with a '.xml' extension.
META-INF/MANIFEST.MF contains a manifest header Spring-Context.
The unit of deployment (and modularity) in OSGi is the bundle (see section 3.2 of the OSGi Service Platform Core Specification). A bundle known to the OSGi runtime is in one of three steady states: installed, resolved, or active. Bundles may export services (objects) to the OSGi service registry, and by so doing make these services available for other bundles to discover and to use. Bundles may also export Java packages, enabling other bundles to import the exported types.
In Spring the primary unit of modularity is an application context, which contains some number of beans (objects managed by the Spring application context). Application contexts can be configured in a hierarchy such that a child application context can see beans defined in a parent, but not vice-versa. The Spring concepts of exporters and factory beans are used to export references to beans to clients outside of the application context, and to inject references to services that are defined outside of the application context.
There is a natural affinity between an OSGi bundle and a Spring application context. Using Spring Dynamic Modules, an active bundle may contain a Spring application context, responsible for the instantiation, configuration, assembly, and decoration of the objects (beans) within the bundle. Some of these beans may optionally be exported as OSGi services and thus made available to other bundles, beans within the bundle may also be transparently injected with references to OSGi services.
After a refreshPackages operation, packages exported by older versions of updated bundles, or packages exported by uninstalled bundles, are no longer available.
When a Spring-powered bundle is stopped, the application context created for it is automatically destroyed.
If a Spring-powered bundle that has been stopped is subsequently re-started, a new application context will be created for it.
The Spring extender recognizes a bundle as "Spring-powered" and will create an associated application context when the bundle is started and one or both of the following conditions is true:
The bundle path contains a folder META-INF/spring with one or more files in that folder with a '.xml' extension.
META-INF/MANIFEST.MF contains a manifest header Spring-Context.
OSGi Specification, 6.0:
http://www.osgi.org/download/r6/osgi.core-6.0.0.pdf
The difference between a jar and a bundle:
http://konigsberg.blogspot.com/2009/04/difference-between-jar-and-bundle.html
Discovering the future of Java
http://javadepend.wordpress.com/2012/10/31/discovering-the-future-of-java/
SpringSource to move dmServer to Eclipse – OSGi not ready for mainstream?
http://www.theserverside.com/discussions/thread.tss?thread_id=59183
发表评论
-
Lucene & Solr
2013-05-07 17:30 2429Params of solr query (参见 solrj ... -
Continuous Integration Server:Jenkins & Hudson
2013-04-15 16:15 1473Jenkins: http://jenkins-ci.org/ ... -
Spring Integration
2013-03-26 16:52 3049Spring Integration Reference ... -
高可用与负载均衡:Haproxy(or lVS) + keepalived
2013-01-29 20:35 3196sources: Setting Up A High ... -
Spring Batch: 大数据量批量并行处理框架
2013-01-11 16:19 4848Spring Batch Documentati ... -
AOP: Aspect Oriented Programming
2013-01-06 11:13 2792The AspectJ Programming Gu ... -
Performance & Load test tool : JMeter
2012-12-18 14:28 1293Official: http://jmeter.apa ... -
rabbitmq & spring amqp
2012-12-04 00:09 8717My main AMQP post on blogger ... -
javaMail 邮件
2012-11-23 20:14 3503SMTP POP3的区别到底是什么? http://w ... -
未完 Spring MVC
2012-11-15 22:41 2135Annotations for Http pa ... -
JUnit 单元测试
2012-10-30 12:27 2575测试的分类: http://s ... -
Hibernate
2011-08-02 11:48 1189Hibernate缓存: 一级缓存的生命周期和session的 ... -
Maven Repository Management & Nexus
2011-07-30 11:39 1440Why do I need a Repositor ... -
XStream
2011-07-13 00:18 1385XStream 内置 Converters: http://x ... -
Hibernate注解: 联合主键:@IdClass vs @EmbeddedId
2011-07-12 21:01 15389Hibernate Annotations -> 2.2 ... -
Struts2 Tag 标签
2011-05-04 00:43 1643struts2 OGNL 中的#、%等符号的区别: Apach ... -
Spring
2011-04-07 19:10 2904Spring API & Reference: htt ... -
iBATIS cacheModel 缓存
2011-04-07 14:29 1360http://ibatis.apache.org/docs/d ... -
Template Engine: FreeMarker & Velocity
2011-01-16 22:56 4115FreeMarker http://freemar ... -
Struts2 标签 <s:url>中添加多个<s:param>的奇怪问题 待整理
2011-01-14 13:27 1923问题描述(我的回复): http://went3456.ite ...
相关推荐
OSGI(Open Services Gateway Initiative)是一种开放标准,用于创建可模块化的Java应用程序。它提供了一种灵活的框架,使得开发者可以构建、部署和管理模块化组件,这些组件被称为服务或bundle。OSGI的核心理念是将...
OSGI(Open Services Gateway Initiative)是一种模块化系统和Java服务框架,它允许应用程序由一系列可独立更新和替换的模块组成,这些模块称为“bundle”。在本实例中,我们将探讨如何利用OSGI技术来开发Eclipse...
OSGi(Open Services Gateway Initiative)学习笔记(一) 在IT领域,OSGi是一种模块化系统和Java服务平台,它提供了一种动态管理软件组件的能力。本文将深入探讨OSGi的基本概念、架构以及如何使用它来构建可扩展和...
赠送jar包:osgi-resource-locator-1.0.1.jar; 赠送原API文档:osgi-resource-locator-1.0.1-javadoc.jar; 赠送源代码:osgi-resource-locator-1.0.1-sources.jar; 赠送Maven依赖信息文件:osgi-resource-locator...
赠送jar包:osgi-resource-locator-1.0.1.jar; 赠送原API文档:osgi-resource-locator-1.0.1-javadoc.jar; 赠送源代码:osgi-resource-locator-1.0.1-sources.jar; 赠送Maven依赖信息文件:osgi-resource-locator...
《深入理解OSGi:以org.eclipse.osgi_3.7.0.v20110613及其源码为例》 OSGi(Open Services Gateway Initiative)是一种Java模块化系统,它为开发人员提供了动态模块化的解决方案,使得Java应用程序能够更好地管理和...
OSGi(Open Services Gateway Initiative)是一种模块化系统和Java服务框架,它允许在单个JVM上运行多个版本的相同库或服务,从而解决了不同版本jar包冲突的问题。本示例通过一个名为“myself”的工程,展示了如何...
OSGi(Open Services Gateway Initiative)是一个由OSGi联盟(OSGi Alliance)维护和发展的开放性规范,它定义了如何在Java平台的基础上实现模块化编程和服务动态化。OSGi规范使得Java程序可以被设计成一套小型的、...
OSGi(Open Services Gateway Initiative)是一种Java平台上的模块化服务框架,它定义了一种标准,使得开发者能够构建可互操作的、动态的、模块化的软件系统。OSGi的核心概念是基于Java的模块化,它的主要目标是为...
OSGi(Open Services Gateway Initiative)是一种Java模块化系统,它为开发人员提供了一种动态、模块化的运行时环境。在OSGi中,应用程序被分解为称为“bundle”的独立单元,这些bundle可以相互依赖并独立地加载、...
OSGI(Open Services Gateway Initiative)是一种模块化系统和Java服务框架,它允许应用程序以模块化的方式构建,每个模块称为一个Bundle。在这个案例中,我们将探讨如何整合OSGI、Spring、Mybatis以及Spring MVC来...
OSGI组件编程是一种在Java平台上构建模块化应用程序的方法,它由OSGi联盟制定标准,并被广泛应用于企业级软件开发,尤其是对于需要高度可扩展性和动态性的系统。在本教程中,我们将深入探讨如何使用Eclipse和Equinox...
OSGI(Open Services Gateway Initiative)是一种Java模块化系统,它允许开发者将应用程序分解为一系列可独立部署、更新和交互的服务。林昊所著的《OSGI实战》与《OSGI进阶》是深入理解OSGI技术的重要参考资料,适合...
这个压缩包包含了关于OSGI的重要文档,分别是“OSGi R4核心规范文档”、“OSGi服务文档”以及“OSGi-最佳原理与实践”(王昊编著)。下面将详细介绍这些文档所涵盖的关键知识点。 首先,"OSGi R4核心规范文档"是...
《企业OSGi实战》一书是OSGi企业应用的权威指南,它不仅涵盖了OSGi在企业环境中的应用,还提供了Java企业版(Java EE)与OSGi特性的融合方法。本书详细介绍了模块化编程的重要性,以及OSGi如何强化Java的模块化能力...
标题 "org.osgi.core-4.2.0" 指的是一个特定版本的 OSGi(Open Services Gateway Initiative)核心框架库,版本号为 4.2.0。OSGi 是一个 Java 平台的模块化系统和服务平台,它提供了一种标准的方式来组织和管理 Java...
OSGi规范中文版是一本全面介绍OSGi技术的书籍,它不仅涵盖了OSGi技术的基础知识,还详细介绍了OSGi的内部结构和工作原理,对于想要深入学习和应用OSGi技术的开发者而言,是一本非常有价值的参考书。 ### OSGi规范的...
OSGi(Open Services Gateway Initiative)是一种开放标准,用于创建模块化Java应用程序。它提供了一种动态的、可扩展的框架,使得开发人员可以构建、部署和管理软件组件。本资源包含两本书籍:“OSGi原理与最佳实践...
资源名称:OSGI原理与最佳实践内容简介:国内第一本OSGi图书OSGi国内推广者林昊多年经验的结晶涵盖OSGi从入门到深入的知识体系引领OSGi国内研究和普及本书基于作者多年使用OSGi的经验而编写,涵盖了OSGi从入门到深入...