osgi

Play framework and OSGI

大憨熊 提交于 2019-12-12 07:48:03
问题 Is it possible to integrate play framework with OSGI to create plugable components? Did someone try it? 回答1: If you mean "create Play modules with OSGi", then no, it's not supported If you mean "deploy Play as an OSGi module" then no, it's not supported And to be fair, there's no reason to push its support. You can read these thoughts from Spring founder on OSGi, as an example. OSGi would add extra complexity to Play, while the main aim of Play is to be a rapid development platform, simple to

Getting OSGi services from a bundle in Sling/CQ

寵の児 提交于 2019-12-12 07:32:49
问题 I am using Day CQ. I want to store some data in a SQL Server DB, using the connection pool available in the Felix console. I can do this from a JSP, by using the "sling" object of type SlingScriptHelper defined in the defineObjects tag sling.getService(DataSourcePool.class). However, I want to use a servlet created in an OSGi bundle to handle requests from the client. The servlet doesn't have a defineObjects tag, so the "sling" object is not defined. I don't see a way to create a valid

Unable to force eclipse to use Saxon XSLT processor

隐身守侯 提交于 2019-12-12 06:45:40
问题 I am newbie to OSGi and working on some java application with eclipse and need to use XSLT processor. I need to use Saxon processor. I have included it's dependency in OSGi bundle classpath and MANIFEST.MF like below: but I am getting following error: c.p.s.x.SchematronProviderXSLTFromSCH - Schematron preprocessor error java.lang.ExceptionInInitializerError: null at com.phloc.schematron.xslt.SchematronProviderXSLTFromSCH.<init>(SchematronProviderXSLTFromSCH.java:121) ~[phloc-schematron-2.7.1

EclipseLink Core 2.5.2 missing Import-Package javax.xml.bind

自闭症网瘾萝莉.ら 提交于 2019-12-12 06:14:04
问题 The EclipseLink bundle (org.eclipse.persistence/org.eclipse.persistence.core/2.5.2) is missing the import statement javax.xml.bind in its header entry of Import-Package . I get the same error described here: Glassfish 4 moxy eclipselink 2.5.2 oxm object graph troubles I add to declare javax.xml.bind as bootdelegated in OSGi, otherwise EclipseLink MOXy is not working properly. Is it possible to fix this? 回答1: Fixed this bug in EclipseLink 2.5.3. Also, EclipseLink 2.6.0 does not contain this

How to check if a class in an OSGi bundle has been correctly unloaded?

牧云@^-^@ 提交于 2019-12-12 05:52:19
问题 I have an application which I suspect to leak some class references. To expose that buggy behaviour, we wrote a test : BundleUnloadIT In that test, I use Assertions.assertThat(weakReference.isEnqueued()) .as("weak reference should have been enqueued, but is not").isTrue(); To test if my reference is correctly gc'ed. But whatever I try to do, the reference is never enqueued. So I suspect some reference to that class is leaking somewhere. So ... am I using the right method to test my class is

registering servlet in OSGi that receives parameters

旧巷老猫 提交于 2019-12-12 05:39:50
问题 I'm trying to register a HttpServlet that will receive parameters (don't really care if it is via POST or GET, altough POST preferred obviously). Pretty much just extending what is depicted here: http://www.javaworld.com/javaworld/jw-06-2008/jw-06-osgi3.html?page=3 And here: http://www.peterfriese.de/osgi-servlets-a-happy-marriage/ I'm not using still declarative registration, first want to see it working, then I'll do the other stuff. Doubt arises when calling: httpService.registerServlet("

osgi - multiple instances of a service

落花浮王杯 提交于 2019-12-12 05:14:18
问题 How can I create multiple instances of a bundle that consumes an external webservice? An external webservice requires clients to logon before using the services. I have multiple accounts. The problem is I want to be able to add multiple instances; one for each account. Each instance is an osgi declarative service that consumes the external service. Do I have to deploy a new bundle for each account? This does not feel like the right way to solve this. 回答1: Is that bundle under your control -

Maven: prefers manifest dependencies over pom.xml dependencies

二次信任 提交于 2019-12-12 05:12:00
问题 I have project which requires one library. This lib is already in the local repro. I told the project through its pom.xml that it depends on this lib like this: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>de.mygui</groupId> <artifactId>de.mygui

Create a hello world bundle in eclipse and check the working jar file on CRX

人盡茶涼 提交于 2019-12-12 04:56:10
问题 I am learning Adobe CQ5 on my own. I had pulled the folder structure of jcr_root to my eclipse workbench using vaultclipse. Now my request is can someone provide me some references wherein I can write a hello world bundle in eclipse, bundle it and then push the jar file onto CRX.? To be simple, Steps to achieve a working bundle on CRX which we have created on eclipse environment. What ever I have been through the reference links of Adobe CQ5 blogs, I see most of them are on CRXDE environment

Felix Bundle has lots of wrong imports

╄→尐↘猪︶ㄣ 提交于 2019-12-12 04:39:39
问题 I am very confused by the felix-bundle plugin. The documentation says of the Import-Package tag This header rarely has to be explicitly specified. However, in certain cases when there is an unwanted import, such an import can be removed by using a negation package pattern But I am building a plugin and it seems to be importing lots of things that I don't want. javax.servlet is going in, as are junit.* and org.junit.*, and org.testng, and some apache logging packages. All of these are making