osgi 1 « osgi « Java Enterprise Q&A





1. When should a multi-module project to split into separate repository trees?    stackoverflow.com

Currently we have a project with a standard subversion repository layout of: ./trunk
./branches
./tags However, as we're moving down the road of OSGi and a modular project, we've ended up with: ./trunk/bundle/main
./trunk/bundle/modulea

2. Exposing a remote interface or object model    stackoverflow.com

I have a question on the best way of exposing an asynchronous remote interface. The conditions are as follows:

  • The protocol is asynchronous
  • A third party can modify the data at any time
  • The command ...

3. What does OSGi solve?    stackoverflow.com

I've read on Wikipedia and other sites about OSGi, but I don't really see the big picture. It says that it's a component based platform, and that you can reload modules ...

4. Is it possible to do bytecode manipulation when using OSGi?    stackoverflow.com

I'm making an application server and in it I need to use some bytecode manipulation (e.g. inserting custom equals and hashCode methods to classes annotated with @Entity). Now I ...

5. iPOJO: Why would InstanceManager's getPojoObject() return null?    stackoverflow.com

I'm using the Felix OSGi iPOJO library, and I'm programmatically accessing Factories to create ComponentInstances. I've read over the code here: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java?view=markup to try to figure out why my call ...

6. Is mobile OSGi ready for real world usage on mobile phones?    stackoverflow.com

I'm developing applications for mobile devices. I've never developed for OSGi and right now, I'm considering to get started with it. I've read a lot about using OSGi on mobile phones, and ...

7. ServiceTracker in OSGi r4.1    stackoverflow.com

Im using a org.osgi.util.tracker.ServiceTracker (PrintableServiceTracker implements ServiceTrackerCustomizer and simply prints when a new service is added).

Filter filter = bc.createFilter("(objectClass=se.enea.print.Printable)");
         tracker = new ...

8. OSGi and J2EE - JOSGiEE?    stackoverflow.com

After reading this article, one question came to my mind: 'Is OSGi becoming a J2EE? Is OSGi going to replace J2EE? Is OSGi incrementing J2EE?' It's true that historically ...

9. More than one implementator of an interface. How with OSGi?    stackoverflow.com

I am interested in using OSGI as a means of managing plugins for a project. That is there can be many implemenators of my interface, each appearing in its own / ...





10. History: why Eclipse foundation had chosen OSGi?    stackoverflow.com

Was there concurrent technologies at that time? What was advantages of OSGi compared to other technologies and to native (pre 3.0) technology?

11. OSGi SAT, how should we deal with activation failure?    stackoverflow.com

The eclipse OSGi Service Activator Toolkit provides a framework that simplifies handling the dependencies between budles. One can derive from org.eclipse.soda.sat.core.framework.BaseBundleActivator and over-ride (for example) the activate() method to do some ...

12. How to run an OSGi framework within usual java-code?    stackoverflow.com

Can anybody give me an example how to use the osgi framework classes? I haven't a clue how to use those classes ... BR, Markus

13. Break-even point for OSGi    stackoverflow.com

It seems that OSGi is a hot term these days. Many benefits are invoked:

  • Reduced Complexity
  • Reuse
  • Easy deployment
  • Versioning
(etc) I'm asking for a very specific use case - small to medium-sized web applications. ...

14. OSGi initial provisioning, talks about ZIP dictionary entries?    stackoverflow.com

The osgi R4 specification on 'initial provisioning page 231' talks about 'The result of the request must be a ZIP file(content type application/ZIP)'...'The zip file may contain only four ...

15. Managing a Large OSGi Application    stackoverflow.com

I have a large, growing OSGi application with a number of bundles. I am curious to know the best way to manage this type of application. Currently, I am using Eclipse ...

16. Will eclipse/osgi activators always be called at least once before code is accessed?    stackoverflow.com

In Eclipse (3.3) I have a plugin User, depending on plugin Provider. Provider has an activator. On the Plugin Editor for provider it has a checkbox "Activate this plug-in ...





