Community articlerelease method (Signature)
Added by IBM contributorIBM on August 15, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This method is required when the HardGC flag is false. When the HardGC flag is false, memory used by this object is not recovered during normal JVM garbage collection. As a result, you must call the release method when you are finished with this object.
It is safe to call the release method when the HardGC flag is true; in this case no action is taken.
Note: If you want to release an array of objects, you must iterate through the array and call this method on each object.


public static void release ( );


There are no parameters for this method.


Nothing. The release method does not throw an exception if an error occurs.


   public short checkSignature(FormNodeP theSignatureNode, Certificate 
   Signature theSignatureObject;
   String theSecret;
   String signerCommonName;
   BooleanHolder encodedData;
   IntHolder theStatus;
   short validation;
      theSignatureObject = theSignatureNode.getSignature();
      encodedData = new BooleanHolder();
      if ((signerCommonName = theSignatureObject.getDataByPath(
         "HMACSigner: CN", false, encodedData)) == null)
         throw new UWIException("Could not determine signer's name.");
      /* Include external code that matches the signer's identity to a shared 
         secret, and sets theSecret to match.  This is most likely a
         database lookup. */
      theStatus = new IntHolder();
      validation = theSignatureNode.validateHMACWithSecret(theSecret, 
         theServerCert, theStatus);
      /* Check the status in case the process required user input. */
      if (theStatus.value != SecurityUserStatusType.SUSTATUS_OK)
         throw new UWIException("Validation required user input.");

Parent topic:
Signature class