5

I have quite a sophisticated OSGi application which uses Declarative Services and was designed to be deployed in Equinox. Now the task is to make this application be deployable in WAS 8.

The first try was quite pragmatic: I have deployed an EAR which has started basically the same Equinox and after some WAS class loading policy tweaks it has worked.

Now I want to go further: get rid of the Equinox runtime and deploy my bundles "natively" in WAS 8. So I have composed an EBA, consisting out of my business bundles, their dependencies and Equinox DS runtime. The EBA is deployed as an asset and integrated into a BLA. The application has even started and runs but the components are not initialized.

The point is that one has to start equinox.ds in front of the own business bundles (UPDATE: not a must, s. discussion below) in order to make DS do its job. But how do I tell the bundles which is to be started first within the deployed EBA? I need some analog of Equinox' config.ini file.

I know I can rewire my components with natively supported Blueprint, but frankly this is the last thing I'd like to do. It should be possible to make Equinox DS work, shouldn't it?

Another question is: how to get the OSGi console for one's own application deployed under WAS 8? I want to control my bundles but seems that there is no way to do it from the Management Console.

UPDATE

Thanks to BJ and Neil (s. discussion below), the question takes down to "How do I start a specific bundle in my own OSGi application deployed in WAS 8.0?"

Ilya Shinkarenko
  • 2,134
  • 18
  • 35
  • 1
    You do not need to start DS before the bundles DS will process. Are you using traditional WAS or Liberty Profile? – BJ Hargrave Oct 24 '13 at 19:15
  • You do have to start equinox.ds. Otherwise how the component initializaion is supposed to happen? – Ilya Shinkarenko Oct 24 '13 at 19:29
  • With regards to the profile type: we use WAS 8.0, AFAIK the Liberty Profile was not yet introduced there but in the Profile Management Tool I have chosen the "dev" type of profile. – Ilya Shinkarenko Oct 24 '13 at 19:30
  • 1
    BJ was making a point about start ordering. Yes you need to start DS, but you can start it either before OR after all the other bundles. – Neil Bartlett Oct 24 '13 at 20:15
  • Sure, sure. BEFORE is not valid. We have just got used to the manner of configuring the container in the way that the "system" bundles are started in front of the application bundles which need the explicit start. – Ilya Shinkarenko Oct 24 '13 at 20:16
  • 1
    NO! Before is valid. After is valid. In the middle is valid. You can start the bundles in ANY order. – Neil Bartlett Oct 24 '13 at 20:18
  • Okay it gets really confusing when you edit a comment after I've replied to it. WHY have you "just got used to.... starting system bundles first"? – Neil Bartlett Oct 24 '13 at 20:20
  • You are just replying way too fast! I have started editing before you have commited your 2nd comment but my commit was right after it :) SO should actually have notified both in case of such concurrency issue. Well, back to the point: if there is any order is to be defined then this (first start infrastructure, then the application) seems to me the most reasonable. – Ilya Shinkarenko Oct 24 '13 at 20:24
  • Slowing down as per your advice. Stackoverflow is also strongly hinting that we take this discussion elsewhere. Perhaps you could clarify your question, as BJ and I pointed out that DS doesn't need to be started in any particular order, therefore there should be no need to manage start order within the EBA. Ultimately therefore the answer to how to use DS in WAS is "just do it". – Neil Bartlett Oct 24 '13 at 20:54

1 Answers1

2

To answer the OSGi console part of your question, a normal OSGi console won't work because the OSGi applications are managed in nested frameworks. WebSphere provides its own console which can navigate the nested applications: http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.osgi.nd.multiplatform.doc%2Ftopics%2Fta_admin_runtime_console.html

Holly Cummins
  • 10,767
  • 3
  • 23
  • 25