17. Is it possible to run OSGi components within Weblogic 10.3?    stackoverflow.com

Is it possible to run OSGi components within Weblogic 10.3? From what i have read it is not possible but im asking just to be 100% sure. There is no option ...

18. What's new in OSGi 4.2?    stackoverflow.com

OSGi 4.2 has just been released which updates the 4.1 specification with a few new RFCs. So, what's particularly new with OSGi 4.2, which frameworks support 4.2 already (or ...

19. Running JAI in OSGi    stackoverflow.com

I'm trying to run Java Advanced Imaging (JAI) within an OSGi container (spring-dm). I'm able to access the JAI libraries, but receive the following error when I call JAI for ...

20. Does Tycho work with Eclipse 3.5    stackoverflow.com

I've finally got round to looking at Tycho (a bridge between Maven 3 and OSGi), but I am not getting very far. Following this tutorial I have ...

21. What are reasons for eclipselink failing to autodetect entity classes?    stackoverflow.com

I'm running eclipselink in an OSGi container and my entity classes are in their own bundle. I have repeatedly run into the problem that Eclipselink fails to autodetect the entity classes, resulting ...

22. Can't get SWT Display on Mac OS X    stackoverflow.com

I'm running Mac OS X Snow Leopard and wan't to access the Display from the activator in an OSGi bundle. Below is the start method for my activator:

@Override
public void start(BundleContext context) ...

23. Achieving Eclipse-like OSGi launcher    stackoverflow.com

I am building an OSGi application and need to create an Eclipse-like OSGi application launcher. For those who do not know, when an OSGi application is run through Eclipse's OSGi framework, Equinox ...

24. Java: Dynamically Load Multiple Versions of Same Class    stackoverflow.com

I've looked all around and I haven't been able to figure out how to accomplish this. What I'd like to be able to do is to load set of classes, probably all ...

25. Federated Identity Management    stackoverflow.com

I'm looking for a way to pull user (eg. inetOrgPerson) information in a federated way. For the most part, this information will come from LDAP but could come from secondary ...

26. When to use ServiceTracker vs ServiceReference    stackoverflow.com

I am just starting with OSGI programming and have come across two ways to listener for services being activated. The first way, from an EclipseRCP book, uses ServiceReference:

