I'll try to not be overly Liferay specific because I don't feel I need too
in order to give decent answers.


On Sun, Dec 10, 2017 at 4:27 PM, Matthews, Kevin <
kevin.matth...@firstdata.com> wrote:

> Hi Ray, I read the app note but I need some clarification. Couple of
> questions:
>
>
>
> 1.       In Liferay, we hot deploy bundles to the deploy folder in
> Wildfly/Jboss container or appserver using the gradle build script provided
> by liferay. I thought we could do the same on the liberty server since it
> already has an OSGI container.  Is the usage of the bnd agent running in
> the application server with a specific port the same concept as how it’s
> done in liferay 7.0 where gogo shell runs on *port 11311*?
>

There are some parallels but let me explain the related use-cases in
Liferay:

- localhost:11311 is the telnet socket/port of the Apache Felix gogo shell
that Liferay comes pre-configured with. Though gogo can be used to install
bundles, it's not what Liferay uses for installing (telnet is provided by
Eclipse Equinox console bundle).

- Liferay uses Apache Felix fileinstall which scans directories for bundles
to install (hot deploy). There's some extensions using the fileinstall SPI
to support some Liferay proprietary packages and WAR files (to support
WABs).


> Do we have bnd agent running on the liferay 7.0 server?
>
I don't believe it is installed OOTB, you'd have to drop the bundle into
the deploy dir.


> I believe the Jetty container out of the box comes with a OSGI container,
> is this true?
>
Which instance of jetty are you referring to? A pure jetty Http Servlet
container I don't believe runs an OSGi framework (even though Jetty is
largely made of OSGi bundles).


>
>
> 2.       You mention the distro jar should be re-created in case there
> are changes in the application server.  What are some examples of changes
> in the app server that will need the distro jar to re-created?
>
For example, let's imagine you install a "release" of container X (e.g.
Liferay 7.0 ga2),

- you might generate a distro at this stage to resolve against

Later you install, using some management tool that comes with container X,
(e.g. Liferay marketplace) some additional features (e.g. Audience
Targeting Suite).

- you may want to re-generate a distro here because you might want to code
against the new feature's capabilities (APIs).


>
>
> 3.       What’s the difference between osgi en route bundle jars running
> in jetty container we have in the tutorial
>
What you get in enroute is not a "jetty container in which your app runs".
It's your app's bundles which happen to depend on some http stuff which the
resolver resolved to jetty bundles to provide the http parts.

The bundles YOU make have a clean, pure dependency on http stuff. So
enroute could resolve ANY provider, it just so happens to be jetty bundles.


> versus the bundle jars we build/deploy in liferay 7 running on
> Windows/Wildfly/tomcat etc?
>
Let's say Liferay is running in Wildfly, it provides the http stuff OOTB as
a function of the container (Wildfly) so when you resolve against the
Liferay distro, the resolve would say:

"The http stuff is already provided by this distro, we don't need to
resolve another provider."

The very same bundles you built above which have a clean, pure dependency
on http stuff could run with zero modification on Liferay.


>
>
> 4.       I see couple of osgi-liberty maven plugins when I go to create a
> maven project in Eclipse . Do you know what these maven plugins usage?
>
>
>
>
>
These just look like versions of the Servlet API, probably so you can write
your code against whatever lowest common denominator your product policy
has set.



> 5.       When I read the OSGI in IBM they don’t see they show usage of
> declarative service @Component instead they use  blueprint for registering
> the osgi services. Also, when generating an OSGI IBM project through
> eclipse doesn’t seem to use the @Active annotation for bundle activation.
>   Is IBM 100% on board with the OSGI Specification. ?
>
IBM is 100% on board with OSGi! :) Beyond that I won't make any comments
regarding their product(s). There are plenty of IBMers around who can
answer this.

Sincerely,
- Ray


