77 lines
5.3 KiB
HTML
77 lines
5.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Managing default user IDs" />
|
|
<meta name="abstract" content="To minimize the number of times a user has to sign on, use a default user ID. The Java program uses the default user ID when a the program does not provide a user ID. The default user ID can be set either by the Java program or through the user interface. If the default user ID has not been established, the Sign-On dialog allows the user to set the default user ID." />
|
|
<meta name="description" content="To minimize the number of times a user has to sign on, use a default user ID. The Java program uses the default user ID when a the program does not provide a user ID. The default user ID can be set either by the Java program or through the user interface. If the default user ID has not been established, the Sign-On dialog allows the user to set the default user ID." />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="as400man" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Managing default user IDs</title>
|
|
</head>
|
|
<body id="as400man"><a name="as400man"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Managing default user IDs</h1>
|
|
<div><p>To minimize the number of times a user has to sign on, use a default
|
|
user ID. The Java™ program uses the default user ID when a the program
|
|
does not provide a user ID. The default user ID can be set either by the Java program
|
|
or through the user interface. If the default user ID has not been established,
|
|
the Sign-On dialog allows the user to set the default user ID.</p>
|
|
<div class="section"><p>Once the default user ID is established for a given server, the
|
|
Sign-On dialog does not allow the default user ID to be changed. When an AS400
|
|
object is <a href="javadoc/com/ibm/as400/access/AS400.html#AS400(JAVA.LANG.STRING)"> constructed</a>, the Java program can supply the user ID and
|
|
password. When a program supplies the user ID to the AS400 object, the default
|
|
user ID is not affected. The program must explicitly set the default user
|
|
ID <a href="javadoc/com/ibm/as400/access/AS400.html#SETUSEDEFAULTUSER(BOOLEAN)"> setUseDefaultUser()</a> if the program wants to set or change
|
|
the default user ID. See <a href="as400sum.htm#as400sum">Prompting, default
|
|
user ID, and password caching summary</a> for more information.</p>
|
|
<p>The
|
|
AS400 object has methods to <a href="javadoc/com/ibm/as400/access/AS400.html#GETDEFAULTUSER(JAVA.LANG.STRING)"> get</a>, <a href="javadoc/com/ibm/as400/access/AS400.html#SETDEFAULTUSER(JAVA.LANG.STRING, JAVA.LANG.STRING)"> set</a>, and <a href="javadoc/com/ibm/as400/access/AS400.html#REMOVEDEFAULTUSER(JAVA.LANG.STRING)"> remove</a> the default user ID. The Java program
|
|
can also disable default user ID processing through the <a href="javadoc/com/ibm/as400/access/AS400.html#SETUSEDEFAULTUSER(BOOLEAN)"> setUseDefaultUser()</a> method. If default user ID processing
|
|
is disabled and the Java application does not supply a user
|
|
ID, the AS400 object prompts for user ID every time a connection is made to
|
|
the iSeries™ server.</p>
|
|
<p>All
|
|
AS400 objects that represent the same iSeries server within a Java virtual
|
|
machine use the same default user ID.</p>
|
|
<p>In the following example, two
|
|
connections to the server are created by using two AS400 objects. If the user
|
|
checked the Default User ID box when signing on, the user is not prompted
|
|
for a user ID when the second connection is made.</p>
|
|
<pre> // Create two AS400 objects to the
|
|
// same iSeries.
|
|
AS400 sys1 = new AS400("mySystem.myCompany.com");
|
|
AS400 sys2 = new AS400("mySystem.myCompany.com");
|
|
|
|
// Start a connection to the command
|
|
// call service. The user is prompted
|
|
// for user ID and password.
|
|
sys1.connectService(AS400.COMMAND);
|
|
|
|
// Start another connection to the
|
|
// command call service. The user is
|
|
// not prompted.
|
|
sys2.connectService(AS400.COMMAND);</pre>
|
|
<p>The default user ID
|
|
information is discarded when the last AS400 object for the an iSeries server
|
|
is garbage collected.</p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |