Saturday, October 29, 2016

Apache Felix Introduction

Apache Felix is one of the implementation for OSGi framework. We can download implementation and it will provides the OSGi container to provide runtime environment for OSGi bundles. We can develop bundles and install, start in Apache Felix OSGi container. These bundles should follow the OSGi specification then only it can be deployed into OSGi container such as the implementation provided by Apache Felix.

Liferay 7 have used Apache Felix implementation to support modularity application development while developing Liferay 7 Applications.

Perquisite:

Need to install Java 1.7 or Java 1.8 in your machine. Java 1.8 is recommended.

Working with Apache Felix

Download Apache Felix
Directories Information:
Start Apache Felix
Install and Start OSGi bundles.

Download Apache Felix

Apache Felix implementation can be download from following location.



You can download binary distribution that is zip or tar.gz and it based on your operating system.

Once you downloaded the Apache Felix binary distribution then you can extract it in any of your local directory.

You can see the following directories once you extracted the zip or tar file.


Directories Information

bin

This directory contained actual OSGi implementation jar file (felix.jar).
Another directory called felix-cache this will provide cache for bundles and its default directory and we can change cache folder from properties file.


bundle

Bundle directory is auto deployment directory for OSGi container. Bundles which are deployed in this directly automatically started and running when OSGi container started.
Whenever the bundles are mandatory and that should needed for our environment then we can place these OSGi bundles in bundle directory so that it will be started and running automatically by OSGi container when it launched.

Apache Felix is providing the Command Line Interface (CLI) to manage or handle bundles and this implementation called Apache GoGo Shell. These bundles should start along with OSGi container that is why these bundles are placed in bundle directory.


conf

Conf directory contains configuration properties that should needed for OSGi container.
We have file called config.properties and it will contains all the required properties. We have list of properties that can be available to configure and all are listed in the document apache-felix-framework-configuration-properties and it’s available in doc directory.



doc
Doc directory contains all documents about Apache Felix and there are html pages you can directly open and read the documentations.


Start Apache Felix

Open command prompt and navigate Apache Felix home directory from there run the following command then Apache Felix will launch


java –jar bin/felix.jar


Once it started you can see Apache GoGo Shell command line interface from there we can manage bundles life-cycle.


Note:

Apache GoGo already available in default deployment directory that is why when you launch Apache Felix then Apache GoGo bundles also started then it will be available for use.

Once Apache Felix stated then you can see Apache GoGo shell command as follows



Type help command in the GoGo shell then we can see list of commands available.



Type lb or felix:lb command it list the available bundles in the OSGi container and shows its states(Active, Installed, DeActive)



Install and Start OSGi bundles.

Once we developed the OSGi bundle by following the framework specification then we can deploy these bundles into OSGi container.

We can start bundle and stop bundle using Apache GoGo shell command with commands.
First need to install bundle then start the bundle. We can install bundle from any location by proving bundle path.

The following is the way to install, start and stop bundles.

Install Bundle


install file:/path/to/bundle/bundle.jar

OR

felix:install file:/path/to/bundle/bundle.jar


List Bundles


lb

OR

felix:lb


Start Bundle


start bundle-id-in-list

OR

felix:start bundle-id-in-list



Stop Bundle


stop bundle-id-in-list

OR

felix:stop bundle-id-in-list


The following is screen to shows the bundle life-cycle



Note:

OSGi bundle is packaged jar file.

Apache Felix used default port 8080 for http service and to change this port we have property in config.properties file.


org.osgi.service.http.port=8080


Reference:


Author


Liferay 7 Introduction

Liferay 7 is current version of Liferay brought many features. Liferay 7 we call it as Liferay Digital Experience Platform (L).

We can create and personalise the content and which can experienced in any personal digital devices such as computers, laptops and mobiles.

Liferay 7 platform provide rich interface to publish websites based on our business needs and it can be experienced across all digital devices.

What Liferay 7 Provided.

Rich User Interface
OSGi based Development Platform
Integrations
Mobile experience

Rich User Interface

Liferay 7 provided rich user interface and it can give more look and feel across all platforms. It integrated with responsive user interface by integrating bootstrap framework.

