Apply the server license using XML
Before reading this document, you should familiarize yourself with the server licensing document.
In a server redundancy environment such as load balancing, you must purchase a server license equal to the number of servers running WAS using the product. There is a situation where license files with different PIDs and SNs are needed as many servers as there are servers, but the product has a problem in that only one file path can be specified for the license file.
To solve this problem, instead of distributing the license file along with the source, distribute files with the same file name and path but different license contents separately to each server in advance at a specific location on the server to be actually run.
# When creating a configuration object in the source code and applying it immediately Environment env = new Environment(); // The license file has the same path based on the server root. // However, in reality, the license has a different PID/SN for each server. env.setLicenseFilePath(absolute path to server license file); ...
As another method, in the case of a general servlet environment, servers can be distinguished at the code level and the path to the configuration file can be provided separately, so multiple license files and sources can be distributed together.
# When creating a configuration object in the source code and applying it immediately
Environment env = new Environment();
if (A server)
env.setLicenseFilePath(absolute path to A server license file);
else if (B server)
env.setLicenseFilePath(absolute path to B server license file);
...
However, in the Spring environment or large file upload environment, the license file path must be set using the context setting XML or web.xml file, but there is no way (grammatical) to selectively specify a different file path.
- Setting up authentication using an XML license file
-
This problem can be solved by using the licenseConfigXmlPath property rather than the licenseFilePath property. For example, if two server licenses are issued and the servers are configured to be duplicated, the same web application will be deployed on both servers. At this time, since there is only one source to be distributed, two license files (with separate names) are included in one project. Then, create an XML file representing the license configuration and specify the path to this XML file as the licenseConfigXmlPath property.
Example
# Server license with host name SERVER-A and IP 1.1.1.1 # The file name is dextuploadjk-server-a.config PID=DJJK----------A1 SN=PUJ---------A1 # Server license with host name SERVER-B and IP 2.2.2.2 # The file name is dextuploadjk-server-b.config PID=DJJK----------A2 SN=PUJ---------A2 # When the trial version must be run regardless of host # The file name is dextuploadjk-evaluation.config PID=DEXT SN=DEXT
Create a license management file (dextuploadjk-licenses.xml) by writing the following (note the case).
<?xml version="1.0" encoding="UTF-8"?> <dextuploadjk-licenses> <!-- License file information to apply to SERVER-A --> <license type="cert" hostname="SERVER-A" ip="1.1.1.1" path="dextuploadjk-server-a.config"/> <!-- License file information to apply to SERVER-B --> <license type="cert" hostname="SERVER-B" ip="2.2.2.2" path="dextuploadjk-server-b.config"/> <!-- Trial --> <license type="eval" path="dextuploadjk-evaluation.config"/> </dextuploadjk-licenses>
Set the path to the license management file using the licenseConfigXmlPath property.
<!-- When setting in Spring environment --> <bean id="idName" class="dextuploadjk.support.spring.JKMultipartResolver"> ... <property name="environment"> <bean class="dextuploadjk.engine.Environment"> <property name="licenseConfigXmlPath" value="parent path/dextuploadjk-licenses.xml"/> </bean> </property> ... </bean> <!-- When passing as a parameter of a filter object in the Extension file-upload environment --> <filter> <filter-name>extensionUploadFilter</filter-name> <filter-class>dextuploadjk.support.common.JKExtensionUploadFilter</filter-class> ... <init-param> <param-name>licenseConfigXmlPath</param-name> <param-value>부모경로/dextuploadjk-licenses.xml</param-value> </init-param> </filter>Finally, the setup is completed by distributing the dextuploadjk-server-a.config, dextuploadjk-server-b.config license files, and dextuploadjk-evaluation.config evaluation license file together in the same location as dextuploadjk-licenses.xml.
In the above example, if the deployed server is not SERVER-A or SERVER-B, the trial license file is automatically read.
License files and license settings XML files should be saved in UTF-8 encoding whenever possible.
If both the licenseFilePath property and the licenseConfigXmlPath property are set, the licenseFilePath property takes priority.
- License Notes
-
- Dext Solution Co., Ltd. manages only customer information, PID (product number), SN (serial number), and license type at the time of license purchase.
- The process of changing license installation information (modifying host name, IP) and reissuing authentication keys must be managed directly by the customer.