All Projects → amusarra → liferay-portal-oracledb-support

amusarra / liferay-portal-oracledb-support

Licence: other
Liferay Portal 7 Community Edition Oracle Database Support ** NO LONGER MAINTAINED **. Refer to this repository: https://github.com/amusarra/liferay-portal-database-all-in-one-support

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to liferay-portal-oracledb-support

soda-for-java
SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.
Stars: ✭ 61 (+369.23%)
Mutual labels:  jdbc, oracle-database
oracle-jdbc-tester
A simple command line Java application to test JDBC connection to Oracle database
Stars: ✭ 37 (+184.62%)
Mutual labels:  jdbc, oracle-database
tekniq
A framework designed around Kotlin providing Restful HTTP Client, JDBC DSL, Loading Cache, Configurations, Validations, and more
Stars: ✭ 31 (+138.46%)
Mutual labels:  jdbc
PECI-Java-MAR-2015
Repositorio del curso de Java de Mar 2015
Stars: ✭ 29 (+123.08%)
Mutual labels:  jdbc
jTDS
jTDS JDBC Driver
Stars: ✭ 67 (+415.38%)
Mutual labels:  jdbc
mydataharbor
🇨🇳 MyDataHarbor是一个致力于解决任意数据源到任意数据源的分布式、高扩展性、高性能、事务级的数据同步中间件。帮助用户可靠、快速、稳定的对海量数据进行准实时增量同步或者定时全量同步,主要定位是为实时交易系统服务,亦可用于大数据的数据同步(ETL领域)。
Stars: ✭ 28 (+115.38%)
Mutual labels:  jdbc
warpdb
DSL-driven RDBMS interface for Java.
Stars: ✭ 73 (+461.54%)
Mutual labels:  jdbc
u8g2-arm-linux
U8g2 for arm linux - a monochrome graphics library
Stars: ✭ 37 (+184.62%)
Mutual labels:  spi
sensorweb-server-helgoland
Thin Web binding API to access series data.
Stars: ✭ 20 (+53.85%)
Mutual labels:  spi
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (+207.69%)
Mutual labels:  spi
dalesbred
Dalesbred - a database access library for Java
Stars: ✭ 50 (+284.62%)
Mutual labels:  jdbc
spring-data-jdbc-repository
Spring Data JDBC generic DAO implementation in Java (more up-to-date fork)
Stars: ✭ 123 (+846.15%)
Mutual labels:  jdbc
jdk-source-code-reading
JDK source code reading
Stars: ✭ 19 (+46.15%)
Mutual labels:  jdbc
jnosql.github.io
The JNoSQL is a framework whose has the goal to help Java developers to create Java EE applications with NoSQL, whereby they can make scalable application beyond enjoy the polyglot persistence.
Stars: ✭ 13 (+0%)
Mutual labels:  jdbc
NR1-UI
Userinterface for Volumio (RaspberryPi) with ssd1322 and ssd1306 oled display, spectrum bargraph, progress bar, LED functions, Standby-functions, 4 Buttons and Rotary Encoder.
Stars: ✭ 29 (+123.08%)
Mutual labels:  spi
JDBCManager
一款操作数据库的小工具
Stars: ✭ 13 (+0%)
Mutual labels:  jdbc
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-7.69%)
Mutual labels:  jdbc
Waveshare.EPaperDisplay
.Net Core Library to show images on Waveshare E-Paper Displays
Stars: ✭ 17 (+30.77%)
Mutual labels:  spi
baymax
铜板街轻量级JDBC层分库分表框架
Stars: ✭ 45 (+246.15%)
Mutual labels:  jdbc
acolyte
🐯 Mockup/testing JDBC & MongoDB driver (or Chmeee's son on the Ringworld).
Stars: ✭ 58 (+346.15%)
Mutual labels:  jdbc

travis ci

Welcome to Oracle DB support for Liferay CE 7.0

Join the chat at https://gitter.im/amusarra/liferay-portal-oracledb-support

Those who follow Liferay is aware of the fact that the Community Edition version 7 of Liferay, were eliminated quite a bit of components App Server, Database & Clustering Support. For more detail information you can read the blog post by Bryan Cheung published on April 7, 2016.

The Liferay 7 CE no more support OOTB (Out Of The Box):

  • Application Server: Oracle WebLogic, IBM WebSphere
  • Clustering
  • MultiVM Cache
  • Oracle Database, Microsoft SQL Server, IBM DB2, Sybase DB

This sample project demonstrates how to add support to the Oracle database. Liferay has performed refactorting the code so that it is possible and easy to add support for databases no longer supported OOTB.

Attention update: The driver works with the release GA1, GA2 and GA3 of the Liferay 7 CE.

In the following video, I will guide you step-by-step instructions on how to add support for Oracle Database to Liferay 7 Community Edition in the bundled version of Wildfly.

Liferay 7 Wildfly: How to add support for Oracle DB

1. Introduction

To extend support to other databases, Liferay has decided to refactory code to use Java SPI (Service Provider Interface). SPI is the mechanism that allows you to extend / change the behavior within a system without changing the source. It includes interfaces, classes or methods that the user extends or implements in order to obtain a certain functionality.

In short we must:

The following code shows how service providers are loaded via SPI.

public DBManagerImpl() {
  ServiceLoader<DBFactory> serviceLoader = ServiceLoader.load(
    DBFactory.class, DBManagerImpl.class.getClassLoader());

  for (DBFactory dbFactory : serviceLoader) {
    _dbFactories.put(dbFactory.getDBType(), dbFactory);
  }
}

To register your service provider, you create a provider configuration file, which is stored in the META-INF/services directory of the service provider's JAR file. The name of the configuration file is the fully qualified class name of the service provider, in which each component of the name is separated by a period (.), and nested classes are separated by a dollar sign ($).

The provider configuration file contains the fully qualified class names (FQDN) of your service providers, one name per line. The file must be UTF-8 encoded. Additionally, you can include comments in the file by beginning the comment line with the number sign (#).

Our file is called com.liferay.portal.kernel.dao.db.DBFactory and contain the FQDN of the class it.dontesta.labs.liferay.portal.dao.db.OracleDBFactory

In the figure below shows the complete class diagram for OracleDB.

Class Diagram for OracleDB

2. Build project

Requirements for build project

  1. Sun/Oracle JDK 1.8
  2. Maven 3.x (for build project) or Gradle 2.x

The driver that adds support for Oracle database is a jar (liferay-portal-oracledb-support-${version}.jar) which then will be installed in ROOT/WEB-INF/lib (for apache tomcat).

To generate the driver for Oracle database just follow the instructions below.

You can download the binary jar liferay-portal-oracledb-support-1.0-SNAPSHOT.jar, by doing so you can avoid doing the build.

$ git clone https://github.com/amusarra/liferay-portal-oracledb-support.git
$ cd liferay-portal-oracledb-support
$ mvn package

the build process create the jar inside the (maven) target directory:

liferay-portal-oracledb-support-1.0-SNAPSHOT.jar

If you have a Gradle build system, then you can build jar by the following command

$ git clone https://github.com/amusarra/liferay-portal-oracledb-support.git
$ cd liferay-portal-oracledb-support
$ gradle build

the build process create the jar inside the build/libs directory.

3. Install Liferay CE 7 on Oracle Database

To install Liferay on Oracle you must have previously configured a schema for Liferay on an Oracle instance (including Oracle XE 11gR2).

I have used an Oracle XE 11gR2 installation on CentOS 6.2 created on the fly on VirtualBox.

The parameters of my Oracle instance are:

  • Username: liferayce7
  • Password: liferay12345
  • FQDN: oracledb.vm.local (IP: 192.168.56.101)
  • TCP/IP Port: 1521
  • SID: XE

For the installation of Liferay follow the following steps:

  1. Download Liferay CE 7 GA1 Tomcat Bundle from sourceforge
  2. Extract the Liferay bundle (in my case $LIFERAY_HOME is /opt/liferay-portal-7.0-ce-ga1-node-1)
  3. Copy the jar liferay-portal-oracledb-support-${version}.jar in $LIFERAY_HOME/$TOMCAT_HOME/webapps/ROOT/WEB-INF/lib
  4. Download and install Oracle JDBC driver (ojdbc6.jar) in $LIFERAY_HOME/$TOMCAT_HOME/lib/ext
  5. Create the portal-ext.properties in $LIFERAY_HOME with the content as the file below. You should modify the JDBC connection parameters to the your db and the value of liferay.home
  6. Launch the Liferay Portal through the command $LIFERAY_HOME/$TOMCAT_HOME/bin/startup.sh
  7. See the Liferay activities via the log file $LIFERAY_HOME/$TOMCAT_HOME/logs/catalina.out

Below you can see the portal-ext.properties

##
## Admin Portlet
##
    #
    # Configure email notification settings.
    #
    admin.email.from.name=Joe Bloggs
    [email protected]

##
## JDBC
##

    #
    # Oracle
    #
    jdbc.default.driverClassName=oracle.jdbc.OracleDriver
    jdbc.default.username=liferayce7
    jdbc.default.password=liferay12345
    jdbc.default.url=jdbc:oracle:thin:@oracledb.vm.local:1521:xe

##
## Liferay Home
##
    #
    # Specify the Liferay home directory.
    #
    liferay.home=/opt/liferay-portal-7.0-ce-ga1-node-1

##
## Setup Wizard
##
    #
    # Set this property to true if the Setup Wizard should be displayed the
    # first time the portal is started.
    #
    setup.wizard.enabled=false

You can see the my complete catalina.out log file and following some screenshots of DB.

Liferay CE 7 GA1 on Oracle

Liferay CE 7 GA1 on Oracle

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].