String filter="(objectclass="+IModelCreator.class.getName()+")";
context.addServiceListener(this, filter);
modelCreators = Collections.synchronizedMap(
 ...

27. How to restrict program resources + rights in JVM/OSGi?    stackoverflow.com

I want to create a website where people can solve programming tasks and eventually upload their solution (in any JVM-language) in order to verify it and share it with others. I figured ...

28. Question about OSGi for embedded    stackoverflow.com

I am going to work on the OSGi-based Embedded/Mobile applications. I have some confused questions need to be clarified. (1) Can Equinox run on J2ME environment or not? (2) How to start ...

29. When should I use Import-Package and when should I use Require-Bundle?    stackoverflow.com

OSGi allows for dependencies to be determined via Import-Package, which just wires up a single package (exported from any bundle), and Require-Bundle, which wires up to a specific named bundle's exports. In ...

30. When to use ServiceLoader over something like OSGi    stackoverflow.com

Being someone who is allergic to dependencies, when would I use something like OSGi instead of the built in java 6 http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html (I want to let plugin jars just ...

31. OSGi or Impala?    stackoverflow.com

I have been deep-divining in osgi from past few months and must say impressed by it. In recent days I saw one blog saying that impala is better than osgi. I ...

32. Is the resolution problem in OSGi NP-Complete?    stackoverflow.com

The resolution problem is described in the modularity chapter of the OSGi R4 core specification. It's a constraint satisfaction problem and certainly a challenging problem to solve efficiently, ...

33. OSGi ConfigAdmin not clear about value types for update Dictionary    stackoverflow.com

The OSGi ConfigAdmin passes a Dictionary instance into ManagedService.updated(); the service is then expected to extract the new values from the dictionary. That's great and works fine, but one thing that ...

34. Export OSGI-Application from Eclipse    stackoverflow.com

I've developed an osgi application (no rcp) using eclipse. It consists of several Plugin-Projects-Bundles and dependencies from eclipse plugins folder (commons.* ...) The application works fine when launched using eclipse. What is ...

35. How can I catch connection requests in my framework?    stackoverflow.com

I'm building a framework (OSGi-like) where other parties can program a bundle for. But I want my framework to manage the QoS of the connection-requests that the other parties will do. The ...

36. Eclipse: starting custom eclipse app under linux returns to the command line prompt instantly    stackoverflow.com

I am developing an Eclipse/Equinox based OSGI WebApplication (using embedded Jetty) and using headless PDE-Build for building the app. My build creates a zip file for Linux GTK and one for ...

37. Using JACORB in OSGI    stackoverflow.com

I'm trying to use JACORB from am OSGI-Bundle. I read about people, who had a lot of trouble getting it up and running. Does anyone of you have any experience with ...

38. How to profile the execution of an OSGi deployment?    stackoverflow.com

I'm starting the development of an OSGi bundle for an application that will be deployed in a device with some hardware limitations. I'd like to know how could I profile the ...

39. What IDE setup and workflow is used for OSGi development?    stackoverflow.com

I made quite a few easy OSGi test projects in Eclipse RCP. My typical workflow would always be:

  • Make 3 different projects: APIproject, Clientproject and Serverproject
  • Edit the MANIFEST.MF of APIproject to export ...

40. How to deserialize implementation classes in OSGi    stackoverflow.com

In an eRCP OSGi based application the user can push a button and go to a lock screen similar to that of Windows or Mac OS X. When this happens, the ...

41. Can I use Distributed OSGi and ConfigurationAdmin together?    stackoverflow.com

If:

  • I have a bundle I wish to run on n OSGi containers exporting some service;
  • I am using DS to register the modified method for when configuration changes, so I can update ...

42. How to setup an Eclipse Project with multiple Subprojects (OSGi-Bundles)    stackoverflow.com

Sherlog is an OSGi-based log analyzer, if I import this project as an workspace snapshot I receive lot's of projects in my workspace, but I would prefere to ...

43. Monitoring a Apache Karaf/OSGi application via SNMP    stackoverflow.com

We are building OSGi (particularly using Apache Karaf on Equinox) applications that need to be delivered into customer environments that commonly employ SNMP based monitoring tools. Can anyone suggest a cost ...

44. What is OSGi and which applications already applied it?    stackoverflow.com

Recently I learn about OSGi and still don't know what is the difference between it and DLL (Dynamic Library Linking in Windows). And will it attract more developers and companies to ...

45. Deserialization of arrays of custom type in OSGi    stackoverflow.com

I'm trying to send objects from bundles over a dedicated communication bundle to an other framework. For communication I use Java standard serialization (with ObjectStreams) over TCP/IP. Communication flow is the ...

46. OSGI: Is it possible Import-package and add a visibility:=reexport?    stackoverflow.com

i would like to import a package rather than require bundle in a manifest and have all bundles that require the former package inherit the imported package. I am assuming that ...

47. Query parser and optimizer for OSGi/LDAP filters/queries?    stackoverflow.com

I'm looking for a query parser and optimizer that can work with OSGi filter conditions, which are based on LDAP query syntax. Preferably something implemented in Java, but a different implementation ...

48. OSGi Specs and RFCs    stackoverflow.com

I can only find and download OSGi Specs(e.g. core-spec, enterprise-spec) from its website. What about so-called OSGi RFCs? Are they publicly accessable, and how related to the Specs? Thanks!

49. c3p0 loop and OSGi    stackoverflow.com

I wrap my project in OSGi bundle(just call my first start method from Activator.start()). In my project I use ORM ActiveObjects and c3p0 pool. All of project dependencies (jar librarys) are in ...

50. What is my Eclipse-RCP application storing in $HOME/.eclipse, and how do I prevent it?    stackoverflow.com

When I run my Eclipse RCP application, it creates a whole lot of directories in my $HOME/.eclipse directory. What is this? I don't want the files there, how can I hinder them ...

51. Java 6 - Annotation processor and code addition    stackoverflow.com

I wrote a custom annotation containing metadata for a property and an AnnotationProcessor:

@SupportedAnnotationTypes({"<package>.Property"})
public class PropertyProcessor extends AbstractProcessor {

 @Override
 public boolean process(Set<? extends TypeElement> annotations,
   RoundEnvironment roundEnv) {
  ...

52. What is difference between Eclipse Virgo and Eclipse Gemini?    stackoverflow.com

Hey,
What is difference between Eclipse Virgo and Eclipse Gemini?
(I understand what OSGI does in general).

53. Is there ANY sane way to have OSGI work with WebLogic10/11?    stackoverflow.com

I'm looking for a way to do it now. On the Oracle's road map they will be bring GlassFish and Weblogic closer together (OSGI will be there in 2012-ish). But what ...

54. How can I update interfaces in OSGI?    stackoverflow.com

I'm learning OSGi and I'm curious about the following situation: I want to change (extend mostly) an interface exposed by OSGi, without changing the classname. Is it possible make a bundle that ...

55. Eclipse - extending project/package explorer to handle custom file types as trees    stackoverflow.com

If an Eclipse project includes a .jar file, the package explorer treats it like a tree and enables the user to click the "+" sign to the left of the file ...

56. Has anyone found OSGi to be useful in corporate applications?    stackoverflow.com

The title says it all; has anyone deployed a corporate application in OSGi and found it useful? I can see the benefits, forced modularity, good dependency definitions etc. But these seem to ...

57. Implementing SOAP with OSGi in Eclipse    stackoverflow.com

I have been developing an application using OSGi-Equinox iwith Eclipse. Now I would liek to implement some web-services. I manage to implement some simple webservices using org.eclipse.equinox.http. Using this package I ...

58. strange interaction with Axis & OSGi    stackoverflow.com

Here is the scenario: I have 2 bundles with axis 1.4 and it's transitive dependencies embedded in them (they each call a different web service to do their work). It seems that ...

59. What is OSGi and what are some examples of its use?    stackoverflow.com

I've just started hearing the term OSGi being used (while reading tutorials on common JEE containers such as GlassFish and Spring), however I have been unable to find a simple, straight-forward, ...

60. How to define minimum JRE requirement (1.5 _or higher_)?    stackoverflow.com

OSGi manifest entry "bundleRequiredExecutionEnvironment" can be used to specify JRE on which given bundle can be used on, but it seems like this is a strict check such that if I ...

61. using osgi to develop an application    stackoverflow.com

I'm developing a semantic-based search application in java. To make the application modular, I thought to use osgi architecture. But since I'm new to osgi, I have no idea about the ...

62. Using SnakeYaml under OSGi?    stackoverflow.com

Does SnakeYaml work within an OSGi framework? I've modified the MANIFEST & such so that it deploys correctly, but but trying to load a document into a JavaBean object structure is ...

63. OSGi loose-coupling best practice    stackoverflow.com

I'd like to know what is considered the best practices or patterns for decoupling application code from framework code, specifically regarding OSGi. I'm going to use the example from the ...

64. OSGi can't find the activator    stackoverflow.com

Manifest:

Manifest-Version: 1.0
Bundle-Name: Mahjong
Bundle-Activator: MahjongActivator
Bundle-SymbolicName: Mahjong
Bundle-Version: 1.0.0
Import-Package: org.osgi.framework
Compiling & jarring:
$ javac -classpath equinox.jar src/start/*java
$ jar -cfm Mahjong.jar MahjongManifest.mf src/start/*class
The activator:
package start;

import org.osgi.framework.*;

public class MahjongActivator implements BundleActivator
{
    public void start(BundleContext ...

65. Quartz scheduler and OSGI    stackoverflow.com

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 ...

66. my href is not redirecting to /logout page    stackoverflow.com

I'm facing a trouble with my href which is listed inside yui menu. Here is my code

<a class="yuimenuitemlabel" href= "<@spring.url "/logout"/>"          />
For ...

67. OSGi extender pattern with load ballancing extensions    stackoverflow.com

I would like to implement following scenario: Extender uses his extensions while extensions are grouped by theirs' type. For example: Extender = Vendor and Extensions = HotDogSeller1, HotDogSeller2, PopcornSeller. My point ...

68. PAX-URL: "Protocol not supported" at Felx's startup    stackoverflow.com

I'm using PAX-URL to launch a Felix based project from Eclipse. I use the assembly protocol to avoid having to pre-pack my bundles. In the project, felix is started using the felix.jar ...

69. java.lang.NoClassDefFoundError on OSGi    stackoverflow.com

I have a bundle, with an activator declared. This activator create a JFrame and show it. Running on Eclipse as Plugin project it works fine. When I put on Felix it doesn't ...

70. java.lang.NoClassDefFoundError: org/apache/http/params/SyncBasicHttpParams    stackoverflow.com

hi guys I am trying to run integration test on an OSGI based web app when I tried that I get the error: java.lang.NoClassDefFoundError: org/apache/http/params/SyncBasicHttpParams any ideas how to solve that ?

71. Does Knopflerfish OSGi desktop require a connection to www.knopflerfish.org?    stackoverflow.com

I'm trying a tutorial for OSGi that uses the knopflerfish desktop. Today, it hangs when I try to open a local .jar file to install it as a new bundle. ...

72. Pax Runner: Any experiences with the in-process executor?    stackoverflow.com

I am currently deciding which pax executor to use when running OSGi applications from the IDE (see http://paxrunner.ops4j.org/space/Executors for a list of available one's). There basically two choices for ...

73. ISelection -- How can I get ClassLoader for the selected class in the navigator    stackoverflow.com

I am new to Eclipse plugin development, and I am trying to develop a plugin where I am required to load a class which is selected in the Navigator. Can you ...

74. OSGi - Candidate permutation failed due to a conflict between imports    stackoverflow.com

I am in a situation where my Felix OSGi container will not start properly after deploying groovy via:

obr:deploy "Groovy Scripting Languge"@1.7.3
Managed to deploy & got Groovy stuff running, until ...

75. debugging osgi classloader issues    stackoverflow.com

Is there some tool or recipes for debugging osgi classloading issues ? Specifically interaction of osgi classloaders with java ee container classloaders and versions. I looked into the spec- a little ...

76. Override port number specified in VM args for OSGi    stackoverflow.com

I am trying to run some OSGi bundles specific a specific port number via VM arguments in the run configuration. But it seems like it is ignoring the VM args ...

77. ClassCastException due to Class Loader problem    stackoverflow.com

interface A
class B implements A
I am getting ClassCastException in casting B to A. Both A and B are in the same bundle. This could be because of the class loader. Why is the ...

78. Eclipse: OSGI Preferences vs. PreferenceStore    stackoverflow.com

I'm working on an Eclipse plugin (or in fact, a plugin for an Eclipse-based application) which needs some configuration to be entered by the user. From looking at the documentation, there seem ...

79. OSGi memory management    stackoverflow.com

I have theoretical question about OSGi memory management. Let’s say we have some OSGi container (Felix for instance), and let’s suppose I created some bundle with memory leak. And here are ...

80. Using the OSGi LogService in a real world application    stackoverflow.com

What is the proper way to to use the OSGi LogService in a real world application? At first I figured I would use Declarative Services to create components if a ...

81. Is it safe to OSGi export API containing reference to implementation code?    stackoverflow.com

Let's imagine I implement the following:

public enum ExportAPIForOSGi {
    ;
    public static SpecialObject newSpecialObject() {
        return new SpecialObjectImplv1();
 ...

82. Is it appropriate to use OSGI framework on small java app?    stackoverflow.com

I have a plan to reimplement one of my small but usefull applications with OSGI framework. I never used it, so I ask is it appropriate to use OSGI on small ...

83. dynamic domain model in java (osgi)    stackoverflow.com

Let me explain my problem with an example. Let's say I have bundle foo.model containing class Country:

public class Country {
    private String code; // 2char ISO code
  ...

84. Java: What is the proper way to declare an interface method that can throw an exception?    stackoverflow.com

Let say I have this interface A that is implemented by multiple vendors:

interface A
{
    void x();
    void y();
}
However, I want vendors to be able to ...

85. Set ProxySelector and Authenticator back to their default    stackoverflow.com

I was tasked to write a custom ProxySelector implementation for our current OSGi project. In order to use authentication for proxies I also had to write a custom

86. Choosing between OSGi implementations    stackoverflow.com

Several implementations of OSGi exists. I'm looking atEquinox, Felix and Knopflerfish. Could you expose the known advantages and drawbacks of each of these, especially in a server context?

87. Control over exit codes in a OSGI shutdown    stackoverflow.com

So I initiated a clean OSGI shutdown Best way to shutdown an OSGi Container (specifically equinox) I use the bundle.stop() way to achieve the same. Now the question arises if I ...

88. openorb and jdk conflict in OSGI    stackoverflow.com

I'm getting the bellow exception using openorb in osgi.
I'm using openorb-1.3.1.jar and jdk1.6.
I think both the openorb-1.3.1.jar and rt.jar in jdk is containing many duplicates which is causing the problem.
For ...

90. Using different git repos in OSGI application    stackoverflow.com

i am new to git, and i have an OSGI application and i want to make different git repos, and each repo consists of some OSGI bundles and all the bundles/repos will ...

91. Include resources in bnd file    stackoverflow.com

I am trying to create a bundle x from lets say from 3 dependancies

a.jar has spring-context.xml
b.jar has spring-cotext.xml
c.jar has spring-beans.xml
My x bundle should import all the a,b,c jar resources and ...

92. Is OSGi fundamentally incompatible with JSR-223 Scripting Language Discovery?    stackoverflow.com

I've recently written a small specialist scripting language and used the Maven to export an OSGi compliant bundle that also exports a service descriptor into the "META-INF/services/javax.script.ScriptEngineFactory" service registry file. The problem ...

93. Play framework and OSGI    stackoverflow.com

Is it possible to integrate play framework with OSGI to create plugable components? Did someone try it? Thanks in advance

94. How to avoid class.forName() in OSGi?    stackoverflow.com

I am relatively new to OSGi and our dept. is shifting to OSGi framework. I have two bundles A and B. B depends on A so I have included it in ...

95. Good alternative to crontab for java batch programs?    stackoverflow.com

I've been looking for replacements for my companies current batch processing system(java SE + crontab), since there is a lot of java code/shell script duplication, most jobs are ETL and do ...

96. Need multi-tenancy feature on Third party framework    stackoverflow.com

we are using third party framework(called as orchestrator which is based on java) for business to business integartion. But it does not have multi-tenancy feature. So how can we achieve the ...

97. Efficient OSGi development workflow    stackoverflow.com

I work on a product composed of many bundles running as features on top of karaf. Typically our developers work on one bundle at a time. Our normal development goes something ...

98. Restlet HTTP problems in OSGi    stackoverflow.com

I'm a fascinated user of the Restlet framework (version 2.08). This is why I'm currently trying to use Restlet in an OSGi environment for the practical part of my thesis. Finally, ...

99. Looking for an OSGi Design-Pattern    stackoverflow.com

I'm currently facing an interesting problem in my OSGi application.
I'm implementing a configuration service that should retrieve the application's configuration from multiple sources (file, registry or network). The configuration service should ...

100. Migrating from JCA to OSGI Is it a good idea?    stackoverflow.com

I have a JCA adapter for connecting to EIS. Is it a good idea to replace the adapter with an OSGI module? The features I need are

  1. Access the OSGI module from ejb3
  2. Access ...