Advanced Liferay Interview Questions


Explain cluster process in Liferay?

    • Access below tutorial for cluster setup in liferay

      Liferay Clustering Concepts

       Liferay Clustering Concepts tutorial will drive you on  clustering concepts. Applications are required to configure clustering  handle large amount of traffic when one of the servers goes down.  READ MORE

  • How do you track live uses in Liferay?

    • To save user sessions to database then add below in portal-ext.properties, but enabling this feature will decrease the portal performance:  session.tracker.memory.enabled=true
    • To enable Live users monitoring: live.users.enabled= true
  • How to create portlet filters in Liferay?

    • Access the below tutorial for portlet filters:

      Liferay Portlet Filter Tutorial:

      Liferay Portlet Filter Tutorial In tutorial, we will see “how to create a filter in custom portlet”. Filters are new in JSR-286 and there are there types of filters. Render Filter   – Render Filter will be executed in Render…READ MORE

  • How to install Liferay Latest fix packs?

    • Access the below tutorial for complete details:

      liferay patching tool

       Liferay provides patching-tool utility to update latest fix packs provided by the liferay. Liferay  Enterprise already configured with Patching tool. If patching tool not found then download from liferay and configure. READ MORE

  • How to prevent duplicate form submission in Liferay?

    click here for duplicate Form Submission in Liferay

    In most cases, developers will face duplicate form submission in Liferay  with processAction method as a form handler. This  post drives you through approach  on “How to prevents duplicate form submission in Liferay?READ MORE

  •  In Liferay, How to disable or increment session timeout?

     Liferay session timeout

    • In this tutorial, we will look into Liferay session timeout. Liferay session time out has set to 30 minutes by default and loaded from below files: portal-ext.properties:  The below property will be used to set session timeout….READ MORE

  • How to configure service builder for external datasource?

  • What is difference between BaseStructsAction and BaseStrutsPortletAction?

  • How to you configure Liferay with separate Datasources for read and write operations?

    • add jdbc properties in portal-ext.properties:
      • jdbc.read.url=jdbc\:mysql\://localhost:3306/lportal
        jdbc.read.driverClassName=com.mysql.jdbc.Driver
        jdbc.read.username=root
        jdbc.read.password=root
        
        
        jdbc.write.url=jdbc\:mysql\://localhost:3306/lportal
        jdbc.write.driverClassName=com.mysql.jdbc.Driver
        jdbc.write.username=root
        jdbc.write.password=root
    • In Portal-ext.properties file, add the below spring context files in spring.configs in
      • META-INF/dynamic-data-source-spring.xml,
      •  META-INF/shard-data-source-spring.xml,
      •  spring.configs=\
         META-INF/base-spring.xml,\
         \
         META-INF/hibernate-spring.xml,\
         META-INF/infrastructure-spring.xml,\
         META-INF/management-spring.xml,\
         \
         META-INF/util-spring.xml,\
         \
         META-INF/jpa-spring.xml,\
         \
         META-INF/executor-spring.xml,\
         \
         META-INF/audit-spring.xml,\
         META-INF/cluster-spring.xml,\
         META-INF/editor-spring.xml,\
         META-INF/jcr-spring.xml,\
         META-INF/ldap-spring.xml,\
         META-INF/messaging-core-spring.xml,\
         META-INF/messaging-misc-spring.xml,\
         META-INF/mobile-device-spring.xml,\
         META-INF/notifications-spring.xml,\
         META-INF/poller-spring.xml,\
         META-INF/rules-spring.xml,\
         META-INF/scheduler-spring.xml,\
         META-INF/search-spring.xml,\
         META-INF/workflow-spring.xml,\
         \
         META-INF/counter-spring.xml,\
         META-INF/mail-spring.xml,\
         META-INF/portal-spring.xml,\
         META-INF/portlet-container-spring.xml,\
         META-INF/staging-spring.xml,\
         META-INF/virtual-layouts-spring.xml,\
         \
         META-INF/monitoring-spring.xml,\
         \
         META-INF/dynamic-data-source-spring.xml,\
         META-INF/shard-data-source-spring.xml,\
        
         \
         classpath*:META-INF/ext-spring.xml
  • How do you configure Sharding in Liferay?

    Access below tutorial for Liferay Database sharding

    Liferay Sharding

    Liferay Sharding Liferay Sharding allows you to split up the database by portal instance only.Database sharding allows system more scalable. What is Sharding? Sharding is used to split up the database by filtering data.READ MORE

  • How to send mail notification to user?

    • Using MailServiceUtil:
  • MailMessage mailMessage = new MailMessage();
     mailMessage.setHTMLFormat(true);
     mailMessage.setSubject("Hi There");
      mailMessage.setBody("body");
     mailMessage.setFrom(new InternetAddress("email","username"));
     mailMessage.setTo(new InternetAddress(toAddress));
     MailServiceUtil.sendEmail(mailMessage);
    • Using Subscription sender also we can send mail:
    •  SubscriptionSender subscriptionSender = new SubscriptionSender();
       subscriptionSender.setCompanyId(user.getCompanyId());
       subscriptionSender.setFrom(fromAddress, fromName);
       subscriptionSender.setHtmlFormat(true);
       subscriptionSender.setServiceContext(serviceContext);
       subscriptionSender.setSubject(subject);
       subscriptionSender.setUserId(user.getUserId());
       subscriptionSender.addRuntimeSubscribers(toAddress, toName);
       subscriptionSender.flushNotificationsAsync();
  • What is default time zone in Liferay and how to change that?
  • How to set password expiration in Liferay?
  • How to configure portal ext properties per comapnyId
    • create portal-{companyId}.properties
  • How to change the Liferay portal authentication method?
    • sss
    •  company.security.auth.type=emailAddress
       #company.security.auth.type=screenName
       #company.security.auth.type=userId
    • you can change in control panel also Control Panel -> Portal Settings -> Authentication page
  • What are all the required steps for cluster setup in Liferay?
  • How to test successful cluster setup in Liferay?
  • How to setup cache replication using cluster link?
  • How to setup solr integration with Liferay?
  • Explain steps in LDAP integration with Liferay?

    • Settings for LDAP can be configured  from the Admin portlet, if it is always best practice configure LDAP via portal-ext properties and access below tutorial for complete details:

      Liferay LDAP integration

       In this tutorial, we will look into  Liferay LDAP Integration and user import process. LDAP Installation : LDAP setup has explained in this tutorial with OpenDJ.  Click here to see this tutorial before going through this. Read more

  • How to enable LDAP Authentication?

    •  ldap.auth.enabled=false
       ldap.auth.required=false
  • How to enable LDAP import ?

    •  #
       # Settings for importing users and groups from LDAP to the portal.
       #
       ldap.import.enabled=false
       ldap.import.on.startup=false
       ldap.import.interval=10
  • How to imporrt LDAP users password ?

    •  #
       # Set this to false when the LDAP user's password should not be imported to  the Liferay user.
       #
       ldap.import.user.password.enabled=true
  • How to use LDAP Password policy rather liferay default password policy?

    •  #
       # Set this to true to use LDAP's password policy instead of the portal  password policy.
       
       ldap.password.policy.enabled=false