osgi

Non-osgi library usage in an osgi application

喜你入骨 提交于 2019-11-30 05:15:15
Is it possible to use a non-osgi library with an OSGi application? For an example, I'm developing a semantic based search engine, and I am using a third party Natural Language Processing library for it ( http://wiki.opencog.org/w/RelEx_Dependency_Relationship_Extractor ). Is it possible to interface such a library which doesn't suport OSGi, as a couple of jar files, with my OSGi application? Piotr As it was written in previous answers you have two options if you want to use additional libraries in your bundles: embedding library jars in a bundle in which it will be used, creating a valid OSGi

Integrating Equinox OSGi into Apache Tomcat web app

流过昼夜 提交于 2019-11-30 04:56:59
问题 Is it possible to introduce osgi-equinox into existing java Apache Tomcat project? From my understanding OSGI must run inside some kind of "container". How would I integrate it? I am also using Jersey for RESTful resources. 回答1: You may want to look at this question: OSGI runtime inside traditional Java EE server. In this bridge model, a special servlet is installed and Tomcat invokes this servlet to handle the request. An OSGi runtime is spawned from within this servlet, but the OSGi runtime

Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

旧时模样 提交于 2019-11-30 04:29:09
问题 So I was working with JSTL in OSGi, under Gemini runtime. And I'm getting following exception, when I try to access the url to my servlet : - SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /WEB-INF/login.jsp (line: 3, column: 66) Unable to read TLD "META-INF/c.tld" from JAR file "file:/D:/OSGi%20Runtime/Gemini/gemini-web/dep/com.springsource.javax.servlet.jsp.jstl-1.2.0.v20110728.jar": org.apache.jasper.JasperException: Failed to load or

Can Eclipse 3.5 discover all bundles in the plugins dir?

六眼飞鱼酱① 提交于 2019-11-30 03:13:31
问题 Simple usecase : assemble an Eclipse product using simple scripts, just dumping bundles into the plugins dir . This used to work with 3.3 - with 3.5 it's broken: my application doesn't start as the app plugin is not found. Question : what's the easiest way to fix that? This seems to be the only pain in the whole upgrade process for me. Attempts : I guess this is a no-no for P2: it maintains the bundles.info file instead, which is probably very smart.. a bit too smart for me. Some ideas I had:

Can Spring Boot be used with OSGi? If not, any plans to have an OSGi Spring Boot?

不打扰是莪最后的温柔 提交于 2019-11-30 02:27:18
Can Spring Boot be used with OSGi? If not, any plans to have an OSGi Spring Boot (Apache Felix or Eclipse Equinox)? In my opinion, cloud applications must be highly modular and updatable like OSGi offers. Yes, it's possible to run Spring Boot apps in OSGI container. First of all, you'll have to switch from Spring Boot jar packaging to OSGI bundle . If you're using Maven you can use org.apache.felix:maven-bundle-plugin for doing that. As Spring Boot dependency jars are not valid OSGI bundles, we should either make them valid bundles with bnd tool or we can embed them into the bundle itself.

How is the OSGi bundle start level defined?

三世轮回 提交于 2019-11-30 01:49:03
问题 How is the OSGi bundle start level defined? I am using Apache felix and would like to persist the start level across framework executions. I do not anticipate a need to change the start level of a bundle very frequently at all an an entry in Manifest.MF seems the most sensible. I've to org.osgi.framework.startlevel but have not seen a practical example. I am also using maven with the maven-bundle-plugin, if there is an elegant way to incorporate the start level in the POM that would be

Tycho and Eclipse: How to resolve OSGI dependencies to my own bundles at development time within Eclipse, without opening all of them in the IDE

白昼怎懂夜的黑 提交于 2019-11-30 00:47:35
Background My Eclipse RCP application is built using Tycho. It consists of multiple components (in the form of OSGi bundles/Eclipse plug-ins). One of these component contains the product file and materializes the product. There is a reactor POM at the application root, which builds all components in order, but I also want to build other components independently (using mvn deploy ) . Building such a single component works as follows: Retrieve the latest versions of all the component's dependencies from our company (p2) repository. Build the component. Deploy the component to our company

OSGI OBR repository hosting?

孤者浪人 提交于 2019-11-30 00:33:01
Does anyone know of any services that provide OBR for hosting my own Bundles? Something like github - but for bundles. (If not - did anyone ever create their own OBR server, and how hard was it?) EDIT: I found one solution by Nexus Pro , but it seems like its too expensive for mere mortals (as price for pro is nowhere to be seen). SpringSource , Apache Sling , and the OSGi Alliance have repositories and ServiceMix has its own bundles but all are privately maintained with varying levels of public influence. There's an old public repository out there that Richard Hall used to maintain. This is

How to work with frequent local snapshot bundle deployments on Karaf?

孤者浪人 提交于 2019-11-30 00:18:02
I decided to build an application on top of OSGI and Karaf - I really like this stuff. However, I'm struggling a bit with a daily deployment on my local, development machine. I mean.. I make a change and then I would like to test it on my local Karaf instance. And it can happen like couple times per hour. The way I'm doing it now is a maven build that creates a JAR bundle and then it's copied into the Karaf's deploy directory. I think that it isn't elegant at all. I was trying to find a way around (google). I read about Karaf's features but it seems that despite the fact that it is a nice

Best technique for getting the OSGi bundle context?

回眸只為那壹抹淺笑 提交于 2019-11-29 23:41:15
Each bundle in my OSGi project has its own BundleActivator, which I think is normal. This gets passed the current BundleContext, which is useful to have around for getting service references and whatnot. However, from classes in my bundle, how can I get the BundleContext? Assigning it to a public static field in the BundleActivator sucks and passing it around as an argument also sucks. Is there a more intelligent way? Ivan Dubrov You can use FrameworkUtil.getBundle(ClassFromBundle).getBundleContext() . See FrameworkUtil JavaDoc . A good practice when developing OSGi bundles in my opinion is to