Docstoc

Oracle Application Server

Document Sample
Oracle Application Server Powered By Docstoc
					5. Oracle Application Server

5.1   Oracle9iAS

Oracle 9i Application Server (AS) consists of many different products integrated
onto one platform. The Integrated Framework installation of Oracle 9i AS
combines Oracle Reports Server for deploying predefined reports, Oracle
Discoverer Plus for creating and running Ad Hoc Queries, Oracle Forms, HTTP
Web Services for deployment of all applications over the web and OC4J for
deploying J2EE compliant applications both in Servlet and EJB form. Each
service is made available for use by other applications in the Framework. For
example: an Oracle Report could be accessed from a servlet running on a
WebSphere Application Server. These services are described in more detail in
the Additional Framework Components and Services section of this guide.

5.1.1 Oracle AS Services

The following section describes the services made available by the product suite
known as the Oracle Application Server. The first two services comprise what are
typically thought of as an Application Server where the Oracle HTTP Server is
the Web Server and the OC4J is the J2EE container. The rest of the services are
data access tools that can be utilized to aid in development of applications.

5.1.1.1      Oracle HTTP Server

Powered by Apache, Oracle HTTP Server fully supports the Apache modular
architecture and supports Apache "mods" Secure Sockets Layer (SSL), Single
Sign-on, PL/SQL, Perl, and CGI.

5.1.1.2      OC4J

Oracle Containers for Java is a J2EE Certified Platform.Oracle9i Application
Server supports J2EE 1.3 APIs, Web Services and XML. Oracle9iAS Containers
for J2EE includes complete support for Enterprise Java Beans (EJB) 2.0;
Servlets 2.3; JavaServer Pages (JSP) 1.2; JCA 1.0; and JAAS 1.0. Oracle9iAS
Containers for J2EE also supports JSP Tag libraries, WAR and EAR file-based
deployment.

For more detail on the versions supported by OC4J select the following URL.

http://technet.oracle.com/tech/java/oc4j/htdocs/oc4j-fov-902.html

5.1.1.3 Reports Server
The Reports Server enables browser based reporting by allowing reports stored
on the server to be called using a URL. The Reports Server receives a request
for a particular report. Attached to the URL is a Text tag that tells the server what
type of report to produce, HTML, PDF or XML. Then the Reports Server creates
a file in the correctly encoded format and returns it to the application requesting
the URL.

http://otn.oracle.com/docs/products/reports/pdf/A73172_01.pdf

(See chapter 4 for deployment information)

5.1.1.3       Discoverer

Discover creates, modifies, and executes ad-hoc business intelligence reports to
perform sophisticated analysis using any standard Web browser.

In order to use Oracle Discoverer the 4.1.37 version of Discoverer Administrator
must be used to create End User Layers.

Oracle Discoverer Administration Edition is used to create End User Layers
(EULs) and design Business Areas that are pre-requisites to running Discoverer
Plus and Discoverer Viewer. Discoverer Administration Edition is shipped as a
component of Oracle9i Developer Suite. The required version of Oracle9i
Developer Suite is 1.0.2.4.

5.1.1.4       Forms Server

The Forms Server is an environment for deploying Oracle Forms Developer
applications to the Internet.

http://otn.oracle.com/doc.pdf/forms/A73071_01.pdf

5.1.2 Architectural Considerations

5.1.2.1       Load Balancing

Load Balancing in the IF framework for the Oracle Application servers is handled
in two ways. The first is HTTP server balancing and the second is the load
balancing of the separate services available within Oracle Application Server.
The HTTP servers are load balanced by the WebSeal machines. The Oracle
services are load balanced through load balancing processes that run on the
Oracle 9i Application Servers. With this come two different methodologies for
adding new servers and services to the Framework. To add a new Application
server to the system the new server’s information would have to be added to the
current junction running on the WebSeal box. To add a new Oracle service
server the Oracle service server would have to be configured to point at the
existing load balanced servers and fit into the existing cluster-island
configuration. A cluster-island is a group of Oracle service servers that share all
state information between them. In summary, the Framework provides HTTP
level load balancing and Oracle provides service level load balancing within the
application server or server cluster.

5.1.2.2       Scaling

The Oracle scaling services only allow for scaling between other homogeneous
Oracle Machines. (Currently state information cannot be shared between
different application servers on the Integration Framework.) However, Oracle
scaling does provide flexibility. Each web service within the Application Server
can be placed on its own machine, or scaled per application on a single machine.
Oracle supports both Horizontal and Vertical Scaling.

5.1.2.2.1     Vertical

