Database Reference
In-Depth Information
In the Pick Application to Manage functional screen shown in Figure 12- 7, we will be selecting a
specific application from the list of registered applications that we want to manage. The list is shown in
the top drop-down box, and the Manage Selected Application button will start a new application in a
new JVM. Because practically all our security structures, especially those in the OracleJavaSecure class,
are static, we need to start each different application in a separate JVM in order to have application-
specific settings of our static members.
Figure 12-7. Pick an Application to Manage functional Screen
Initializing the List of Applications
We will run the Pick Application to Manage screen, PickAppManage class, with a connection that is
proxied through the avadmin user. We will have the appver_admin role in order to read the list of
applications that are registered. In our dataInit() method, we have a single query that we use to get the
list of applications. This query is shown in Listing 12-59. Notice in the query that we are getting the
application ID and the related application inner class name to represent the application. We display this
list in the drop-down combo box at the top of the screen.
Listing 12-59. Query to get List of Registered Applications
stmt.executeQuery(
"SELECT DISTINCT application_id || '/' || class_name o FROM appsec.v_app_class_id "
+ "where class_name in " +
"( select distinct class_name from appsec. v_app_conn_registry_filtered ) " +
"ORDER BY o");
We haven't configured it yet, but our intent is to limit the list of applications shown here to just
those that the current user has been assigned to administer. This will be accomplished by restricting
what entries in the v_app_conn_registry_filtered view are accessible to the current user. Once we have
restricted that view, then the query in PickAppManage , Listing 12-59 will also be restricted by the where
clause.
Selecting the Manage Selected Application Button
When you have selected an application to manage and you press the Manage Selected Application
button, the event will run the manageAppButton_actionPerformed() method. We start that method by
making sure an application has been selected from the list, and then by parsing out the application ID
and the application inner class name from the selected item. The code for this is shown in Listing 12-60.
 
Search WWH ::




Custom Search