osgi

Quartz scheduler and OSGI

百般思念 提交于 2019-12-04 15:52:41
I have an OSGI scheduler bundle that has the Quartz Scheduler Jar in it. This bundle exposes just an application interface to other bundles and, when a new job is registered, it is wrapped into a temporaryJob (that implements StatefulJob) and scheduled using the scheduler. In this way I don't have to expose Quartz Scheduler jar (that it is not so much osgi compliant). The problem with this approach is that, since StatefulJob avoids to execute job in parallel and I have only one actual job (the temporaryJob), all my real jobs run one at a time. Unfortunately it seems that the marker interface

Servicemix 4, DOSGi, and Zookeeper

孤街浪徒 提交于 2019-12-04 15:48:27
This is cross posted from the fusesource forum and the servicemmix forum . I can't get DOSGi working in FUSE. I'm trying to get CXF's DOSGi 1.1-SNAPSHOT with Zookeeper discovery onto FUSE 4.1.0.2. I'm also using Zookeepr 3.2.1. Everything works perfectly on Felix 2.0.0. I just follow the instructions on the DOSGi Discovery page and then install the Discovery Demo bundles. For DOSGi, I just use the cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar for DSW and cxf-dosgi-ri-discovery-singlebundle-distribution-1.1-SNAPSHOT.jar for zookeepr discovery. Then when I start the sample bundles with

Can you have JSF custom components in different OSGi bundles?

本秂侑毒 提交于 2019-12-04 15:38:26
Has anyone used OSGi and JSF together? I ask because JSF uses class-loader magic to find custom components. From a tutorial (emphasis mine): This configuration file will end up being META-INF/faces-config.xml in the .jar file that represents this component. JSF will look for such a file name in each of the .jar files that are loaded at runtime (in the WEB-INF/lib directory for .war files) and use each of them in its configuration. In this way, multiple component .jar files can be combined into one web application, and all of the components described in each .jar will be available to the

How do you communicate between eclipse declarative services and Views (ContentProviders)

别来无恙 提交于 2019-12-04 13:37:25
问题 Say you have an eclipse plugin with various views, these views should display data from some OSGi bundle that pushes data to the Views. Rather than have every view communicate with the OSGi bundle, I have an intermediate Facade class that acts as a blackboard for the views and manages communications between the views and the other OSGi bundle--well, that's the theory. The problem comes about because the ui bundle (with the Views and the Facade) communicate with the other bundle (call it the

Where are the Configurations made in OSGi Console saved?

折月煮酒 提交于 2019-12-04 12:56:10
When we update any configuration for a component in the Configurations tab in the Apache Felix Web OSGi Console, where are these configuration settings saved? This is with respect to AEM 6.0 or above. The manually saved configuration settings are stored in the the crx-quickstart/launchpad/config directory (in your AEM installation folder in the local file system) and, on top of that, as .config files in the Content Respository at /apps/system/config . For example, if you're looking for the configuration of com.example.MyComponent , you can find it as a text file in crx-quickstart/launchpad

Java Unit Test: Replace a private method under test

被刻印的时光 ゝ 提交于 2019-12-04 12:32:06
Is there any way of replacing the logic within a private method when running a JUnit test? A bit of background: we have some private methods which interact with bundles within an OSGi container. This is not available in the unit test therefore the methods will fail. We have looked at JMockIt but the method replace functionality seems to want to force you to replace all the methods in the class which call one another. The implementation would be something like this: public final doSomething() { firstThing(); secondThing(); } private firstThing() { // normal code } private secondThing() { //

access common property file inside bundle with osgi

自作多情 提交于 2019-12-04 11:47:50
I have an osgi application (in felix) with multiple bundles. There are some common property files in one bundle and the rest of the bundles need just use them. We use maven and spring osgi, the property files are in resouces like: <path to bundle>/src/main/resources/ common.properties engine.properties ... Maven builds them inside the bundle jar normally so they should be in an application classpath, but Spring has no access to them, this fails: <context:property-placeholder location="classpath:common.properties" /> (tried classpath*: and other combinations) I've read this and this Is it

Apache POI 3.17 in OSGi

会有一股神秘感。 提交于 2019-12-04 10:48:10
Preamble: I've seen this question , but it's obviously about an older version of POI, and Apache went contra to every Java standard since then. Problem: My goal is to get POI to work with OSGi. As of now I'm pretty sure that's not possible, but maybe one of you guys has a good idea. What I tried so far: 1) Bundling the JARs The easiest would be to add bundle information directly to the POI jars (the other answer has details on how to do that). This cannot work, because the JARs export the same packages, e.g. poi-3.17.jar and poi-ooxml-3.17.jar both export org.apache.poi , which is not allowed

Unresolved JavaFX packages in OSGi Felix Application

こ雲淡風輕ζ 提交于 2019-12-04 10:43:39
I develop a rich application based on JavaFX and the OSGi Felix container. When my JavaFX is started, an org.osgi.framework.BundleException is thrown indicating that the framwork could not wire my JavaFX packages : ERROR: Bundle app-impl-bundle [3] Error starting eclipse-project:T:\workspace\fast-osgi\app-impl-bundle\ (org.osgi.framework.BundleException: Unresolved constraint in bundle app-impl-bundle [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=javafx.stage)(version>=2.2.0))) Here my MANIFEST.MF file : Manifest-Version: 1.0 Bundle

Wicket calling a lengthy operation and updating through ajax

▼魔方 西西 提交于 2019-12-04 10:39:54
Based on this SO question , I've come to an understanding that Wicket queues subsequent AJAX requests. Now my page is ridden with several AJAX requests and I'd like to add one more that spawns a lengthy operation. public void populateItem(final Item item) { final MyObject object = (MyObject) item.getModelObject(); // ... a couple of fields Label statusLabel = new Label("status", new AbstractReadOnlyModel() { @Override public Object getObject() { return someService.doSomeLengthyOperation(); } }); statusLabel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); item.add(statusLabel) }