osgi

View osgi bundles' dependencies?

穿精又带淫゛_ 提交于 2019-12-05 12:14:44
I am looking for a tool in Eclipse that I can view graphically all osgi bundles' dependencies. Anyone has any ideas, please? The STAN bundle and project dependency views are free add-ons. Here's a sample dependency graph: http://stan4j.com/images/stories/misc/plugin-deps.png Quick feature list: horizontal, vertical, narrow layout options node markers +/- indicate outgoing/incoming dependencies currently not shown double-clicking a node adds outgoing dependencies double-clicking a node while holding the control key adds incoming dependencies not shown edge labels indicate "requires-bundle" and

Runtime loading of Controllers for Spring MVC and dynamically mapping requests/URLs

时光怂恿深爱的人放手 提交于 2019-12-05 12:10:12
We are starting a new project using Spring MVC, and we would like to move away from annotation-driven request/url mapping. We wish to implement the following use case: Use Case A User enters a URL. The request mapping handler retrieves a list of mappings (e.g. from the DB), and based on this dynamic list of mappings, it calls the relevant controller. This is because we want to be able to do the following as well: Use Case B We want to load a new Controller (perhaps a new reports module) into the web app without having to redeploy or do a server restart. We will map this new Controller to a URL

Eclipse RCP 4 use bundle via declarative service

纵然是瞬间 提交于 2019-12-05 11:44:55
I have written an OSGi bundle to use it in my eclipse 4 rcp application. The usage of the service works fine if I add the dependencies, register these service in my activator and inject it in my class. In activator IUserService service = new TestUserService(); context.registerService(IUserService.class.getName(), service, null); In my class @Inject IUserService service; service.getSth(); I read that using bundles via declarative services should be the better way. So changed my implementation. I created a component definition in my bundle to provide my service: <?xml version="1.0" encoding="UTF

OSGi implementation for .NET

无人久伴 提交于 2019-12-05 11:15:32
Is there work on implementing a .NET version of the OSGi plugin architecture (or something similar)? I have only found this paper, but no real library. Any pointers? I do not know much about OSGi, but you should take a look at Managed Extensibility Framework project. I believe it provides some subset of functionalities of OSGi. Yes, there is a commercial product named UIOSP(XAUI Open Service Platform) which is the .NET implemented based-on OSGi specification R4 by a startup software company, Xi'an UI, in China. Well, now only Chinese version available. You may try contact with e-mail (uishell

How to stop an OSGI Application from command line

这一生的挚爱 提交于 2019-12-05 10:44:17
I do have a running osgi (equinox container) application. It will been started via a bash script. See felix gogo shell java -jar ... _osgi.jar -console 1234 & This all works pretty well and I also can stop it via telnet localhost 1234 <osgi>stop 0 But what I am looking for is how can I embed this into a bash script to stop the osgi application. I already tried this echo stop 0 | telnet localhost 1234 but this doesn't work. So if someone has idea how to put this in a bash script, please let me know. Neil Bartlett Telneting into the Gogo shell seems like an awfully fragile solution. Why not

JBoss 系列八十五: JBoss Modules 简单介绍

佐手、 提交于 2019-12-05 08:22:35
概述 从JBoss AS7开始,Classloader这块开始使用全新的JBoss Modules。本文简单介绍说明JBoss Modules的设计思路,以及给出一个例子说明这一设计思路。 JBoss Modules 介绍 我们都知道,Java一直使用classpath的方式来加载各种class和jar的资源。这样的方式会造成许多问题,比如下面这些经常会遇到的问题: 一个大的项目中,有的classpath当中的资源被加载后可能根本不会被用到,这就造成了系统资源的浪费 同一个classpath当中的资源,可能包含多个不同版本的同一个资源,这就造成了版本冲突,可能会导致整个项目无法运行并且很难进行排错,因为我们的项目可能非常大,里面有成百上千个jar,要想找到相冲突的资源,非常困难 针对这些问题,JBoss Modules都从设计上面给出了解决方案: 通过使用module.xml描述文件定义模块,在这个描述文件中要包含模块的名称,都包含哪些资源(一般一个模块对应一个jar文件,也可以包含多个jar或其它资源),这些资源的版本号,以及这个模块都依赖于哪些模块。 每一个模块都可以实时地加载或卸掉。这样做有很多好处:首先是资源方面的节省,只有需要的模块才被加载(这一点是通过module.xml中定义的模块之间的依赖关系来实现的),这一方式同时来带的好处是:整个系统的加载速度大大提升了

Dynamic target queries in OSGi with DS

百般思念 提交于 2019-12-05 07:45:33
When I use a reference in DS I can specify a target that will allow me to narrow down which service instance I want. The problem is that all the examples show static queries that must be done at code time. Is there a way to do a dynamic query (maybe pull in a property from Configuration Admin)? If DS does not support this is there another OSGi dependency injection framework (blueprint, iPojo, etc) that will support this? You can always use the target attribute of the reference to peform a first level filter. The if your bind method has the signature void <method-name>(<parameter-type>, Map);

EclipseLink : No Persistence provider for EntityManager named

房东的猫 提交于 2019-12-05 07:30:53
I'd like to create one Bundle that is able to use Java Persistence. To achieve this, I've created a plugin project within Eclipse. In my project, I've created a persistence.xml file into META-INF. I've aslo added in my MANIFEST.mf (into the depencies) those 3 packages : javax.persistence.jar org.eclipse.persistence.jar org.eclipse.persistence.jar Then, in my Activator I use this lines to create an EntityManager : factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); EntityManager em = factory.createEntityManager(); To execute my bundle, I've made a product configuration.

Can't capture Apache Karaf client output

元气小坏坏 提交于 2019-12-05 05:55:11
I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following: [apache-karaf-3.0.0]$ ./bin/start clean [apache-karaf-3.0.0]$ ./bin/client "bundle:list" Logging in as karaf 282 [pool-2-thread-3] WARN org.apache.sshd

logback in spring-OSGI with pax-runner

爱⌒轻易说出口 提交于 2019-12-05 03:43:15
问题 We are running OSGI bundles with pax-runner. We are logging using logback over slf4j. The problem is logback tries to look for logback.xml in classpath, but in pax-runner where should I place logback.xml so that pax-runner configure logback accordingly? I have tried with JoranConfigurator to load logback.xml which is included in bundle classpath, but it assumes classpath as the container in which the bundle is running (in my case it is runner folder where all the bundle jars are placed). Any