https://github.com/ppodgorsek/sap-commerce-utils
A set of extensions to improve SAP Commerce (formely SAP Hybris Commerce)
https://github.com/ppodgorsek/sap-commerce-utils
hybris sap sap-commerce sap-hybris utilities
Last synced: 6 months ago
JSON representation
A set of extensions to improve SAP Commerce (formely SAP Hybris Commerce)
- Host: GitHub
- URL: https://github.com/ppodgorsek/sap-commerce-utils
- Owner: ppodgorsek
- License: mit
- Created: 2019-07-08T14:16:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T16:39:28.000Z (over 2 years ago)
- Last Synced: 2025-10-26T04:27:27.188Z (9 months ago)
- Topics: hybris, sap, sap-commerce, sap-hybris, utilities
- Homepage:
- Size: 198 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
> [!CAUTION]
> This repository is now archived, as I don't have access to the latest releases of SAP Commerce anymore.
# SAP Commerce Utils
A set of extensions to improve SAP Commerce, formely known as SAP Hybris Commerce.
**Disclaimer: this project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with SAP, or any of its subsidiaries or its affiliates.**
This project aims to improve the following features:
* Datasource connection using [HikariCP](https://github.com/brettwooldridge/HikariCP)
## HikariCP datasource
The default Commerce datasource can be replaced by HikariCP, which is more performant.
### Installing the library
As the datasource will be defined directly in Tomcat, your database library must be added to the Tomcat libraries in `hybris/config/customize/platform/tomcat/lib`:
* Oracle: `ojdbc6-w.x.y.z.jar`
* MySQL: `mysql-connector-java-x.y.z.jar`
The HikariCP library can then be easily installed by running the following command from your `platform` folder:
ant customize
Along with the HikariCP library, Slf4j libraries will also be copied, as the datasource relies on them. They are however not used by Tomcat and simply pass on any log messages to the existing logger.
### local.properties
New properties have to be defined in order to use the new datasource:
```properties
db.pool.name=sapCommerceDataSource
db.pool.fromJNDI=java:jdbc/${db.pool.name}
```
These properties must however not be used for the JUnit tenant, as they will cause unexpected issues. To avoid this, add the following properties to `hybris/config/local_tenant_junit.properties`:
```properties
db.pool.name=
db.pool.fromJNDI=
db.pool.fromJNDI.dbtype=
db.pool.dataSourceClassName=
```
Different properties must be added, depending on the database you are using:
* HSQLDB:
```properties
db.pool.fromJNDI.dbtype=hsqldb
db.pool.dataSourceClassName=org.hsqldb.jdbc.JDBCDataSource
```
* Oracle:
```properties
db.pool.fromJNDI.dbtype=oracle
db.pool.dataSourceClassName=oracle.jdbc.pool.OracleDataSource
# Make sure your DB URL is complete and has a syntax similar to below
db.url=jdbc:oracle:thin:@127.0.0.1:1521:xe
```
* MySQL:
```properties
db.pool.fromJNDI.dbtype=mysql
db.pool.dataSourceClassName=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
```
* SQL Server:
```properties
db.pool.fromJNDI.dbtype=sqlserver
db.pool.dataSourceClassName=com.microsoft.sqlserver.jdbc.SQLServerDataSource
```
* SAP HANA:
```properties
db.pool.fromJNDI.dbtype=sap
db.pool.dataSourceClassName=
```
### Declare the datasource in the application server
The steps below describe how to install the datasource in Tomcat but they are very similar for tcServer.
1. Open `hybris/config/tomcat/conf/context.xml` (if this file does not exist, create it based on `hybris/bin/platform/tomcat/conf/context.xml`)
2. Declare the resource link for the Commerce application before the `` tag closes:
```xml
```
3. Open `hybris/config/tomcat/conf/server.xml`
4. Declare the datasource resource in the `` tag:
* Oracle:
```xml
```