Thursday, October 28, 2010

How to Secure and Unsecure the AS Control 10g Console and Agent

I would like to share some methods secure and unsecure Oracle Application server control,,,

Securing Oracle AS control is very easy task...

So lets discuss, How to Secure and Unsecure the AS Control 10g Console and Agent Securing the AS Control Application

To secure the AS Control, follow these steps:

Step 1. Stop the AS Control

$ emctl stop iasconsole

Step 2. Secure the AS Control

$ emctl secure iasconsole

Step 3. Start AS Console again

$ emctl start iasconsole

Unsecuring the AS Control Application

To unsecure the AS Control, follow these steps:

Step 1. Stop the AS Control $ emctl stop iasconsole

Step 2. Update AS Control's standalone OC4J container to support unsecure port in

$ORACLE_HOME/sysman/j2ee/config/emd-web-site.xml

Change the following line:

" display-name="Oracle Enterprise
Manager iAS Console Website" secure="true">

Into:

" display-name="Oracle Enterprise
Manager iAS Console Website" secure="false">

Step 3. In the same file (emd-web-site.xml), you also need to modify the ssl-config
section at the bottom of the file

Change the following line:

keystore-password="%EMD_KEYSTORE_PASSWORD%" />

Into:

keystore-password="%EMD_KEYSTORE_PASSWORD%" />

Step 4. Update AS Control Local Management Agent to support the unsecure HTTP protocol.

The EMD_URL property in $ORACLE_HOME/sysman/config/emd.properties needs to
get switched back to the HTTP (non-secure) protocol.

Change:

EMD_URL=https://:/emd/main

Into:

EMD_URL=http://:/emd/main

Step 5. Update the standAloneConsoleURL property of oracle_ias target.

Edit the file $ORACLE_HOME/sysman/emd/targets.xml to change the
StandaloneConsoleURL property of oracle_ias target to switch back to the
HTTP (non-secure) protocol.

Change the following lines:

" ...> ...
VALUE="https://:/emd/console"/>

Into:

" ...> ...
VALUE="http://:/emd/console"/>

Step 6. Start the AS Control Application: $ emctl start iasconsole



I hope this help you in securing and unsecuring em console...

This activity comes very rarely.. but you can do it on test for R & D as i did :D

Regards,
Ajinkya

Tuesday, October 26, 2010

Configuration and deletion Oracle report server

As i started blogging few days back i have done some activities long back those activities m posting for you..

Now we will disscuss about how to configure report server in oracle Application server 10g.
We already have in-built report server but some client needs seprate report server for their application.
I came accross the same requirement few months back.

Here i am posting configuration and deletion of report server in oracle application server.


REPORT SERVER INSTALLATION for 10g:

Before installation stop all opmnctl services and

Then go through the cmd

E:\orabi\bin>addnewservertarget.bat servername

Servername whatever name you want, according you for example: samba

After that what we have to do update the dcmctl.bat file
Why this is so because this file will update the previous server and permit to add new target.
For this how to do there is cmd

E:\orabi\dcm\bin\dcmctl.bat updateconfig –ct opmn –v –d

It will create new server samba with .conf extension and you can see while open to it
By E:\orabi\report\conf\samba.conf

If you want to create instance synchronously, see next cmd

E:\orabi\dcm\bin\dcmctl.bat resyncinstance -v -d

Start the opmn services: opmn startall

Then check the status

You will see no. of instance what you have been created earlier
How many servers/instance are running on application server.
Afterthat open the samba.conf and do some changes
Put this code in comment like this way

< !--security id="rwSec" class="oracle.reports.server.RWSecurity">
< property name="securityUserid" value="tyKAUY845QnJ4GymcUvVwFjmIX0EZy6JDFeaf4mScBswXC9PiMkf86WKPq+DKuupojsfKr1fOcJwzVgaGFN0e0Smu1YPcHtzVwQjeEDc/+5h0n0qdlljjRPO7J6uLinuxAx8MaKeE3v+LyJlWPBuEgD91BDmzYWt3TjPvtpJfU0LlH/BxFyo18wlVfZNzeMojC3fOr84" confidential="yes" encrypted="yes"/>






Why we do this change:

This one time changes will gives better performance no need to change each and every time. it is related to SSO(Single Sign-On)
Above all cmd are configured the report server.






Following steps are for deleting report server from oracle application server configuration :


Steps for deleting report server:

Step 1: stop opmn
Step 2: stop EM console
Step 3: take a backup of opmn.xml
Step 4: Open opmn.xml.. there must be a entry related to your reports server. carefully delete that whole tag.
Step 5: Then do opmnctl validate opmn.xml to validate your opmn.xml.
Step 6: take a backup of targets.xml.
Step 7: open targets.xml.. There must be a entry for your reports server in that. Delete that whole tag from there.
Step 8: start opmn
Step 9: start EM Console.

