osgi

“Unresolved requirement: Import-Package” for a module not in my build.gradle

荒凉一梦 提交于 2019-12-02 09:34:26
I want to use Elasticsearch's Client Java class within a Liferay 7 SP4 FP30 module, so I wrote this build.gradle : dependencies { compileOnly group: "com.liferay", name: "com.liferay.portal.search.elasticsearch", version: "2.1.14" compileOnly group: "com.liferay", name: "org.elasticsearch", version: "2.2.0.LIFERAY-PATCHED-1" compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0" compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0" compileOnly group

Installing rxtx bundle in my Raspberry

人盡茶涼 提交于 2019-12-02 09:31:02
I want to install an rxtx bundle on my Raspberry Pi the bundle will be running on KURA platform (Equinox is the OSGi container for Kura) I installed the rxtx native library using: sudo apt-get install librxtx-java the .so was installed on the directory: /usr/lib/jni/ pi@raspberrypi /usr/lib/jni $ ls librxtxI2C-2.2pre1.so librxtxParallel.so librxtxRS485-2.2pre1.so librxtxSerial-2.2pre1.so librxtxI2C.so librxtxRaw-2.2pre1.so librxtxRS485.so librxtxSerial.so librxtxParallel-2.2pre1.so librxtxRaw.so Then I followed this link to wrappe the rxtx library in a bundle http://rxtx.qbang.org/wiki/index

How to support virtual hosts with OSGI HttpService

China☆狼群 提交于 2019-12-02 09:27:21
All examples of using an osgi HttpService show how to register servlets, resources, etc -- but all on the same service instance, and in the same namespace. How can I run multiple instances of the HttpService in osgi (preferably embedded), each with its own namespace, based on HTTP requests received for a specific IP address or hostname? There is a project on Google Code that purports to allow starting multiple HTTP Service . I've not used it but it might solve at least part of your query. 来源: https://stackoverflow.com/questions/8342560/how-to-support-virtual-hosts-with-osgi-httpservice

Can I inject proxies in front of Blueprint services published by other bundles?

夙愿已清 提交于 2019-12-02 09:06:06
We are using Karaf and a number of OSGI Blueprint services to implement a system. Is it possible to make a "BundleListener" type of bundle that, when present in the OSGI container, decorates our Blueprint services with a proxy so bundles referring these services will call the proxy instead? (I guess this could be accomplished either by somehow adding the proxy in front of the service already in the Service Registry, or by changing the reference obtained by the referring bundle - ServiceTracker.addingService style) The standard way to do these hacks is to use the service hooks in the OSGi core

Wiring a prototype in blueprint

半世苍凉 提交于 2019-12-02 09:01:15
问题 Like Spring, blueprint supports the prototype scope. But unlike Spring I can't see any documentation about how to use it. In Spring you can ask the context to give you a new bean, what's the equivalent in the Blueprint world? 回答1: BlueprintContainer.getComponentInstance() does exactly what you are looking for. osgi documentation: A Blueprint Container represents the managed state of a Blueprint bundle. A Blueprint Container provides access to all managed components. These are the beans,

SCA、SOA与OSGi概念浅析

与世无争的帅哥 提交于 2019-12-02 08:43:03
基于组件的编程一直是软件业简化编程和提高效率和质量的一个重要方法,但是往往对于不同语言我们有不同的组件模型,从而需要不同的调用方式。SCA的目的是使用户在构建企业应用时有一个不再直接面对具体的技术细节的层次,而是通过服务组件的方式来构建应用。这种方式也使得客户的企业应用具有良好的分层架构,能够很好的分离应用的业务逻辑和IT逻辑,不但易于应用的构建,也易于应用的更改和部署。 SCA全称Service Component Architecture,即服务组件框架。服务组件体系结构 (SCA) 是一个规范,它描述用于使用 SOA 构建应用程序和系统的模型。它可简化使用 SOA 进行的应用程序开发和实现工作。它由BEA、IBM、Oracle等知名中间件厂商联合制定的一套符合SOA思想的规范。 SCA是一个可执行的模型,用于将不同的 服务集成到一个业务解决方案。它简化了实现业务服务的组件编程模型,这些组件可以使用不同编程语言实现,对于企业应用,SCA还提供了关键的一些基础设施,像安全性、事务、可靠调用等,这对于企业应用的开发而言就变得很方便了。SCA确实可以成为企业应用开发的利器SCA确实可以成为企业应用开发的利器。SCA是第一项承诺提供一个组合模型以启用服务网络并支持构建下一代面向服务应用程序的技术。 SCA在2005年11月,发布了0.9版本的规范,其中包括了组装模型规范,Java/C+

How to make Pax logging to use the loggback config instead of the standard log4j properties like syntax

风格不统一 提交于 2019-12-02 08:24:36
I have some services in tomcat and trying to move to apache karaf. I have a existing service which uses logback for logging configuration. I tried to make same configuration in osgi, but could not achieve. Any please let me know what could be the problem? org.ops4j.pax.logging.cfg org.ops4j.pax.logging.logback.config.file=${karaf.home}/etc/logback.xml logback.xml is available at ${karaf.home}/etc/ --. Apache Karaf version : 3.0 , pax logging 1.7.1 which is packaged with karaf from build. After above configuration change, my karaf.log contents are : Jul 02, 2014 4:21:32 PM org.apache.karaf.main

Use restricted class in an OSGi Bundle

ぐ巨炮叔叔 提交于 2019-12-02 08:12:26
问题 For publishing with SSL using the Endpoint I need to access classes under the packages com.sun.net.httpserver.* Using the Eclipse IDE I found a way to use this classes. But exporting the bundles and running them in another equinox OSGi Installation I can't start the bundle throwing the following error: java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpsConfigurator Anyone an Idea how to solve this issue? Thanks! 回答1: The package you're referring to is part of the JDK. You need to

Use restricted class in an OSGi Bundle

半世苍凉 提交于 2019-12-02 06:51:56
For publishing with SSL using the Endpoint I need to access classes under the packages com.sun.net.httpserver.* Using the Eclipse IDE I found a way to use this classes. But exporting the bundles and running them in another equinox OSGi Installation I can't start the bundle throwing the following error: java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpsConfigurator Anyone an Idea how to solve this issue? Thanks! The package you're referring to is part of the JDK. You need to expose it, to make it available in OSGi and you have two options: The first, and in most cases preferred option

How to make something on startup in Eclipse E4 application?

好久不见. 提交于 2019-12-02 06:09:42
问题 I want to run something exactly after E4 RCP application starts. How to do that? 回答1: You can do this with a LifeCycle class. You specify this in the lifeCyceURI property of your product: <extension id="product" point="org.eclipse.core.runtime.products"> <product name="%product.name" application="org.eclipse.e4.ui.workbench.swt.E4Application"> <property name="lifeCycleURI" value="bundleclass://plugin-id/package.LifeCycle"> </property> .... The PostContextCreate annotation runs very early in