osgi

Howto: osgi and shared packages?

北战南征 提交于 2019-12-11 17:53:02
问题 Im trying to write an osgi-application that should make use of the org.elasticsearch.client.RestHighLevelClient. For this I have added the bundle servicemix.bundles.elasticsearch-client since it exports org.elasticsearch.client with the needed RestHighLevelClient . Apparently though, it seems that the RestHighLevelClient needs servicemix.bundles.elasticsearch (amongst others) to work so I add that aswell - both of the same version. Both of the bundles export org.elasticsearch.client but with

Customize search results in Liferay 7.2 [closed]

我怕爱的太早我们不能终老 提交于 2019-12-11 17:14:38
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 months ago . I need to customize the search results page in Liferay in the following way: results must be displayed as a list of card with title, abstract (if present) and link to detail on the side of the page, there should be list of tags or categories of the results How can I achieve that?

AEM 6.3 Using OSGi R6 Annotations and Sling Models

≯℡__Kan透↙ 提交于 2019-12-11 16:59:08
问题 I am trying to create an OSGi Service using OSGi R6 annotations and then injecting it in the Sling Model class like this: package com.aem.sites.models; import javax.annotation.PostConstruct; import javax.inject.Inject; import org.apache.sling.api.resource.Resource; import org.apache.sling.models.annotations.Model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.aem.sites.services.WeatherService; @Model(adaptables=Resource.class) public class Banner { final static Logger

Resolving workspace dependencies for Virgo in Eclipse

こ雲淡風輕ζ 提交于 2019-12-11 15:28:24
问题 I'm looking to get started with Eclipse Virgo, so I grabbed the required plugins for Eclipse based on the Programmer Guide. Next, I started two new projects in my Eclipse workspace, both configured as Virgo bundles (call these A and B). Then, I created a new class com.foo.Bar in bundle B. I modified the Manifest of bundle B to export com.foo , saved. Last, I imported com.foo in bundle A. Bundle A's manifest has an error: Import-Package: com.foo [0.0.0, oo) could not be resolved What do I need

OSGi ConfigurationAdmin Service

不羁的心 提交于 2019-12-11 15:08:01
问题 There seem to be 2 ways to get the Configuration Admin service from the OSGi service registry. One by instantiating BundleContext, then getting ServiceReference from that, then ConfigurationAdmin from that: BundleContext bc = FrameworkUtil.getBundle(ManagedService.class).getBundleContext(); ServiceReference ca = bc.getServiceReference(ConfigurationAdmin.class); ConfigurationAdmin configAdmin = (ConfigurationAdmin) context.getService(ca); Another by using Blueprint and simply creating a

How to create Swing OSGi bundles on AWT EventQueue with Spring DM

好久不见. 提交于 2019-12-11 14:06:15
问题 I have an OSGi target platform consisting of Equinox, the Spring Framework, Spring DM, and several custom bundles for my application. All of my bundles contain Spring application contexts and so are automatically loaded by the Spring OSGi extender. Some of my bundles contain Swing ui components. The problem is that the Spring OSGi Extender does not create these application contexts on the AWT EventQueue which results in several ui issues. The only workaround I've found so far is to create a

How to use JACOB in an OSGi application?

心不动则不痛 提交于 2019-12-11 12:58:53
问题 I have an OSGI (more precsiely a Wisdom framework-based) application in which i would like to use the JACOB library to interact with Office (the goal being to transform PPT into images). I can easily add the JACOB jar to my CLASSPATH, but JACOB requires the dll to be available in the java.library.path environment variable. Question : How can I add it in my maven build? EDIT I'm using maven 3 回答1: You probably have three possibilities for this use case MAVEN_OPTS You could use the MAVEN_OPTS

Karaf add additional property to existing config file

天大地大妈咪最大 提交于 2019-12-11 12:49:11
问题 I have a bundle which uses a configuration file org.jemz.karaf.tutorial.hello.service.config.cfg with one property: org.jemz.karaf.tutorial.hello.service.msg="I am a HelloServiceConfig!!" My blueprint for using ConfigAdmin is like: <cm:property-placeholder persistent-id="org.jemz.karaf.tutorial.hello.service.config" update-strategy="reload" > <cm:default-properties> <cm:property name="org.jemz.karaf.tutorial.hello.service.msg" value="Hello World!"/> </cm:default-properties> </cm:property

OSGI: bundles, class inheritance and maven scope

不想你离开。 提交于 2019-12-11 12:45:26
问题 I have three maven projects as three osgi bundles (that is one project is one bundle). And I have three classes - one class in each bundle. Project/Bundle 1: class A{} pom: Project/Bundle 2: class B extends A{} pom: <dependency> <groupId>com.company</groupId> <artifactId>project1</artifactId> <version>1.0.0</version> <scope>provided</scope> </dependency> Project/Bundle 3 class C extends B{} pom: <dependency> <groupId>com.company</groupId> <artifactId>project2</artifactId> <version>1.0.0<

OSGI: how to export system packages on felix during runtime

拈花ヽ惹草 提交于 2019-12-11 12:34:18
问题 When I need to export some system packages I do: final Map configMap = new HashMap(); configMap.put(Constants.FRAMEWORK_STORAGE_CLEAN, "onFirstInit"); configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA,"my packageshere"); felix = new Felix(configMap); But how can I export some packages during runtime? For example, on working osgi framework I want to install some bundle which requires some system packages which I didn't export when I start felix. 回答1: There is no way to do this dynamically