Its also support SASS based user interface design and it will provide re-usability and inheritance feature while developing user interface. Which make UI development very fast.
Liferay 7 have supported any JavaScript library and its default integrated with jQuery libraries.

It’s also supporting Sigel Page Applications and we can use Angular or React java scrip to develop Liferay applications.

OSGi based Development Platform

Liferay 7 come up with major architectural change that is modularity development with OSGi framework.

OSGi is popular modularity software development framework which provide container that will handle lifecycle of component or module.

We can develop each application as independent component and we can deploy these components into OSGi container so that it will take care of its lifecycle. Development and future upgrade of software task simpler by OSGi.

Integrations

Liferay 7 support many third party integration so that we can provide entire platform on Liferay 7 and it will connected with different third party software. It allows SOAP and REST way of integration with other software.

 Example of integrations like Single Sign On, OAuth and Directory server integrations. It also provides integration with reporting tools such as Pentaho. 

Liferay 7 can provide integration with E-Commerce platforms like KonaKart and Magento.

Mobile experience

Liferay 7 provide mobile application development by providing Mobile SDK for Android and iOS. It also provided Liferay Screens to support Native Application Development for Android and iOS.

Author



Sunday, September 11, 2016

Liferay Interview Questions

  • Liferay Basics

  • What is a portal?
  • What is a portlet container and explain more about it.
  • What is a portlet?
  • What are the prerequisites to set up the Liferay in your local machine?
  • What is the current running version of Liferay?
  • What are all Liferay versions?
  • What is meant by GA in Liferay versions?
  • What is meant by stable version and Beta version?
  • What are the features of a portal?
  • What is JSR?
  • What is the difference between JSR 168 and JSR 286?
  • Who framed these JSR 168 and JSR 286 standards?
  • What is the difference between Portlet and Servlet?
  • What is the use of a theme in Liferay?
  • What is the use of layout in a portal?
  • What are the advantages of the Liferay portal?
  • What is the Differences between personalization and customization?
  • What is the Difference between Authentication and Authorization?
  • What is meant by collaboration?
  • What is the use of portal-ext.properties file and how we can use in the Liferay portal?
  • What is a Liferay portal instance?
  • Can we configured multiple domains on a single Liferay instance and hook

  • Portlet

  • What is portlet?
  • What is the Life Cycle of a portlet?
  • How many portlet life cycle methods given by JSR 168 and what are they?
  • How many portlet life cycle methods given by JSR 268 and what are they?
  • What are the portlet modes and what is the use of the modes.
  • What are the important descriptor files   to run and manage the custom portlets in the Liferay portal?
  • What are the key configurations we can place in portlet.xml file?
  • What are the key configurations we can place in liferay-portlet.xml file?
  • What are the key configurations we can place in liferay-display.xml file?
  • What are the configurations we can place in the liferay-portlet-package.properties file?
  • Where we can create a portlet category and segregate the portlet under that category.
  • How can we register a portlet with the portlet container?
  • How we can register the configuration page implementation class in a portlet.
  • Where we can configure Language.properties file of a portlet and how to use the file properties in the portlet.
  • What is meant by <instanceable>true</instanceable>?
  • What is meant by <instanceable>false</instanceable>.
  • How to configure multiple portlets in a single folder structure.
  • How to Support Internationalization (i18n) On Liferay Portlets.
  • How to use jQuery in the Liferay portlet
  • What are the global files in a custom portlet w.r.t CSS and JS and where we configure in order to make availability of those files to the JSP files automatically (without including those in the JSP files)
  • Draw the portlet autonomy
  • What is the difference between render URL, action URL and resource URL in the Liferay portlet?
  • What are the window states of a Liferay Portlet?
  • What is portlet preferences?
  • What is the structure of normal MVC portlet in Liferay?
  • What is the structure of Spring MVC portlet in Liferay?
  • Explain about the Liferay search container in the Liferay portlet
  • Explain the process to implement Ajax calls in Liferay
  • The process to create pop ups in Liferay portlet.
  • Explain the process to create tabs in the Liferay portlet
  • How can we read the portal properties in the portlet using Liferay API?
  • How to embed a Liferay portlet in other non Liferay websites

  • Liferay Hooks

  • What is the use of an EXT in Liferay Portal?
  • What is the use of a Hook in Liferay Portal?
  • What is the difference between EXT and hooks
  • How to override a portal services using hook.
  • What are the disadvantages with the EXT.?
  • What are the disadvantages with the Hook?
  • How to override Liferay struts actions by the hook

  • Liferay Service Builder

  • What is a service builder?
  • What is the use of namespace in service.xml file?
  • What is the purpose of specifying local-service=true in service.xml file
  • What is the purpose of specifying remote-service=true in service.xml file
  • What are the service layers created by the service builder and explain them briefly.
  • What is the process to define finder methods in the service builder?
  • What is the process to define custom SQL methods in the service builder?
  • When will be the database table will create in the given database w.r.t the service builder.
  • Is there a build number associated to a portlet assigned by the service builder? Where can we find the current build number?
  • What is the purpose of mode and persistence packages which are created by the Liferay service builder?
  • Can we set multiple databases with Liferay Portal?
  • Where you can write custom methods in auto generated service layer by service builder
  • Explain the process to implement web services methods w.r.t generated service layer in Liferay.
  • Explain generate native mobile Liferay service libraries in Liferay?
  • Explain Liferay cache mechanism.
  • How to disable Liferay cache to Liferay portal entities and custom entities.
  • How disable Liferay cache to Finder methods.
  • How to implement transaction roll back in Liferay services.
  • What is Liferay Dynamic Query?
  • What is different between findBy and fetchBy methods in Liferay services?
  • Does Liferay Support Foreign Key relation?
  • How to implement One to Many and Many to Many relationship in Liferay.
  • What is Liferay Model Listeners and its importance?
  • What is different between XXXLocalServices and XXXServices?
  • What is PrincipalException in Liferay and when it occurred?
  • How to expose one plugin services with other plugin?
  • Can we implement multiple Data sources in Liferay and explain the mechanism to implement it.
  • How to expose Liferay service as web services
  • Explain how to generate web services in Liferay
  • What Liferay Mobile SDK?

  • Liferay Themes

  • What is theme and explain the process to create a customized theme
  • How to embed a portlet in a theme
  • What is the use of theme settings in a theme .Explain with one use case?
  • What is the CSS file we use to customize the portlet title, border colors?
  • Draw anatomy of a theme
  • How to place multiple themes in a single folder structure and what is the use of doing this with one use case
  • What are the implicit variables in a theme velocity file?
  • How to get the Liferay portal service classes in a theme velocity file
  • What is the process to apply a theme to a page as well as a website?
  • Explain Liferay Theme Setting.
  • Explain what Liferay Theme color screams.
  • What are the languages we can use to implement Liferay theme templates?

  • Liferay Layouts

  • How to create a layout in Liferay.
  • Draw the anatomy of a layout.
  • What is the process to apply a layout to a page?
  • How to embed portlet in Layout?

  • Liferay Administration

  • What is role in Liferay?
  • How many types of roles are exists in Liferay portal. What are they?
  • What is Inherited Roles in Liferay?
  • What is meant by user group?
  • What is meant by Team?
  • What is the difference between an organization and site?
  • What is Location organization?
  • Can we have multiple organizations with same name in Liferay portal?
  • What is a site template?
  • What is a page template?
  • What is the process to assign a role to the user from control panel?
  • What is the process to define permissions on a role?
  • Explain about server administration
  • How to install Liferay market place apps from the control panel
  • How to uninstall a portlet from the server through control panel
  • How to configure email server credentials in the control panel
  • Explain the process of LDAP authentication in Liferay
  • What is the process to see the portal properties in the control panel?
  • What is DL (Document Library) in Liferay?
  • How does Liferay document library implemented in Liferay and what is repository implementation Liferay using?
  • Can we store documents and files in database in Liferay?
  • How to change file system and its repositories in Liferay

  • Others

  • What is an IPC and how you can implement IPC in Liferay
  • What are the differences between IPC using event and IPC using public render
  • Explain about the structures, templates and article with real time scenario.
  • Explain the Kaleo work flow management.
  • How to implement workflow for custom entity?
  • Explain SOLR Integration with Liferay.
  • Explain how to implement SSO (Single Sign On) in Liferay.
  • How many ways we can Implement SSO in Liferay.


Author

Recent Posts

Recent Posts Widget

Popular Posts