WebLogic is a Java EE (Jakarta EE) application server provided by Oracle, used for deploying and running enterprise-level Java applications. It is widely used in financial institutions such as banks, securities, and insurance companies. WebLogic supports high concurrency, distributed architectures, and cluster management, and is commonly employed in large-scale business systems, such as core banking systems and securities trading systems.
Prerequisites
- Ensure that Oracle JDK is installed (WebLogic does not support OpenJDK).
- Obtain and install WebLogic Server 14.1.1 or later.
- Ensure that the IP address of the OBServer node to be connected is reachable from the machine where WebLogic is installed.
- Create an OceanBase database (V4.3.5 or later) and a tenant.
Procedure
Step 1: Download and prepare the installation files
Download the Generic Installer (
fmw_14.1.1.0.0_wls.jar) from the Oracle Fusion Middleware Software Downloads page.Create a system user for installing and running WebLogic (execute the following commands with root privileges):
# Switch to the root user and execute the following commands groupadd weblogic useradd -g weblogic weblogic passwd weblogic # Enter the password twice to complete the settingsUpload the downloaded
fmw_14.1.1.0.0_wls.jarto the/home/weblogic/directory on the server and set the permissions:chown weblogic:weblogic /home/weblogic/fmw_14.1.1.0.0_wls.jarUse the root user to create the
/opt/weblogicdirectory and grant permissions:mkdir -p /opt/weblogic/oraInventory mkdir -p /opt/weblogic/Oracle mkdir -p /opt/weblogic/Oracle/Middleware chmod 777 /opt/weblogic chown -R weblogic:weblogic /opt/weblogicCreate the oraInst.loc file:
cd /opt/weblogic echo "inventory_loc=/opt/weblogic/oraInventory inst_group=weblogic" > oraInst.locCreate the wls.rsp response file:
echo "[ENGINE] Response File Version=1.0.0.0.0 [GENERIC] ORACLE_HOME=/opt/weblogic/Oracle/Middleware INSTALL_TYPE=WebLogic Server" > wls.rsp
Step 2: Install WebLogic
Switch to the weblogic user and install WebLogic:
su - weblogic cd /home/weblogic java -jar fmw_14.1.1.0.0_wls.jar -silent -responseFile /opt/weblogic/wls.rsp -invPtrLoc /opt/weblogic/oraInst.locAfter the installation is complete, create a WebLogic domain:
source /opt/weblogic/Oracle/Middleware/wlserver/server/bin/setWLSEnv.sh mkdir -p /opt/weblogic/Oracle/Middleware/user_projects/domains/hnDoMain cd /opt/weblogic/Oracle/Middleware/user_projects/domains/hnDoMain $JAVA_HOME/bin/java $JAVA_OPTIONS -Xmx1024m -XX:MaxPermSize=2048m weblogic.ServerUpload the OceanBase client to the domain directory:
# Upload oceanbase-client to /opt/weblogic/Oracle/Middleware/user_projects/domains/hnDoMain/lib/
Step 3: Configure the OceanBase data source
Log in to the WebLogic management console (default URL:
http://<hostname>:7001/console).In the left-side navigation pane, choose Service > Data Source.
Click Create > General Data Source.
Fill in the data source information:
- Name:
obmysql - JNDI name:
JNDI/obmysql - Database type:
Other
- Name:
Configure the database connection:
- Driver class name:
com.oceanbase.jdbc.Driver - URL:
jdbc:oceanbase://<host>:<port>/<database> - Username:
<username> - Password:
<password>
- Driver class name:
Click Test Configuration to verify the connection.
Click Complete to save the configuration.
More information
If you encounter any issues while connecting to OceanBase Database through WebLogic, we recommend that you refer to the official WebLogic documentation or contact OceanBase Technical Support.