Customizing the Product Key
Sentinel LDK-EMS uses a default Product key format to uniquely identify each Product in an Entitlement. The default format consists of 32 randomly generated characters. However, you can customize this according to your requirements. A customized Product key should have minimum 6 characters.
To replace the default Sentinel LDK-EMS Product key generator:
1.Create and compile a Java class that implements the com.sfnt.ems.services.PkidGenerator interface. This interface has the following method:
public interface PkidGenerator { /** * @return generated PkID, which is unique. */ public String generateID(Object[] args); }
2.Package the custom PkidGenerator Java file in the same way as the file SamplePkIdGenerator.java is packaged in %EMS_Home%\Plugins\samples\SamplePkidGenerator folder.
3.In the SamplePkidGenerator folder, edit PkidGeneratorBuild.xml file by renaming the .jar destination file name.
4.Run the ANT file using the -file PkidGeneratorBuild.xml command . This generates a .jar file as mentioned in destination file name, for example, customPkidGenerator.jar.
5.Place the customPkidGenerator.jar file under %EMS_HOME%\EMSServer\webapps\ems\WEB-INF\lib.
6.Edit the ems-servlet.xml file, located under %EMS_HOME%\EMSServer\webapps\ems\WEB-INF, as specified below:
Change
<bean id="pkidGenerator" class="com.sfnt.ems.service.PkidGeneratorDefaultImpl" />
To
<bean id="pkidGenerator" class="{fully qualified class name of custom implementation}"/>
7.Restart the Sentinel LDK-EMS Service.