Vertical scaling is allowed within Oracle Servers. Oracle services can only
access the power of 1 processor per process. Therefore Oracle allows multiple
instances of the same service to be run on a machine. Allowing services to fully
harness the processing power of a machine. Setting up multiple instances of a
service on a single machine has failover benefits as well.
5.1.2.2.2    Horizontal

Horizontal scaling is allowed between Oracle Servers in the framework. Each
component of Oracle can be installed on a separate machine. Allowing the
complete processing power of a machine to be used for a single Oracle Service.
This can be advantageous when it is known that a certain portion of the Oracle
Server will be used more than any other. This service could be moved to its own
server to improve performance. This also has failover benefits. If a cloned server
(a server that is identical to another server in the framework) fails, then the
requests to this server can be routed to one of its
clones.




5.1.2.3      Failover

In the IF 4.x configuration there are two Application Servers running one HTTP
server, two OC4J servers, one Load Balancer and one each of Oracle Reports,
Discoverer and Forms per server. Fail over of the Oracle HTTP Server is handled
by the WebSeal box in the IF 4.x configuration. If an Oracle HTTP server fails all
requests will be routed to the functioning HTTP Server. Fail over for the OC4J
Server is handled by the Application Servers themselves. Each application server
is running a load balancing process that monitors all of the OC4J servers running
on the system. Each OC4J server shares the information it contains with each
OC4J server in the system. That way if any OC4J server fails all of the other
OC4J servers still running know the session state of that server. This way
session state is not lost through the failure of a single OC4J server.

5.1.3 Application Development/Deployment Tools

5.1.3.1       Jdeveloper

Jdeveloper is a development environment that supports the entire development
cycle from design to deployment. This tool includes a Java IDE, a debugger,
performance tuning, application modeling, data modeling, configuration
management, web development and a J2EE framework for testing applications
before deployment.

5.1.3.2       Ant

Ant is an open-source, Java based, deployment tool, created by the Apache
Jakarta group, used for generating EAR, JAR and WAR files.

AR, JAR and WAR files are created for deploying applications to Oracle 9i AS.
These files are discussed above.

5.1.3.3       WSAD

For information on WebSphere Studio Application Developer (WSAD) product
see the WebSphere Application Server section of this guide. Applications can be
exported from WSAD in EAR format and deployed onto Oracle9iAS.

Note: Oracle Application Server only allows the deployment of EAR files and
Class files.

                                         Note

       When building an application in WSAD if IBM specific classes are used
       these classes need to be transferred along with the EAR file to the Oracle
       AS. Use of proprietary classes is not recommended when building
       applications for deployment on the Framework. All J2EE compliant
       classes as well as the application will run on either J2EE compliant server
       as long as it is developed for the correct version of the jdk

5.1.4 Application Deployment for Oracle Containers for Java (OC4J)

5.1.4.1       Directory Structure
                                    Oracle musts:

    Applications must be deployed in the following directories for Oracle 9i
    AS OC4J:

    For Servlets:

    /export/home/oracle/9ias/j2ee/home/default-web-app

    For Web applications including EJBs:

    /export/home/oracle/9ias/j2ee/home/applications

5.1.4.2    Deploying the Enterprise JavaBeans (EJB) to Oracle9iAS in
the J2EE Standard Way

There are five steps involved in deploying EJBs to Oracle9iAS:

Deployment Files: Oracle9iAS uses purely XML files to specify the deployment
properties/options. All the XML files extracted in the
/export/home/oracle/9ias/j2ee/home/applications/EjbTransaction/src/java/EjbTran
saction\ directory needed for the creation of the Application JAR and EAR files,
and for the deployment of the application on Oracle9iAS will have to be placed in
the /export/home/oracle/9ias/j2ee/home/applications/EjbTransaction/etc/
directory. This includes the ejb-jar.xml and application.xml files. However, the
build.xml file needs to be copied to the
/export/home/oracle/9ias/j2ee/home/applications/EjbTransaction/ directory. In the
build.xml, change the value of the property oc4j.dir to suit your directory
structure.
Set the Data source appropriately by creating an entry in the data-sources.xml
file in the /export/home/oracle/9ias/j2ee/home/config directory. Change the host
of the database, SID and the port as per your requirements.
Make sure that the libraries ejb.jar, jndi.jar, jta.jar, oc4j.jar and ant.jar are present
in the CLASSPATH system variable. These files reside in OC4J_HOME directory
and <Ant_Home>\lib directory respectively. Also make sure that
\usr\j2se\java\lib\tools.jar is in your CLASSPATH.
To create the .EAR file, we will use a tool called ANT. The ANT tool compiles all
the java sources files and creates the .jar, .war, and finally the .ear files. It does
so by taking input from a file called build.xml that contains all the relevant
information. Take a look at the build.xml file, located in the
/export/home/oracle/9ias/j2ee/home/applications/<your_application>/ directory,
and change any settings if necessary. The setting oc4j.dir, for instance, must
point to the directory where you installed /export/home/oracle/9ias/j2ee/home.
From the /export/home/oracle/9ias/j2ee/home /applications/<your_application>/
directory, run the command ant. The ant output will indicate the success of the
   operation. Ensure all the required jar files like classes12.jar and ejb.jar are in the
   CLASSPATH for successful build. The ANT tool will use the information
   provided in the build.xml file and create directories in which it will placed the
   generated JAR, EAR, and various library files. As a check, take a look at all the
   subdirectories of the main EjbTransaction directory and see if you can identify all
   the relevant files.
   Install the Application: To actually install the application, add a line to the
   server.xml file in the /export/home/oracle/9ias/j2ee/home/config directory. Add
   the line:

   <application name="EjbTransaction" path="/export/home/oracle/9ias/j2ee/home
   /applications/<your_application>/build/<your_application>.ear" />

   inside the tags: <application-server></application-server>. Replace the option
   <your_application> with your directory settings.

