Eason Date of writing: 2018/07/31 Contact information: 13920409462
1. Extension Instructions
VIRTUALJDBC extension provides the implementation of the virtual JDBC driver. With this Extension, you can run queries against the Hybris database in an efficient manner using a virtual JDBC connection from outside the network.
2. Features and benefits
VJDBC connections allow clients such as birt,jaspersoft,excel (you need ODBC-JDBC Bridge) and OpenOffice to easily generate reports outside of the Hybris network.
3. Function principle and architecture
The basic VJDBC architecture is as follows:
The general workflow is as follows:
1. SQL client (such as birt, Jaspersoft or dbvisualizer) sends SQL query to hybris vjdbc driver;
2.SQL query is encoded by efficient binary protocol and sent to Hybris server through HTTPS;
3. The hybris server uses the vjdbc connectionfilter to intercept the call, which performs the following operations:
*It ensures that the hybrid session is accompanied by SQL requests and that the same hybrid session is retrieved in subsequent calls from the same client.
*It establishes a connection to the database.
4. Then the vjdbc servlet performs the query and writes the data back to the server;
5. The response from the database is encoded and sent back to the driver on the client through HTTPS, which decodes it as a reporting tool.
Routing through hybris servlet has the following advantages:
*There is no restriction of firewall;
*It has the same security as other hybris servlets;
1. Configure and start vistual JDBC
The Virtualjdbc Extension is provided with the SAP Hybris Commerce zip file. Please follow the steps below to install.
1. Build SAP Hybris Commerce.
1.Open a command prompt.
2.Navigate to <HYBRIS_BIN_DIR>/platform.
3.Run the setantenv script for your platform.
4.Call ant clean all to build SAP Hybris Commerce.
2. Install the virtual JDBC driver. 1. Download and extract the driver package:
Driver download
2. Set the drive path on the client;
For DBVisualizer:
1.select | Tools | DriverManager | CreateANewDriver
2.Add <VJDBC_DIR >/lib/vjdbc.jar in the Driver File Path by clicking the folder to the right of DriveFilePaths area.
3.Enter the name, URL format, and driver class as follows:
3. Establish a database connection:
Specify the connection URL, in the following format.
jdbc:hybris:flexiblesearch:<url_to_server>/virtualjdbc/service?tenant=junit
(which connects to the junit tenant)
jdbc:hybris:flexiblesearch:<url_to_server>/virtualjdbc/service
(which connects to the default tenant which is the master)
jdbc:hybris:flexiblesearch:<url_to_server>/virtualjdbc/service?tenant=master
(which connects to the master tenant)
4. Link Test
1. The following message is configured successfully:
2. Database list information:
Show Database list indicates a successful configuration
3.Hybris Wiki Learning Address
For specific steps see: https://help.hybris.com/6.5.0/hcd/c45d5cb162614da08f05b5c258a62a64.html
Hybris Virtualjdbc Extension