How to change Weblogic Admin password ?

As I am working on different Middlewares. Oracle Weblogic Server is one of them.

Once I forgot my Weblogic admin password, i tried some time and then i have got solution for the same.

Thanks for the Oracle Metalink.

Following are the steps to recover an admin user when you have lost an administrator's password.

In my case i have created a userid "Weblogic" with a password "weblogicadmin123"

This post is for both Windows and Unix as well :

Step 1. From UNIX prompt cd to the WebLogic domain directory and run setEnv.cmd/setEnv.sh

Make sure your environment gets set correctly, check that WL_HOME is set. If not trying running setEnv.sh like this:

. ./setEnv.sh (there is a dot "." then a space then ./setEnv.sh)

Create an initialization file for the default authenticator

java weblogic.security.utils.AdminAccount adminuser weblogic .

Don't forget to add the "." it is needed.

This should produce a DefaultAuthenticatorInit.ldift in the domains directory.

Step 2. Delete the DefaultAuthenticatormyrealmInit.initialized from /webserv/DomainName/WebLogicAdmin/ldap

Step 3. Once you delete this file and try to start the admin server it gets recreated using the DefaultAuthenticatorInit.ldift file as a template.

Step 4. Rename the boot.properties file.

Step 5. Edit the setEnv.cmd/setEnv.sh file and change:

WLS_USER­=weblogic

WLS_PW=weblogicadmin123

Step 6. Reboot the admin server.

Step 7. Put the boot.properties file back to it's original name and change so it looks like the one below:

username­=weblogic

password=weblogicadmin1234

Step 8. Restart the admin server and those values will then get encrypted.

Step 9. You can now go into the console and fix the system password if you wish or keep using the adminuser account.

To fix the system password from the console, logon as adminuser and navigate to:

Security / Realms / myrealm / users - Click on system, Next to Password click on Change. Enter the new password and click apply.

Monday, October 25, 2010

configure Jboss and Apache in cluster mode....

I have done some techniqal R & D on Apache and JBoss in clustering mode.

System Requirement :

Operating System :

RHEL 5.4 in cluster mode. both have same configuration.
Jboss Application Server V4
Apache Server

I'll give steps how to implement JBOSS and Apache(cluster mode) in RHEL cluster mode.


--->Install JBoss as follows :

step 1:go to the directory where the JBoss installer zip file (jboss-as-distribution-6.0.0.20100429-M3.zip) is situated
$ mkdir jbossinstallationdir
$ cd jbossinstallationdir
jar -xvf jboss-4.2.2.GA.zip

--->ask system admin to install linux OS completely so that Apache is also installed with it


--->download apache-tomcat connectors for jboss integration with apache


--->install the mod_jk.so as below :

Step 1:
Change to the connector installation directory> cd $CONNECTOR_HOME/jk/native


Step 2:
Run the build command> ./buildconf.sh


Step 3:
Run the configure command to link it to apache> ./configure --with-apxs=/usr/local/apache/bin/apxs


Step 4:
Make the package> make


Step 5:
Install the package> make install

Step 6:
verify if the mod_jk.so has been installed in the Apache modules directory /usr/lib/httpd/modules



--->configure Apache with mod_jk.so


step 1 :Add this line at the very bottom in /etc/httpd/conf :

# Include mod_jk configuration file
Include conf/mod-jk.conf



Step 2: Create the modjk config



Under /etc/httpd/conf, create mod-jk.conf and populate it as follows:


# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so

# Where to find workers.properties
JkWorkersFile conf/workers.properties

# Where to put jk logs
JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel info

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

# JkOptions indicates to send SSK KEY SIZE
# Notes:
# 1) Changed from +ForwardURICompat.
# 2) For mod_rewrite compatibility, use +ForwardURIProxy (default since 1.2.24)
# See http://tomcat.apache.org/security-jk.html
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories

# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"