5.1.4.3   Deploying EAR files

To deploy EAR files on Oracle follow these steps. This is the recommended way to
deploy an Application on the Framework’s installation of Oracle Application Server.

   FTP the EAR file to the Oracle Application Server /tmp directory
   Logon to the Oracle Application Server as oraias
   Move to the /tmp directory

   $ cd /tmp

   Deploy the application to each instance of OC4J running on the server

   $ /usr/j2se/bin/java –jar /export/home/oracle/j2ee/home/admin.jar

   ormi://localhost:{rmi port} admin <password> -deploy –file

   {filename.ear} –deploymentName {AppName}

   $ /usr/j2se/bin/java –jar /export/home/oracle/j2ee/home/admin.jar
   ormi://localhost:{rmi port} admin <password> -bindWebApp {AppName}
   {AppName} http-web-site /{AppName}
                                           Note

The {AppName} can be found in the web.xml file.

The {rmi port} can be found in the rmi.xml file in the J2EE_HOME/configdirectory.




5.1.4.4       Load Balancing Deployment

OC4J can have multiple instantiations on a single server or can be spread over
multiple servers. When deploying an application the file must be deployed to
each OC4J instance. In the framework the second instance of OC4J deployed on
the same machine will be in the following directory structure.

/export/home/oracle/9ias/j2ee/home3000x/

Where x is replaced by the number of the server you are currently on i.e. server 1
of 4 (home30001) server 2 of 4 (home30002) and so on.

                                          Note

3000x is the standard id chosen for the framework. It also matches the id given to this
instance of OC4J in the cluster. Each OC4J in a particular server cluster must have a
unique id.

5.1.5 Architectural Restrictions

5.1.5.1       Deploying Applications

Applications must be deployed as EAR files or Class files on Oracle Application
Server. WebSphere Application Server allows the deployment of EAR files, WAR
files and individual Class files. Oracle only allows the deployment of EAR files
and individual Class files only.

5.1.5.2       Discoverer Plus VisiBroker Gatekeeper Port

Discoverer Plus uses a Java Applet and CORBA to communicate to the
database. The Discoverer Plus Java Applet communicates directly with the
VisiBroker Gatekeeper. The Gatekeeper listens on port 7789. It is necessary to
keep this port open.
5.1.5.3      Discoverer Plus Client-side installation

When running the Discoverer Plus applet the user needs to install Jinitiator on
Windows machines, download and install Jinitiator following the instructions
given when running Discoverer Plus. Then download and install the following
files in the directories listed.

                             File             Installation Directory

              Vbj30ssl.dll                  C:\WINNT

              Vbrnissl.dll                  C:\WINNT

              X509cert.jar                  Jinitiator \lib directory




                               Application Design Note

            Currently Netscape Browser running on Solaris does not
            support the running of the Discoverer Plus Applet.

5.1.6 Oracle Application Server Reference Documents

5.1.6.1      Documentation Web Site

Oracle 9i AS 1.0.2.2.2:
http://technet.oracle.com/docs/products/ias/doc_library/10222sol_doc_otn/index.
htm

Oracle 9i AS Best Practices:
http://technet.oracle.com/docs/products/ias/doc_library/1022doc_otn/index.htm

Oracle Technical Information: http://otn.oracle.com/products/ias/techlisting.html

5.1.6.2      Support Web Sites

Oracle: http://www.oracle.com/

Oracle Technet: http://technet.oracle.com/products/ias/content.html

Metalink: http://metalink.oracle.com/

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:17
posted:11/11/2011
language:English
pages:9