Deployment Method 2: Via the Oracle Enterprise Manager Application Server Control Web Site

Deployment Method #2: Via the Oracle Enterprise Manager Application Server Control Web Site

This method allows developers and administrators to deploy their Java-based applications to an OC4J container within Oracle Application Server 10 g graphically by way of a web browser. This approach has two main advantages:

  • Developers who have been working with graphical tools will probably be more comfortable using graphical web pages to deploy their applications.

  • By performing all of the deployment functions via a web interface, administrators do not have to develop security access methods for the various servers developers will be deploying their applications to. For Unix, this would involve granting telnet access and devising security policies for directories on the server. For Windows, this would entail sharing directories on the server(s) and devising security policies for each shared directory.

Deploying an application via the Oracle Enterprise Manager Web Server Control web site is a simple process after you have successfully built your EAR or WAR file and configured your data source. Go to the web site by pointing your browser to the following location:

 http://<mid-tier server>:1810 

You will need to know the ias_admin password. If you do not have that information, check with your system administrator. Click the link of the OC4J container you wish to deploy your application to. Click the Applications tab on the top of the screen (Figure 15-6).

click to expand
Figure 15-6: The Applications tab of the OC4J component

As you can see, no applications have been deployed to this OC4J container yet. There are two buttons on the right of the screen: Deploy EAR file and Deploy WAR file. As mentioned in Chapter 2, if you deploy a WAR file, it will be wrapped into an EAR file by creating empty EJB directories.

Clicking either the Deploy EAR file or Deploy WAR file button will begin a wizard that will prompt you with questions about the application you are about to deploy. On the first page (Figure 15-7), you are prompted for the name of the EAR file, the application name, and if this application is a subapplication of another, existing application. Remember that the application name must match the name of the web module in the EAR file.

click to expand
Figure 15-7: The first page of the Deploy Application Wizard

Next , we are taken to a screen where we can specify the URL mapping for our application. Under most circumstances, the default value generated (the name of the application) will be sufficient for your purposes (Figure 15-8).

click to expand
Figure 15-8: The URL Mapping page of the Deploy Application Wizard

What Is a User Manager and How Do You Specify the Information on This Page?

The next page of the wizard asks you to specify a User Manager (Figure 15-9). The Java Authentication and Authorization Service (JAAS) is a set of APIs that enable services to authenticate and enforce access controls upon users. It augments Java 2 security with support for user-based authentication and access control. It implements a Java technology version of the standard Pluggable Authentication Module (PAM) framework, and it supports user-based authorization, allowing applications to remain independent of the underlying authentication service. OC4J has two different security providers that offer user management services: one based on Oracle s JAAS implementation known as the JAAS Provider or JAZN, the other based on an XML file called principles.xml. The JAAS Provider implements the JAZNUserManager class and can be configured with either an XML repository (JAZN-XML) or an Oracle Internet Directory (JAZN-LDAP). The user manager based on the principles.xml file implements the XMLUserManager class. Another option is to create a custom user manager by implementing the UserManager class.

click to expand
Figure 15-9: The User Manager screen of the Deploy Application wizard

When using the JAAS Provider, two configuration files are used: jazn.xml and jazn-data.xml. The jazn.xml file is the JAAS property file where the provider type is specified (XML or LDAP/OID). The jazn-data.xml file is used only when the XML provider type is specified; it contains JAAS data on users, roles, policy, and LoginModules. Unless you wish to implement a security method outside of what Oracle Application Server 10 g provides for you by default, there is no need to change any of the values on this page.

The final step of the wizard asks you to review your selections. Clicking Deploy will restart the OC4J container, to pick up the new settings, and deploy the application. You can test your application by making sure your OC4J container is running (if not, click the check box to the left of it and click the Start button), opening up another browser window, and pointing your browser to the virtual path you specified in the URL mapping page when deploying the application.



Oracle Application Server 10g Web Development
Oracle Application Server 10g Web Development (Oracle Press)
ISBN: 0072255110
EAN: 2147483647
Year: 2004
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net