# Mount your applications
JkMount /__application__/* loadbalancer
# Let Apache serve the images
JkUnMount /__application__/images/* loadbalancer

# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties

# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
# Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452
JkShmFile run/jk.shm

# Add jkstatus for managing runtime data

JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1




Note - mod_jk is ready to forward requests to JBoss instances. We need now to setup the workers



Step 3: Configuring workers



Under /etc/httpd/conf, create workers.properties and populate it as follows:

# Define list of workers that will be used
# for mapping requests
# The configuration directives are valid
# for the mod_jk version 1.2.18 and later
#
worker.list=loadbalancer,status


# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=node1.mydomain.com
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.prepost_timeout=10000 #Not required if using ping_mode=A
worker.node1.connect_timeout=10000 #Not required if using ping_mode=A
worker.node1.ping_mode=A #As of mod_jk 1.2.27
# worker.node1.connection_pool_size=10 (1)

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host= node2.mydomain.com
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.prepost_timeout=10000 #Not required if using ping_mode=A
worker.node2.connect_timeout=10000 #Not required if using ping_mode=A
worker.node2.ping_mode=A #As of mod_jk 1.2.27
# worker.node1.connection_pool_size=10 (1)

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2

# Status worker for managing load balancer
worker.status.type=status



Important Note : Replace vales of worker.node1.host and worker.node2.host with actual server node hostname or ip-addresses.

Step 4 :copy workers.properties.minimal to /etc/httpd/conf

Note - This file contains the workers names

Step 5: Create the URI to worker map file



Create a uriworkermap.properties file in the /etc/httpd/conf directory. This file should contain the URL mappings you want Apache to forward to Tomcat. The format of the file is /url=worker_name. To get things started, paste this example into the file you created:

# Simple worker configuration file
#

# Mount the Servlet context to the ajp13 worker
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/myapp/*=loadbalancer
!/myapp/images/*=loadbalancer
/admin/*=wlb
/manager/*=wlb
/jsp-examples/*=wlb
/servlets-examples/*=wlb
/examples/*=wlb

This will configure mod_jk to forward requests for the /jmx-console, /web-console and /myapp contexts to JBoss Web. The '!' at the beginning of the last line results in the URLs for the images dir in the myapp context not being forwarded. Instead httpd will handle them directly (which means they must be available on the httpd server).



Step 6: Restart Apache



Step 7:

Note : In node1 and node2 , do the following

* In JBoss 5, it's $JBOSS_HOME/server/all/deploy/jbossweb.sar/server.xml


(In the examples above, replace /all/ with the name of the AS configuration you are running.)




Locate the element and add an attribute jvmRoute:


.


The jvmRoute attribute value must match the name specified in workers.properties.



In the server.xml file, make sure that the AJP 1.3 Connector is uncommented, e.g.:




emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" connectionTimeout="600000" maxThreads="200"/>

step 8 :Go to $JBOSS_HOME/server/all/deploy/jboss-web.deployer/META-INF/jboss-service.xml file (replace /all with your own server name). Locate the element with a name of UseJK, and set its value to true:

true

Step 10: Restart JBoss AS.



Step 11: Access the JBoss AS web-console through Apache by browsing to http://localhost/web-console and you should see the JBoss web console page.

configuration Apex with Oracle DB 11g R2......

Today I come across one requirement which is configuration of Oracle Application Express on oracle DB 11g R2.

First we will talk about Oracle Application Express (i.e. Apex):

Oracle Application Express (Oracle APEX) is a rapid web application development tool for the Oracle database. Using only a web browser and limited programming experience, you can develop and deploy professional applications that are both fast and secure. Oracle APEX is a fully supported, no cost option of the Oracle database.

Oracle Application Express Architecture features:

Forms Conversion [3.2] – Enables the loading of Oracle Forms source into an Oracle Application Express project and generate an initial APEX application.

Interactive Reports [3.1] – An innovative new technology that allows end users to customize reports. By putting more power in the hands of users it reduces development time and effort while simultaneously enhancing application functionality.

Web Services Integration [3.1] – Ability to easily integrate with services through either built-in Web service support or through lower level PL/SQL UTL_HTTP package calls.

Optional Runtime-Only Deployment [3.1] – Ability to install just a runtime APEX environment via SQL scripts for production environments, minimizing installed footprint and increasing security.

PDF Printing [3.0] – Integrate with Report Server (Oracle BI Publisher, Apache FOP, or XSL-FO) to produce PDF, XLS, HTML outputs. Can define multiple report queries and load custom RTF or XSL-FO templates.

Flash Charts [3.0] – Create professional charts using Adobe Flash

MS Access Migration [3.0] – Use SQL Developer Migration Workshop to migrate the Access schema and data. Then migrate the Access Forms, Reports and Queries using APEX to generate a first-cut design

Implementation Oracle Application Express(APEX) on Oracle DB 11g R2 on windows :

Step 1:

Go to Following path(i.e, Apex path) :

C:\>cd C:\app\Administrator\product\11.1.0\db_1\apex

Step 2:

Connect Database from following path with Sys user :

C:\app\Administrator\product\11.1.0\db_1\apex>sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 22 11:45:56 2010

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode,log_mode,database_role from v$database;

NAME OPEN_MODE LOG_MODE DATABASE_ROLE

--------- ---------- ------------ ----------------

11gDB READ WRITE NOARCHIVELOG PRIMARY

Step 3 :

Run following Script apxconf.sql and answer questionnaires for the same :

SQL> @apxconf.sql

PORT

----------

8080

Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user.

Default values are in brackets [ ].

Press Enter to accept the default value.

Enter a password for the ADMIN user [] ADMIN

Enter a port for the XDB HTTP listener [ 8080] 8080

...changing HTTP Port

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Session altered.

...changing password for ADMIN

PL/SQL procedure successfully completed.

Commit complete.

SQL> $ HOSTNAME

oracledb

To find workspace name and Apex user run following query :

SQL> SELECT WORKSPACE_NAME FROM APEX_WORKSPACE_APEX_USERS;

WORKSPACE_NAME

--------------------------------------------------------------------------------

INTERNAL

SQL> desc APEX_WORKSPACE_APEX_USERS

Name Null? Type

----------------------------------------- -------- ----------------------------

WORKSPACE_ID NOT NULL NUMBER

WORKSPACE_NAME NOT NULL VARCHAR2(255)

FIRST_SCHEMA_PROVISIONED NOT NULL VARCHAR2(30)

USER_NAME NOT NULL VARCHAR2(100)

EMAIL VARCHAR2(240)

DATE_CREATED NOT NULL DATE

DATE_LAST_UPDATED NOT NULL DATE

AVAILABLE_SCHEMAS NUMBER

IS_ADMIN VARCHAR2(3)

IS_APPLICATION_DEVELOPER VARCHAR2(3)

SQL> select user_name,workspace_name from APEX_WORKSPACE_APEX_USERS;

USER_NAME

--------------------------------------------------------------------------------

WORKSPACE_NAME

--------------------------------------------------------------------------------

ADMIN

INTERNAL

And run following url to get apex CONSOLE:

HTTP://LOCALHOST:8080/apex

and enjoy development with apex..

Introduction Application Server And WebServer....

Web servers are computers on the internet that host websites, serving pages to viewers upon request. This service is referred to as web hosting.

Every web server has a unique address so that other computers connected to the internet know where to find it on the vast network. The IP (Internet Protocol) address looks something like this: 69.93.141.146. This address maps to a more human friendly address, such as CloverInfotech.

For example, apache tomcat , JBoss, HTTP Server, IIS, IBM Http Server etc.

An Application server is a server program in a computer in a distributed network that provides the business logic for an application program. The application server is frequently viewed as part of a three-tier application, consisting of a graphical user interface (GUI) server, an application (business logic) server, and a database and transaction server. More descriptively, it can be viewed as dividing an application into:

  1. A first-tier, front-end, Web browser-based graphical user interface, usually at a personal computer or workstation
  2. A middle-tier business logic application or set of applications, possibly on a local area network or intranet server
  3. A third-tier, back-end, database and transaction server, sometimes on a mainframe or large server

For example, IBM WebSphere Application , oracle application server, oracle weblogic etc.

What is the difference between an application server and a Web server?

Taking a big step back, a Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call. A little more precisely, you can say that:

A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols.

Let's examine each in more detail.

The Web server

A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programs generate a response, most often in HTML, for viewing in a Web browser.

Understand that a Web server's delegation model is fairly simple. When a request comes into the Web server, the Web server simply passes the request to the program best able to handle it. The Web server doesn't provide any functionality beyond simply providing an environment in which the server-side program can execute and pass back the generated responses. The server-side program usually provides for itself such functions as transaction processing, database connectivity, and messaging.

While a Web server may not itself support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering—features oftentimes erroneously assigned as features reserved only for application servers.

The application server

As for the application server, according to our definition, an application server exposes business logic to client applications through various protocols, possibly including HTTP. While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on an object (or a function in the procedural world).

Such application server clients can include GUIs (graphical user interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information is program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic however it wants.

In most cases, the server exposes this business logic through a component API, such as the EJB (Enterprise JavaBean) component model found on J2EE (Java 2 Platform, Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, resource pooling, and messaging. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques.

How do Web and application servers fit into the enterprise?

An example

As an example, consider an online store that provides real-time pricing and availability information. Most likely, the site will provide a form with which you can choose a product. When you submit your query, the site performs a lookup and returns the results embedded within an HTML page. The site may implement this functionality in numerous ways. I'll show you one scenario that doesn't use an application server and another that does. Seeing how these scenarios differ will help you to see the application server's function.

Scenario 1: Web server without an application server

In the first scenario, a Web server alone provides the online store's functionality. The Web server takes your request, then passes it to a server-side program able to handle the request. The server-side program looks up the pricing information from a database or a flat file. Once retrieved, the server-side program uses the information to formulate the HTML response, then the Web server sends it back to your Web browser.

To summarize, a Web server simply processes HTTP requests by responding with HTML pages.

Scenario 2: Web server with an application server

Scenario 2 resembles Scenario 1 in that the Web server still delegates the response generation to a script. However, you can now put the business logic for the pricing lookup onto an application server. With that change, instead of the script knowing how to look up the data and formulate a response, the script can simply call the application server's lookup service. The script can then use the service's result when the script generates its HTML response.

In this scenario, the application server serves the business logic for looking up a product's pricing information. That functionality doesn't say anything about display or how the client must use the information. Instead, the client and application server send data back and forth. When a client calls the application server's lookup service, the service simply looks up the information and returns it to the client.

By separating the pricing logic from the HTML response-generating code, the pricing logic becomes far more reusable between applications. A second client, such as a cash register, could also call the same service as a clerk checks out a customer. In contrast, in Scenario 1 the pricing lookup service is not reusable because the information is embedded within the HTML page. To summarize, in Scenario 2's model, the Web server handles HTTP requests by replying with an HTML page while the application server serves application logic by processing pricing and availability requests.

Oracle Application Server :

Oracle Application Server Components:

Up to this point, we've introduced a lot of features available in different versions of Oracle Application Server without providing much explanation of what they do. The following subsections group the main components of Oracle Application Server into three basic categories—core components, application components, and additional components—and describe briefly what these components do.

Core Components

The components that make up the core of Oracle Application Server are the Oracle HTTP Server, Oracle Application Server Containers for J2EE, and OracleAS Web Cache.

Oracle HTTP Server

The Oracle HTTP Server, which is based on the Apache Web Server, provides the services needed to handle incoming HTTP requests and can serve as a proxy server. Developers can program in languages such as Perl, C, C++, PL/SQL, and Java, and can leverage libraries and frameworks such as BC4J, the XML Developer's Kit, Java Naming and Directory Interface (JNDI), and JDBC. The Oracle HTTP Server supports Server Side Includes for adding content (such as header or footer information) across all of a web site's pages. Servers can be clustered in high-availability configurations, and Oracle HTTP Server also supports load balancing, which can couple high availability with scalability. Security support includes OracleAS Single Sign-On and encryption with the Secure Sockets Layer (SSL).

Oracle Application Server Containers for J2EE

Oracle Application Server Containers for J2EE (OC4J) is a set of J2EE-certified containers executed using any standard Java Virtual Machine (JVM). OC4J provides a JSP translator, a servlet engine, and an EJB container. It also provides other J2EE services to the containers, such as JNDI, JDBC, Java Message Service (JMS), Java Authentication and Authorization Service (JAAS), and Java Transaction API (JTA). OC4J supports clustering, load balancing, and application state replication for web and EJB applications, thus enabling highly available and scalable configurations. OC4J can use Java Object Cache in the OC4J containers.

OracleAS Web Cache

OracleAS Web Cache is a memory cache that speeds the delivery of content to requesters. OracleAS Web Cache can store both static and dynamic pages, as well as parts of pages that are marked with Edge Side Include (ESI) tags. This cache also provides other types of functionality, such as balancing request loads between multiple instances of the Oracle HTTP Server and monitoring the speed at which content is returned to users.

Application Components

The components of Oracle Application Server described in the following subsections provide capabilities that can create and deploy applications.

Web Services

Web Services are extensively supported in Oracle Application Server. The product includes support for the following:

· Java classes (either stateful or stateless) as remote procedure call (RPC) or document-style Web Services

· Stateless EJBs as Web Services

· PL/SQL stored procedures as Web Services

· JMS topics and queues as document-style Web Services

Clients can invoke these either dynamically or statically.

Other standards supported include publishing and query with UDDI and typed and untyped SOAP messages with SOAP header access via an application programming interface (API). A dynamic WSDL tester allows you to create web-based clients and simplify the testing of Web Services during development.

Oracle Application Server TopLink

OracleAS TopLink is an object-relational persistence tool used to store Java objects and EJBs in relational database tables. The visual mapping interface allows developers to define how Java classes are mapped to database schema. Thus, a Java developer using OracleAS TopLink doesn't need to write SQL calls. Using the visual mapping tool, the developer can usually handle database schema changes without needing to recode the Java applications. The mapping tool provides graphical views of relationships, queries, locking, caching, sequencing, and other areas of interest that enable performance tuning.

Oracle JDeveloper

Oracle JDeveloper is a part of Oracle Developer Suite, rather than of Oracle Application Server itself, but it can create the Java applications that are deployed on an Oracle Application Server platform. Oracle JDeveloper was introduced by Oracle in 1998 to enable the development of basic Java applications without the need to write large amounts of code. At the core of Oracle JDeveloper is an advanced application development framework. Oracle JDeveloper provides numerous wizards that create Java and J2EE objects and project types. Some wizards in Oracle JDeveloper include:

· A Data Form wizard

· A Beans wizard for creating Java Beans and BeanInfo classes

· A Deployment wizard providing "one-click" deployment of J2EE applications to OC4J

Database development features include various Oracle drivers, a Connection Editor to hide the complexity of using the JDBC API to establish connections, database components to bind visual controls, and a SQLJ precompiler for embedding SQL in Java code (which you can then use with the Oracle database).

Oracle Application Server comes with a limited-use license for Oracle JDeveloper. The development tool is packaged in the Oracle Developer Suite.

OracleAS Forms Services

Oracle Application Server Forms Services provide data handling, navigation, database access, and database validation for Oracle Forms applications. These services allow Oracle Forms to run in an N-tier web environment.

Forms deployed to Oracle Application Server are developed using the Oracle Forms Developer, an interactive development tool that is part of the Oracle Developer Suite. Oracle Developer allows you to define applications by defining values for properties, rather than by writing procedural code. Oracle Developer supports a variety of clients, including traditional client-server PCs and Java-based clients. The Forms Builder includes a built-in JVM for previewing web applications.

OracleAS Reports Services

Oracle Application Server Reports Services enable the rapid deployment and publishing of web-based reports. Reports can also leverage the Oracle Application Server Single Sign-On capabilities and can be embedded as portlets in OracleAS Portal.

Reports are created using the Oracle Reports Developer, a part of the Oracle Developer Suite. Data can be formatted in tables, matrixes, group reports, graphs, and combinations. You can achieve high-quality presentation using Cascading Style Sheets (CSS), an HTML extension. Using OracleAS Reports Services, XML-based reports can be exchanged via HTTP, and paper-based layouts can be deployed over the Internet using PDF format.

Additional Components

The components described in the following subsections provide extended functionality that is an important part of Oracle Application Server. These components relate to specific areas of IT, such as business intelligence and integration, or provide capabilities that can be used by developers, such as OracleAS Portal or the Oracle Internet Directory.

OracleAS Portal

OracleAS Portal, packaged with Oracle Application Server, provides an HTML-based tool for developing web-enabled application interfaces and content-driven web sites. Portal applications can be developed using wizards in a WYSIWYG portal development environment. Using this environment, you can create and deploy static and dynamic portal content. Users can be granted access to the environment to create their own customization. For example, you can grant an OracleAS Portal user permission to choose which content areas and links appear in his portal pages.

Java or PL/SQL developers may wish to leverage the functionality of OracleAS Portal without having to use the Portal Development environment. For such power developers, Oracle also provides a Java and PL/SQL Portal Development Kit for custom portlet development or application integration.

Portals are deployed as an integrated service in Oracle Application Server and can use directory services, the OracleAS Web Cache, J2EE services, and business intelligence services provided by OracleAS Reports Services and OracleAS Discoverer.


OracleAS Discoverer

OracleAS Discoverer is a business intelligence tool used for ad hoc queries and user-generated reports. OracleAS Discoverer also provides an interface to relational online analytical processing (ROLAP) by leveraging analytic features present in the Oracle database and as of 2004, also provides an interface to the Oracle OLAP Option. Included in Oracle Application Server are:

Discoverer Plus

A Java-based browser client that can be used to generate ad hoc queries, reports, and graphs

Discoverer Viewer

An HTML-based browser client that can execute reports or graphs created in Discoverer Plus or the Desktop version of Discoverer

Discoverer Portlet Provider

A package used for lists of workbooks and worksheets

OracleAS Discoverer can leverage the Oracle Application Server Single Sign-On capabilities and can also export workbooks to Oracle Reports Developer for deployment in OracleAS Reports Services.

OracleAS Discoverer has an End User Layer (EUL) that is metadata-driven, enabling business definitions to hide and map to underlying technical descriptions. The EUL is set up and maintained via Oracle Discoverer Administration Edition, a part of the Oracle Developer Suite. Wizards guide the administrator through the process of building the EUL. In addition to managing the EUL, administrators can put limits on resources available to analysts monitored by the OracleAS Discoverer query governor.

Oracle Internet Directory

The Oracle Internet Directory provides users a means of connecting to an Oracle server without requiring a client-side configuration file. The Oracle Internet Directory is a Lightweight Directory Access Protocol (LDAP) directory that supports the Single Sign-On capability of Oracle Application Server.

Oracle Workflow provides a graphical workflow builder that facilitates the modeling of business processes. A rules-based engine and business event system is stored in an Oracle database. Messages can be transmitted via Advanced Queuing (AQ), Oracle Net, HTTP, or HTTP using SSL (HTTPS). Oracle Workflow provides key capabilities needed to deploy Oracle Application Server InterConnect, described in the next section.

Oracle Application Server InterConnect

Oracle Application Server InterConnect provides a heterogeneous application integration platform through logic and services. Deployed in a "hub-and-spoke" manner, Oracle Application Server leverages Oracle Workflow and Oracle AQ to provide a message broker infrastructure. AQ enables asynchronous messages between Oracle databases with adapters available to extend support to other message types and applications. Content-based publish-and-subscribe solutions can be deployed using a rules engine to determine relevant subscribing applications. As new content is published to a subscriber list, the rules on the list determine which subscribers should receive the content, thus efficiently serving the needs of different subscriber communities.

OracleAS InterConnect includes a design-time Integrated Development Environment (IDE), adapters, a metadata repository, a management infrastructure (used with Oracle Enterprise Manager), and SDKs (for writing custom adapters, transformations, and IDE extensions). Adapters are available for HTTP, HTTPS, AQ, Oracle database, FTP, MQSeries, CICS, SAP, PeopleSoft, Siebel, JDEdwards, and CICS.

Oracle Application Server ProcessConnect

Oracle Application Server ProcessConnect is new to Oracle Application Server 10g. Using wizards to create a hub-and-spoke deployment model, it's designed to make business process integration feasible. OracleAS ProcessConnect includes a modeling tool, a metadata repository, and adapters. These adapters are based on the JCA specification and enable connections to technology (such as Web Services), packaged applications (e.g., JD Edwards, PeopleSoft, SAP, and Siebel), and legacy systems.

Oracle Weblogic Server :

Oracle WebLogic Server Application Components :

Oracle WebLogic Server applications can include the following components:

  • Web components-HTML pages, servlets, JavaServer Pages, and related files
  • EJB components-entity beans, session beans, and message-driven beans
  • WebLogic components-startup and shutdown classes

Web designers, application developers, and application assemblers create components by using J2EE technologies such as JavaServer Pages, servlets, and Enterprise JavaBeans.

Components are packaged in Java ARchive (JAR) files-archives created with the Java jar utility. JAR files bundle all component files in a directory into a single file, maintaining the directory structure. JAR files include XML descriptors that instruct WebLogic Server how to deploy the components.

Web Applications are packaged in a JAR file with a .war extension. Enterprise beans, WebLogic components, and client applications are packaged in JAR files with .jar extensions.

An Enterprise Application, consisting of assembled components, is a JAR file with an .ear extension. An .ear file contains all of the .jar and .war component archive files for an application and an XML descriptor that describes the bundled components.

To deploy a component or an application, you use the Administration Console or the weblogic.deploy command-line utility to upload JAR files to the target WebLogic Servers.

Client applications (when the client is not a Web browser) are Java classes that connect to WebLogic Server using Remote Method Invocation (RMI). A Java client can access Enterprise JavaBeans, JDBC connections, JMS messaging, and other services by using RMI.

Web Application Components

A Web archive contains all of the files that make up a Web application. A .war file is deployed as a unit on one or more WebLogic Servers. A Web archive can include the following:

  • Servlets, JSP pages, and their helper classes.
  • HTML/XML pages with supporting files such as images and multimedia files.
  • A web.xml deployment descriptor, a J2EE standard XML document that describes the contents of a .war file.
  • A weblogic.xml deployment descriptor, an XML document containing WebLogic Server-specific elements for Web applications.

Servlets

Servlets are Java classes that execute in WebLogic Server, accept a request from a client, process it, and optionally return a response to the client. A GenericServlet is protocol independent and can be used in J2EE applications to implement services accessed from other Java classes. An HttpServlet extends GenericServlet with support for the HTTP protocol. An HttpServlet is most often used to generate dynamic Web pages in response to Web browser requests.

JavaServer Pages

JSP pages are Web pages coded with an extended HTML that makes it possible to embed Java code in a Web page. JSP pages can call custom Java classes, called taglibs, using HTML-like tags. The WebLogic JSP compiler, weblogic.jspc, translates JSP pages into servlets. WebLogic Server automatically compiles JSP pages if the servlet class file is not present or is older than the JSP source file.

You can also precompile JSP pages and package the servlet class in the Web Archive to avoid compiling in the server. Servlets and JSP pages may depend upon additional helper classes that must also be deployed with the Web application.

Web Application Directory Structure

Web application components are assembled in a directory in order to stage the .war file for the jar command. HTML pages, JSP pages, and the non-Java class files they reference are accessed beginning in the top level of the staging directory.

The XML descriptors, compiled Java classes and JSP taglibs are stored in a WEB-INF subdirectory at the top level of the staging directory. Java classes include servlets, helper classes and, if desired, precompiled JSP pages.

The entire directory, once staged, is bundled into a .war file using the jar command. The .war file can be deployed alone or packaged in an Enterprise Archive (.ear file) with other application components, including other Web Applications, EJB components, and WebLogic components.

Enterprise JavaBean Components

Enterprise JavaBeans (EJBs) beans are server-side Java components written according to the EJB specification. There are three types of enterprise beans: session beans, entity beans, and message-driven beans.

EJB Overview

Session beans represent a single client within WebLogic Server. They can be stateful or stateless, but are not persistent; when a client finishes with a session bean, the bean goes away.

Entity beans represent business objects in a data store, usually a relational database system. Persistence-loading and saving data-can be bean-managed or container-managed. More than just an in-memory representation of a data object, entity beans have methods that model the behaviors of the business objects they represent. Entity beans can be shared by multiple clients and they are persistent by definition.

A message-driven bean is an enterprise bean that runs in the EJB container and handles asynchronous messages from a JMS Queue. When a message is received on the JMS Queue, the message-driven bean assigns an instance of itself from a pool to process the message. Message-driven beans are not associated with any client. They simply handle messages as they arrive. A JMS ServerSessionPool provides a similar capability, but without the advantages of running in the EJB container.

Enterprise beans are bundled into a JAR file that contains their compiled classes and XML deployment descriptors.

EJB Interfaces

Entity beans and session beans have remote interfaces, home interfaces, and implementation classes provided by the bean developer. (Message-driven beans do not require home or remote interfaces, because they are not accessible outside of the EJB container.)

The remote interface defines the methods a client can call on an entity bean or session bean. The implementation class is the server-side implementation of the remote interface. The home interface provides methods for creating, destroying, and finding enterprise beans. The client accesses instances of an enterprise bean through the bean's home interface.

EJB home and remote interfaces and implementation classes are portable to any EJB container that implements the EJB specification. An EJB developer can supply a JAR file containing just the compiled EJB interfaces and classes and a deployment descriptor.

EJBs and WebLogic Server

J2EE cleanly separates the development and deployment roles to ensure that components are portable between EJB servers that support the EJB specification. Deploying an enterprise bean in WebLogic Server requires running the WebLogic EJB compiler, weblogic.ejbc, to generate the stub and skeleton classes that allow an enterprise bean to be executed remotely.

WebLogic stubs and skeletons can also contain support for WebLogic clusters, which enable load-balancing and failover for enterprise beans. You can run weblogic.ejbc to generate the stub and skeleton classes and add them to the EJB JAR file, or WebLogic Server can create them by running the compiler at deployment time.

The J2EE-specified deployment descriptor, ejb-jar.xml, describes the enterprise beans packaged in an EJB JAR file. It defines the beans' types, names, and the names of their home and remote interfaces and implementation classes. The ejb-jar.xml deployment descriptor defines security roles for the beans, and transactional behaviors for the beans' methods.

Additional deployment descriptors provide WebLogic-specific deployment information. A weblogic-cmp-rdbms-jar.xml deployment descriptor for container-managed entity beans maps a bean to tables in a database. The weblogic-ejb-jar.xml deployment descriptor supplies additional information specific to the WebLogic Server environment, such as clustering and cache configuration.

WebLogic Components

The WebLogic Server components are startup and shutdown classes, Java classes that execute when deployed or at shutdown time, respectively.

Startup classes can be RMI classes that register themselves in the WebLogic Server naming tree or any other Java class that can be executed in WebLogic Server. Startup classes can be used to implement new services in WebLogic Server. You could create a startup class that provides access to a legacy application or a real-time feed, for example.

Shutdown classes execute when WebLogic Server shuts down and are usually used to free resources obtained by startup classes.

Startup and shutdown classes can be configured in WebLogic Server from the Administration Console. The Java class must be in the server's classpath.

Enterprise Applications

An Enterprise Archive (.ear) file contains the Web archives and EJB archives that constitute a J2EE application. The META-INF/application.xml deployment descriptor contains an entry for each Web and EJB module, and additional entries to describe security roles and application resources such as databases.

You use the Administration Console or the weblogic.deploy command line utility to deploy an .ear file on one or more WebLogic Servers in the domain managed by the Administration Server.

Client Applications

Client-side applications written in Java have access to WebLogic Server services via RMI. Client applications range from simple command line utilities that use standard I/O to highly interactive GUI applications built using the Java Swing/AWT classes.

Client applications use WebLogic Server components indirectly, using HTTP requests or RMI requests. The components actually execute in WebLogic Server, not in the client.

To execute a WebLogic Server Java client, the client computer needs the weblogic_sp.jar file, the weblogic.jar file, the remote interfaces for any RMI classes and enterprise beans on WebLogic Server, and the client application classes.

The application developer packages client-side applications so they can be deployed on client computers. To simplify maintenance and deployment, it is a good idea to package a client-side application in a JAR file that can be added to the client's classpath along with the weblogic.jar and weblogic_sp.jar files.

WebLogic Server also supports J2EE client applications, packaged in a JAR file with a standard XML deployment descriptor. The weblogic.ClientDeployer command line utility is executed on the client computer to run a client application packaged to this specification.