Liferay 7 - OSGi components Web Console (Apache Felix) Integration - osgi

Is there any way by which I can integrate Apache Felix Web Console with Liferay DXP? As DXP and AEM both having OSGi based container. So, I wanted to integrate AEM module into DXP by which we can manage modules by web.

Yes that is possible, Apache Felix Web Console in Liferay DXP server OSGi container.
Idea behind is to integration of Apache Felix Web Console OSGi component on Liferay DXP, because same OSGi component available in AEM for managing OSGi components. So, I wanted to check whether it works with DXP or not? By which developer can manage the components and services with the help of clicks in DXP as well ;)
Step By Step Installation :
Open GoGo shell
Hit command install http://central.maven.org/maven2/org/apache/felix/org.apache.felix.webconsole/4.3.0/org.apache.felix.webconsole-4.3.0.jar
hit command lb --> see the process description
After that you will find the pid of current component what you installed like:
4457 |Installed | 1|Apache Felix Web Management Console (All In One) (4.2.16.all) here 4457 is your pid
Hit command start 4457
Hit command lb
Now you can see 4457 process has been activated 4457 | Active | 1 | Apache Felix Web Management Console (All In One) (4.2.16.all)
Hit URL in browser http://<portalUrl>/o/system/console here you can see /o/system/console is the URL where you can access the WEB CONSOLE of OSGi component.
Authenticate Popup will come on broswer, provide the default credentials of admin
username : admin
password : admin
After that you will see all the components which are available on your container. Check the below screenshot.

Related

OSGi container and application server container in AEM

In standalone AEM installation, Is felix OSGi container present inside jetty servlet container ? Or is the Jetty Server is installed as a bundle in Felix OSGi container ?
Which one will start first when AEM is started ?
And how will this change for a WAR based installation?
According to this this answer both are possible. But I want to know which approach is followed in AEM.
AEM standalone (using quickstart) starts the felix framework and deploys jetty as bundle inside.
You can check this by starting AEM and then open the system console. In the bundle list you will find org.apache.felix.http.jetty. This is the felix implementation of the OSGi http service spec and embeds the jetty server.

Migrate OSGI application from Karaf 2.3.4 to Websphere Application server

I have an OSGI application deployed in Karaf v2.3.4, it worked well, but I want to migrate it to WebSphere application server, I want to know the difference between these two servers, and the guidlines for doing that
thanks for your help
I've lead the development of OSGi applications on WebSphere, but am less familiar with Karaf. From what I can tell, we share the same Blueprint implementation. I believe that Karaf supports the OSGi application (.eba) packaging model - WebSphere Application Server insists upon it.
You can download free, developer-licensed WebSphere Application Server runtimes and Eclipse-based tooling from wasdev.net. The simplest approach would be to import your application source into the tooling, and deploy it onto a runtime from there.
The Karaf home page describes it as 'a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed.' WebSphere Application Server is a Java EE-compliant application server. Until the advent of the Liberty Profile, it could not have been described as 'small'. Both runtimes are OSGi based.
We don't have a specific guide for migrating OSGi applications from Karaf to WebSphere, which is why I recommend that you try it and see what happens. Good luck - do let us know how you get on, either here or on the wasdev.net forums.
Regards,
Mark

how to add an external spring application as a portlet to a liferay portal

I have developed a Primefaces- Spring Application.
I have installed Liferay IDE/Plugings/server. I Want to deploy the Primeface-Spring application a s a portlet to my Liferay Portal. How do i achieve it? Please help.
Mmm... if I well undestood, you create a standard web application and need to deploy it as a portlet?
I'm sad to say that it is impossible: you need to convert your webapp to a "portlet application" before deploy.
By the way Liferay tries to meet your need... you can deploy your webapp inside your application server like any other web application. So your webserver will be able to serve Liferay (in root context) or your application in its context. Then you have to embed it inside a liferay "Embedded page": just create an "Embedded" page using your Liferay admin features.
This solution uses an iframe, so if you prefer you can try to use a "web-proxy" portlet (to integrate your code server side): see here http://www.liferay.com/it/community/wiki/-/wiki/Main/Web+Proxy+Portlet
Next time you develop a portlet application a good starting point is to understand basics on portlet lifecycle, then to develop it directly thinking on a portlet.
It should be possible to deploy your PrimeFaces+Spring web application as a portlet in Liferay using Liferay Faces Bridge. The purpose of the bridge is to provide developers with a way to develop JSF applications without being concerned about the Portlet API. The Liferay Faces project has a primefaces4-portlet demo and a jsf2-spring-portlet demo that you can download in order to verify that these technologies work in your Liferay Portal environment.

How to start/install/access Activiti Explorer on Apache ServiceMix 4.5.3?

I'm new to Activiti/Apache ServiceMix and I'm a bit lost on how to access the Activiti Explorer.
I have installed Activiti via Karaf (feature:install activiti) but how could I access the Explorer Web UI?
I have tried using localhost:8181/activiti-explorer URL but it gives me a 404 error.
I can access the karaf web console so I know for sure that Servicemix and Karaf are up and running. Also, Activiti reports to be installed and running.
Thank you
Installing Activiti means installing the activiti engine.
The engine has no web component, yo need to install a diferent component called activiti-explorer. Sadly it has no suport by now, see: https://issues.apache.org/jira/browse/SMX4-1623 .

How to deploy and access a Jersey REST OSGi bundle into Adobe CQ?

I have an OSGi bundle (running under Felix) using Jersey and providing a RESTful resource. This all works fine and I can invoke the service through my browser and get back a JSON response.
Now, what I would like to do is deploy that same bundle into Adobe CQ and through CQ access the resource (i.e. /mycq/services/my-service) similarly.
Any pointers on how to deploy an existing OSGi bundle(s) into CQ and more specifically 'access' the Jersey REST resource in the bundle?
The Maven Sling Plugin allows you to deploy an OSGi bundle to a local or remote running instance of CQ.
Source: Deploying an OSGi Bundle
Apache Stanbol is using Jersey in an OSGi environment that's fairly similar to Apache Sling's on which CQ5 is based. Looking at how Jersey is integrated there might help.
https://issues.apache.org/jira/browse/SLING-2192 also has some experimental code that might help.
Note that Sling expects to take over the whole URI space, which is needed especially for access control, so some bridging code is probably needed.

Resources