www.dextsolution.com
DEXTUPLOAD
NJ
menu toggleProduct description > License > Applying the server license using XML

Applying the server license using XML

Before reading this article you must first understand the Server license document.

In a server redundant environment such as load balancing, it is necessary to purchase a server License that has only the number of servers that manage the WAS that uses the product. Although the number of License files with different PID and SN is required for the number of servers, the product has the problem that you can specify only one file path for License file.

In order to solve such a problem, we do not distribute the License file along with the source project. Instead, The file name and path are the same in the specific location of the server, but the files with different license contents are distributed separately for each server.

# When creating the configuration object on the source code and applying it 
Environment env = new Environment();

// License file has the same path based on server's root.
// But, actually, License has different PID and SN for each server. 
env.setLicenseFilePath("Path of the license file");
...

Alternatively, in a typical servlet environment, you can distribute configuration files separately at the code level, so you can distribute multiple License files and sources together.

# When creating the configuration object on the source code and applying it 
Environment env = new Environment(); 

if (A server)
    env.setLicenseFilePath("Path of the A server license");
else if (B server)
    env.setLicenseFilePath("Path of the B server license");
...

However, in spring environments and uploading environments of large files, you cannot set the paths of the License files with differenct contents using context xml or web.xml file.

Configure authentication using the XML License file

Using the licenseConfigXmlPath attribute instead of the licenseFilePath attribute can solve this problem. For example, if you publish two server Licenses and configure duplicate servers, the same web application will be distributed to both servers. At this time, since there is only one source to be distributed, one project contains two License files (delimiting names). Then, an XML file representing the composition of the license is created, and the path of this XML file is specified by the licenseConfigXmlPath attribute.

An example is as follows.

# Server name is SERVER-A and IP address is 1.1.1.1.
# License file name is dextuploadnj-server-a.config.
PID=DJNJ----------A1
SN=PUJ---------A1

# Server name is SERVER-B and IP address is 2.2.2.2.
# License file name is dextuploadnj-server-b.config.
PID=DJNJ----------A2
SN=PUJ---------A2

# If the trial needs to be driven without distinction of the host
# License file name is dextuploadnj-evaluation.config 
PID=DEVPIA
SN=DEVPIA

Create a License management file (dextuploadnj-licenses.xml) as follows and generate it (note the uppercase and lowercase letters).

<?xml version="1.0" encoding="UTF-8"?>
<dextuploadnj-licenses>
  <!-- License file information applicable to SERVER-A -->
  <license type="cert" hostname="SERVER-A" ip="1.1.1.1" path="dextuploadnj-server-a.config"/>
  <!-- License file information applicable to SERVER-B -->
  <license type="cert" hostname="SERVER-B" ip="2.2.2.2" path="dextuploadnj-server-b.config"/>
  <!-- Trial version -->
  <license type="eval" path="dextuploadnj-evaluation.config"/>
</dextuploadnj-licenses>

Use the licenseConfigXmlPath attribute to specify the license management file.

<!-- When setting environment bean in spring environment -->
<bean id="idName" class="devpia.dextuploadnj.support.spring.DEXTUploadNJMultipartResolver">
  ...
  <property name="environment">
    <bean class="devpia.dextuploadnj.Environment">
      <property name="licenseConfigXmlPath" value="parent path/dextuploadnj-licenses.xml"/>
    </bean>
  </property>
  ...
</bean>

<!-- When passed as a parameter of a filter object in a large upload environment  -->
<filter>
  <filter-name>extensionUploadFilter</filter-name>
  <filter-class>devpia.dextuploadnj.support.common.ExtensionFileUploadFilter</filter-class>
  ...
  <init-param>
    <param-name>licenseConfigXmlPath</param-name>
    <param-value>parent path/dextuploadnj-licenses.xml</param-value>
  </init-param>
</filter>

If you distribute the dextuploadnj-server-a.config, dextuploadnj-server-b.config, dextuploadnj-evaluation.config dextuploadnj-licenses.xml in same location, the setting is completed.

In the case of the above example, if the distributed server is not the SERVER-A or the SERVER-B, it automatically reads the evaluation license file.

License file and License configuration XML file must be saved with possible UTF-8 encoding.

If setting the licenseFilePath attribute and the licenseConfigXmlPath property, the licenseFilePath attribute takes precedence.

Notes of license

DEXTSolution Inc., manages only customer information like the PID(product number), SN(serial number) and license type identified at the purchasing

Changing the installation information(host name, IP), re-issuing new authentication key, is a matter that the customer must manage directly.