Skip to main content

Creating OSGi Modules and Sharing Packages

  Overview This guide walks through creating two OSGi modules in Liferay 7.4 and sharing a Java package between them using the standard API + Implementation pattern. This is the most common and correct approach for exposing reusable services in a Liferay-based architecture. In OSGi, a bundle (module) does not expose its internal packages by default — everything is private unless explicitly exported. To share code between modules, the standard practice is to split functionality into: · An API module — contains interfaces/DTOs and exports the package · A Service (Implementation) module — implements the interface, imports the package, and registers the implementation as an OSGi component/service The consuming module then simply imports the API package and looks up the service using @Reference injection. Step 1: Create the API Module Using Liferay Workspace + Blade CLI, generate a new API module: blade create -t api -p com.sgc.greeting greeting-api This generates a Gradle module unde...

What's New in Liferay DXP 7.4

 

Liferay DXP 7.4 represents a landmark release packed with new capabilities that accelerate development, improve governance, and enable modern digital experience delivery. Below is an overview of the five key feature areas introduced in this release, each of which is covered in full technical detail in the sections that follow.


01

Liferay Objects — Low-Code / No-Code Application Builder

A revolutionary low-code development capability that empowers business users and developers to create fully functional custom applications directly through the Liferay UI - no Java code, no server deployment required. Define data models, relationships, validations, workflows, and REST/GraphQL APIs entirely through a visual interface.

  • Custom data models with multiple field types

  • Auto-generated REST and GraphQL APIs

  • Object relationships, validations and workflows

  • Seamless integration with Liferay search and permissions




02

Client Extensions — Modern Extension Architecture

The definitive replacement for legacy Hook and EXT plugin patterns. Client Extensions allow developers to integrate external applications built in any modern JavaScript framework (React, Angular, Vue) without deploying code into the Liferay JVM - making customisations upgrade-safe, technology-agnostic, and independently deployable.

  • External apps outside the Liferay JVM

  • Custom Element and IFrame deployment strategies

  • YAML-based configuration and deployment

  • Fully upgrade-safe, no core API dependency




03

Enhanced Headless APIs & GraphQL -API-First Content & Data Delivery

Significantly expanded REST and GraphQL API coverage makes Liferay 7.4 a genuine headless platform. Every content type, custom Object, and platform entity is accessible via OpenAPI 3.0-compliant endpoints and a unified GraphQL schema, enabling any frontend or third-party system to integrate seamlessly.

  • OpenAPI 3.0 REST APIs for all content and data

  • Unified GraphQL endpoint with schema introspection

  • REST Builder for rapid custom API development

  • OAuth 2.0 and JWT security with scoped access




04

Style Books & Improved Theming — Token-Based Visual Design System

Style Books introduce a structured, token-driven approach to managing site visual design. Designers and content managers can control typography, colours, spacing, and component appearance through a visual UI without deploying theme code, enabling rapid brand changes and multi-brand portal scenarios.

  • Design tokens for colours, typography, and spacing

  • Live preview when adjusting Style Book values

  • Single theme supporting multiple visual identities

  • Automatic propagation to all Fragments and pages




05

Search Blueprints & LES Integration — Advanced Search Configuration & Enterprise Search

Search Blueprints provide unprecedented control over search query construction, result ranking, and filtering — all without writing Java code. Combined with Liferay Enterprise Search (LES) capabilities including Learning to Rank, Cross-Cluster Replication, and Monitoring, this release delivers enterprise-grade search infrastructure.

  • Visual Blueprint editor for query construction

  • Boost rules, filters, conditions and aggregations

  • Learning to Rank ML-based relevance tuning (LES)

  • Cross-Cluster Replication for HA search (LES)


Comments

Popular posts from this blog

service builder with crud operation in liferay

   Crud and Search opration in Liferay:      ->  Liferay use service builder techniq for Crud opration.    ->  Service builder purform by  Service.xml file.    ->  Service.xml file create table in database and also create class and diffrent method.   1)      Create service.xml file.             ->Create service.xml file in WEB-INF and write below code.             ->CODE:        < service-builder package-path = "com.test" >         < namespace > qr </ namespace >           < entity name = "Searchclass" local-service = "true"                     ...

How to create new site programmaticly in liferay with validation

Create site in liferay <%@page import="javax.portlet.PortletPreferences"%> <%@page import="com.liferay.portal.kernel.util.ParamUtil"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page import="com.liferay.portal.kernel.util.StringPool"%> <%@page import="com.liferay.portal.kernel.util.UnicodeProperties"%> <%@page import="com.liferay.portal.service.LayoutSetPrototypeServiceUtil"%> <%@page import="com.liferay.portal.model.LayoutSetPrototype"%> <%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%> <%@page import="java.util.List"%> <%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> <%@page import="com.liferay.portal.theme.ThemeDisplay"%> <%@page import="com.liferay.portal.model.Group"%> <%@page import="com.liferay.portal.kernel.util.WebK...

The Ultimate Guide to Liferay DXP Performance Tuning: Speed Up Your Portal

The Ultimate Guide to Liferay DXP Performance Tuning: Speed Up Your Portal In the enterprise web space, milliseconds equal millions. Whether you are running a B2B commerce storefront, a customer support portal, or an employee intranet on Liferay DXP, slow load times will devastate your user experience and destroy your SEO rankings. Out of the box, Liferay is configured to run on almost any machine. This means its default settings are highly conservative to ensure compatibility, not maximum performance. If you are launching a production environment without tuning your server, you are leaving massive amounts of speed and scalability on the table. In this comprehensive, deep-dive guide, we are going to explore the critical layers of Liferay performance tuning. We will cover backend Java Virtual Machine (JVM) configuration, Database Connection Pooling, Elasticsearch optimization, and Frontend caching strategies. By the end of this guide, you will have a blazing-fast, enterprise-grade...