>
>
> Thanks,
>
> Kevin
>
>
>
>
>
> *From:* Raymond Auge [mailto:raymond.a...@liferay.com]
> *Sent:* Tuesday, December 05, 2017 12:32 PM
> *To:* Peter Kriens
> *Cc:* OSGi Developer Mail List; Matthews, Kevin
> *Subject:* Re: [osgi-dev] OSGI bundles install on IBM Liberty
>
>
>
> I had actually made a mistake in the suggested `-distro` instruction.
>
>
>
> I've corrected it in the app note.
>
> - Ray
>
>
>
> On Tue, Dec 5, 2017 at 12:19 PM, Raymond Auge <raymond.a...@liferay.com>
> wrote:
>
>
>
>
>
> On Tue, Dec 5, 2017 at 12:09 PM, Peter Kriens <peter.kri...@aqute.biz>
> wrote:
>
> I’ve added these points to the Resolve App Note. https://github.com/osgi/
> osgi.enroute.site/blob/gh-pages/_appnotes/resolving.md
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_osgi_osgi.enroute.site_blob_gh-2Dpages_-5Fappnotes_resolving.md&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=5dgDiilIAAv4T5Pi2QAhoAIKfDx6C4voPPFXS-SftOE&e=>
>
>
>
> Awesome!
>
>
>
> Thanks Peter!
>
> - Ray
>
>
>
>
>
> Kind regards,
>
>
>
> Peter Kriens
>
>
>
>
>
> On 5 Dec 2017, at 15:46, Raymond Auge via osgi-dev <osgi-dev@mail.osgi.org>
> wrote:
>
>
>
>
>
>
>
> On Tue, Dec 5, 2017 at 9:42 AM, Raymond Auge <raymond.a...@liferay.com>
> wrote:
>
> Hey Kevin,
>
> Here's what I could find: "Deploying OSGi applications to Liberty" [1]
>
> Now, this may be a little complicated by the fact that the enroute model
> tends to guide you to resolve a whole runtime. Meanwhile with openliberty
> or WebSphere Liberty you are deploying into a container which already
> "contains a lot of features".
>
> The crux of the issue becomes "resolving only what you need to deploy".
> This is were the complication comes in. What you need at that point is a
> way to "find out what the container provides in a way that you can use this
> during resolve time".
>
> Currently the way to do that is to create what's called a "distro" jar of
> the target container. This distro is a JAR file which provides all the
> capabilities that the target container provides at one point in time.
>
> How do you create a distro?
>
> *1)* install the bnd remote agent bundle [2] in the target container
> runtime. This will automatically open a local socket on a default port used
> to the remote cli next.
>
> *2)* execute the following command using the bnd cli [3]:
>
>
>
> bnd remote distro -o ws.liberty-5.6.7.jar ws.liberty 5.6.7
>
>
>
> FYI, this "bnd" command is just an alias for invoking the executable bnd
> jar: "java -jar <bnd.jar> remote distro ..."
>
>
>
>
>
> *3)* take the jar "ws.liberty-5.6.7.jar" create by that and place it into
> the maybe the directory containing the bndrun file which is used to resolve
> your deployment jars.
>
> *4)* in the bndrun file add:
>
> -distro: file:${.}/ws.liberty-5.6.7.jar
>
> *5)* resolve... the result of the resolve should be the set of bundles
> you need to install to openliberty.
>
> What you need to bare in mind is that the distro file needs to be
> regenerated each time the liberty installation changes in any significant
> way otherwise you won't get the real state of the system needed to resolve
> against.
>
>
>
> I hope that makes some sense.
>
>
>
> Let me know if the instructions were clear and if it worked.
>
>
>
> - Ray
>
>
> [1] https://www.ibm.com/support/knowledgecenter/en/SSEQTP_
> liberty/com.ibm.websphere.wlp.doc/ae/twlp_dep_osgi.html
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ibm.com_support_knowledgecenter_en_SSEQTP-5Fliberty_com.ibm.websphere.wlp.doc_ae_twlp-5Fdep-5Fosgi.html&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=nvLyZLi-u2zZxyZDABhidNPzNiG4CP48UqizxJvO0uM&e=>
>
> [2] http://search.maven.org/remotecontent?filepath=biz/
> aQute/bnd/biz.aQute.remote.agent/3.5.0/biz.aQute.remote.agent-3.5.0.jar
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__search.maven.org_remotecontent-3Ffilepath-3Dbiz_aQute_bnd_biz.aQute.remote.agent_3.5.0_biz.aQute.remote.agent-2D3.5.0.jar&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=x12qd0weK3DYeQDv9V-GpTsZU5_Ms2xgIfXtjlSHFNY&e=>
>
> [3] http://search.maven.org/remotecontent?filepath=biz/
> aQute/bnd/biz.aQute.bnd/3.5.0/biz.aQute.bnd-3.5.0.jar
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__search.maven.org_remotecontent-3Ffilepath-3Dbiz_aQute_bnd_biz.aQute.bnd_3.5.0_biz.aQute.bnd-2D3.5.0.jar&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=ha4v1OTeYF5iWCrc47eylrZCM6UuAAFW5cVwrALmI8Q&e=>
>
>
>
> On Tue, Dec 5, 2017 at 9:11 AM, Matthews, Kevin via osgi-dev <
> osgi-dev@mail.osgi.org> wrote:
>
> Hi Tim, a quick question. I am learning OSGI from osgi en route samples.
> In our environment, our monolithic application runs on  IBM Websphere
> Liberty but I am doing a POC to convert to modular architecture then
> bundles to run on Websphere Liberty. Can I build bundles using BND en route
> from my eclipse and install these bundles on a Liberty server? I know
> liberty uses the equinox OSGI container.
>
> The information in this message may be proprietary and/or confidential,
> and protected from disclosure. If the reader of this message is not the
> intended recipient, or an employee or agent responsible for delivering this
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this communication in error, please notify
> First Data immediately by replying to this message and deleting it from
> your computer.
>
>
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=9fxz_bUNjKXN9MH6tRxIyMdQX4Hu6HNw4eTSnEF24dg&e=>
>
>
>
>
> --
>
> *Raymond Augé*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_web_raymond.auge_profile&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=pVwg_G9fQa9f2mF0cxJUEt3jbrqZTVKd3lqQGZQF7Pc&e=>
>  (@rotty3000)
>
> Senior Software Architect *Liferay, Inc.*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=bLfM9BLLIw9feuk9UUsRpcXjRW1nB2pNPGZDVdRJzaA&e=>
>  (@Liferay)
>
> Board Member & EEG Co-Chair, OSGi Alliance
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__osgi.org_&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=VocS5zYRZyiXftmFPT0FCbd5OHZZKSMAuAu3RxLaVqc&e=>
> (@OSGiAlliance)
>
>
>
>
> --
>
> *Raymond Augé*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_web_raymond.auge_profile&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=pVwg_G9fQa9f2mF0cxJUEt3jbrqZTVKd3lqQGZQF7Pc&e=>
>  (@rotty3000)
>
> Senior Software Architect *Liferay, Inc.*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=bLfM9BLLIw9feuk9UUsRpcXjRW1nB2pNPGZDVdRJzaA&e=>
>  (@Liferay)
>
> Board Member & EEG Co-Chair, OSGi Alliance
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__osgi.org_&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=VocS5zYRZyiXftmFPT0FCbd5OHZZKSMAuAu3RxLaVqc&e=>
> (@OSGiAlliance)
>
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=9fxz_bUNjKXN9MH6tRxIyMdQX4Hu6HNw4eTSnEF24dg&e=>
>
>
>
>
>
>
> --
>
> *Raymond Augé*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_web_raymond.auge_profile&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=pVwg_G9fQa9f2mF0cxJUEt3jbrqZTVKd3lqQGZQF7Pc&e=>
>  (@rotty3000)
>
> Senior Software Architect *Liferay, Inc.*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=wrNnSroPW6ByUCTVnCJjXzwpuZ-slHk8PgfC8CVMVnI&e=>
>  (@Liferay)
>
> Board Member & EEG Co-Chair, OSGi Alliance
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__osgi.org&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=I__7kG1rKbMw937AUnqqdd1nHxsYR49kOM-0IWFO1jQ&e=>
> (@OSGiAlliance)
>
>
>
>
> --
>
> *Raymond Augé*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com_web_raymond.auge_profile&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=pVwg_G9fQa9f2mF0cxJUEt3jbrqZTVKd3lqQGZQF7Pc&e=>
>  (@rotty3000)
>
> Senior Software Architect *Liferay, Inc.*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.liferay.com&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=wrNnSroPW6ByUCTVnCJjXzwpuZ-slHk8PgfC8CVMVnI&e=>
>  (@Liferay)
>
> Board Member & EEG Co-Chair, OSGi Alliance
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__osgi.org&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=HH8Gw-cn_T-kd6gx_j2BbQ-yDw3Q20TuuUT5AHmRGgs&s=I__7kG1rKbMw937AUnqqdd1nHxsYR49kOM-0IWFO1jQ&e=>
> (@OSGiAlliance)
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to