About the JClient Login Dialog

You can add a customizable login dialog to your JClient project that will require a user name and password to run your application that you have created for an ADF Business Components project. Currently, no other business services are supported.

By default the generated login dialog works with Oracle Application Server JAAS Provider and uses SECURITY_PRINCIPAL and SECURITY_CREDENTIALS properties. However, you can customize the generated file when you prefer to bypass OracleAS JAAS Provider and work instead with a JDBC connection that requires DB_USERNAME_PROPERTY and DB_PASSWORD_PROPERTY properties. See the related topics list for details about generating and customizing the login dialog.

Note: If you decide to run the JClient application with the generated login dialog and OracleAS JAAS Provider (default), you must set the Business Components jbo.security.enforce parameter for the Business Components context to must for full authentication or none for no authentication. This step is not required in the case of a JDBC connection.

You add the login dialog class to your JClient project when you generate a frame to run your JClient application. Two wizards in JClient let you generate a JFrame with the appropriate JClient bootstrap code:

When you run either of these JClient wizards with the generate login dialog option selected, JDeveloper will:

Because the generated login dialog (JCLoginDialog.java) implements the methods of the interface, it gives you the starting code that you can modify. Using the JCLoginDialog.java file, you can customize any aspect of the login dialog:

How Does JClient Behave if You Don't Generate a Login Dialog?

When you run one of the JClient wizards to generate a JClient frame, but do not generate a login dialog in your JClient project (by leaving Generate a login dialog in the wizard unselected), you can still run your application:

About Customizing the JCLoginDialog Code

You generate the JCLoginDialog.java file in your JClient project when you want to modify the starter code that implements the required methods of the EnvInfoProvider interface. The interface is used in the Business Components connection strategy to provide the hooks to change login parameters at runtime.

The EnvInfoProvider interface expects the following methods to be implemented:

public void getInfo(String info, Object connEnvironment)

This method is called before connecting to the database. It allows you to update (and return) the hashtable with all the connection parameters.

Public int getNumOfRetries()

This method determines how many times the business components will attempt to connect after failing. Each time it will obtain connection information from the EnvInfoProvider.

Note: The method public void modifyInitialContext(Object initialContext) had been used in previous releases, but is now deprecated. You may implement as an empty method.


About Security in Business Components Clients
About Configuration Files in Business Components Client Security

Generating a JClient Login Dialog for JAAS
Running a JClient Login Dialog for JAAS
Modifying the JClient Login Dialog for JDBC

 

 

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.