Example: System Properties Class Source File


//=========================================================
// IBM Toolbox for Java                                 
//---------------------------------------------------------
// Sample properties class source file                     
//                                                         
// Compile this source file and store the class file in    
// the classpath.                                          
//=========================================================
package com.ibm.as400.access;

public class Properties
extends java.util.Properties
{
   public Properties ()
   {
      /*---------------------------------------------------------*/
      /* Proxy server system properties                          */
      /*---------------------------------------------------------*/

      // This system property specifies the proxy server host name 
      // and port number, specified in the format: hostName:portNumber
      // The port number is optional.
      put ("com.ibm.as400.access.AS400.proxyServer", "hqoffice");
                                                        
      // This system property specifies which portion of the proxy          
      // data flow is encrypted via SSL.  Valid values are:                 
      //   1 - Proxy client to proxy server                                 
      //   2 - Proxy server to System i                                       
      //   3 - Proxy client to proxy, and proxy server to System i            
      put("com.ibm.as400.access.SecureAS400.proxyEncryptionMode", "1");
                                                                           
      // This system property specifies how often, in seconds,              
      // the proxy server will look for idle connections. The               
      // proxy server starts a thread to look for clients that are          
      // no longer communicating. Use this property to set how              
      // often the thread looks for idle connections.                       
      put("com.ibm.as400.access.TunnelProxyServer.clientCleanupInterval", "7200");
                                                                           
      // This system property specifies how long, in seconds, a             
      // client can be idle before it is cleaned up. The proxy server       
      // starts a thread to look for clients that are no longer             
      // communicating. Use this property to set long a client can          
      // be idle before it is cleaned up.                                   
      put("com.ibm.as400.access.TunnelProxyServer.clientLifetime", "2700");           
                                                        
      /*---------------------------------------------------------*/
      /* Trace system properties                                 */
      /*---------------------------------------------------------*/

      // This system property specifies which trace categories to enable.
      // This is a comma-delimited list containing any combination of trace 
      // categories.  The complete list of trace categories is defined in 
      // the Trace class.
      put ("com.ibm.as400.access.Trace.category", "error,warning,information");

      // This system property specifies the file to which trace output 
      // is written.  The default is to write trace output to System.out.
      put ("com.ibm.as400.access.Trace.file", "c:\temp\trace.out");  
      
      
      /*---------------------------------------------------------*/
      /* Command Call system properties                          */
      /*---------------------------------------------------------*/

      // This system property specifies whether CommandCalls should 
      // be assumed to be thread-safe. If true, all CommandCalls are 
      // assumed to be thread-safe. If false, all CommandCalls are 
      // assumed to be non-thread-safe. This property is ignored 
      // for a given CommandCall object if either 
      // CommandCall.setThreadSafe(true/false) or
      // AS400.setMustUseSockets(true) has been performed on the object.
      put ("com.ibm.as400.access.CommandCall.threadSafe", "true");
      

      /*---------------------------------------------------------*/
      /* Program Call system properties                          */
      /*---------------------------------------------------------*/

      // This system property specifies whether ProgramCalls should 
      // be assumed to be thread-safe. If true, all ProgramCalls are 
      // assumed to be thread-safe. If false, all ProgramCalls are 
      // assumed to be non-thread-safe. This property is ignored 
      // for a given ProgramCall object if either 
      // ProgramCall.setThreadSafe(true/false) or
      // AS400.setMustUseSockets(true) has been performed on the object.
      put ("com.ibm.as400.access.ProgramCall.threadSafe", "true");
   }
}