Wednesday, 29 February 2012

Application Server


Intoduction

Oracle's Internet Application Server iAS is a standards based J2EE application server that can be used to deploy applications. It is commonly used to deploy Java applications, but can also be used to deploy PL/SQL applications (mod_plsql), Oracle FormsReports and Discoverer workbooks.
iAS components can be divided into Infrastructure and middle tiers components:


Editions

iAS is made available in several editions:
  • Enterprise Edition
  • Standard Edition
  • Standard Edition One
  • Java Edition

Infrastructure Components

Infrastructure components provide back-end services for the middle tiers components.

Metadata Repository

Set of supporting schemas installed into an Oracle database.


Oracle Internet Directory (OID)

OID is a standard LDAP server used for storing identity and configuration settings.

Management Server

Server providing the management web-site from where components can be monitored, stopped and started.

Single Sign-on (SSO)

SSO provides the ability for a user to authenticate once, combined with strong authentication occurring transparently in subsequent connections to other databases or applications. Single sign-on lets a user access multiple accounts and applications with a single password, entered during a single connection. Single password, single authentication.

Delegated Administration Services (DAS)

A set of pre-defined services for performing directory operations on behalf of a user. Oracle Internet Directory Self-Service Console makes it easier to develop and deploy administration solutions for both Oracle and third-party applications that use the Oracle Internet Directory.

Middle Tier Components

OC4J and Webcache

Oracle Containers for J2EE (OC4J) is a J2EE runtime engine in which developers can deploy Java based applications.
Webcache is a HTTP page caching engine - used to reduce load on the database and OC4J engines.

Portal and Wireless

Framework that provides a personalized, single point of interaction with Web-based applications and information relevant to individual users or class of users. Portals built using Oracle Portal are made up of pages managed within page groups, containing portlets and items.

Business Intelligence and Forms

Business Intelligence and Forms provides the runtime platform required for deploying Forms, Reports and Discoverer workbooks. The following components are installed:


*****************************************************************************************************************************

Application Server Guard:

Oracle Application Server (OAS) Guard is a technology that keeps the OAS configuration data synchronized between production and standby sites. Planned outages of the production site can be performed without interruption of service by switching over to the standby site. Unplanned outages are managed by failing over to the standby site using an OAS Guard fail-over operation.

Licensing

Full OAS Enterprise Edition licenses are required for both the active and standby application servers systems.

Implementation

The AS Guard binaries are installed in directory "DSA" (Distributed Server Architecture) under the ORACLE_HOME directory.

Infrastructure

Oracle Data Guard is used to protect the Infrastructure databases.
You don't have to configure Data Guard for Infrastructure databases that was installed as part of the Application Server installation as AS Guard will do it for you. However, if you've created your Infrastructure databases with REPCA, you need to setup Data Guard on your own.

Identity Management & Middle Tier

AS Guard will automatically backup and restore configuration files with the Application Server Backup/Recovery tool.


Start/ Stop

To start the server component (on all primary and secondary servers):
opmnctl startproc ias-component=DSA
To start the client utility, execute ASGCTL in ORACLE_HOME/dsa/bin:
 $ asgctl.sh
Application Server Guard: Release 10.1.2.0.2
(c) Copyright 2004, 2005 Oracle Corporation. All rights reserved.

ASGCTL> HELP


AS Guard Operations

  • Discover topology
ASGCTL> connect asg infra ias_admin/infra123
Successfully connected to infraha:7890
ASGCTL> discover topology oidpasswd=infra123
ASGCTL> verify topology ...
  • Instantiate - initial setup
AS Guard will even put the infrastructure DB into arclog mode, copy it to the secondary and establish the data guard standby.
  • Sync - Force a sync (by default this will happen automatically)
  • Switchover - graceful role reversal between Primary and Secondary
  • Failover - fail-over from primary to secondary site

***************************************************************************************************************************

SOA Suite

Oracle SOA Suite is a J2EE-based component of the Fusion Middleware platform and is available as an option for the Oracle Application Server.
SOA Suite provides a complete set of service infrastructure components that allows developers with tools for building, deploying, and managing SOAs. Oracle SOA Suite enables services to be created, managed, and orchestrated into composite applications and business processes. With SOA Suite's hot-pluggable components, organizations can easily extend and evolve their architectures instead of replacing existing investments.
The primary components of SOA Suite is BPEL and Oracle Web Services Manager.

Web Services Manager

Oracle Web Services Manager (WSM) is a solution for securing and managing service-oriented architectures (SOA) by allowing enterprises to control and visualize their SOA deployments.
WSM allows IT managers to centrally define policies that govern web services operations such as access control (authentication, authorization), logging, and content validation, and then attach these policies to one or multiple web services, with no modification to existing web services required. In addition, Oracle WSM collects runtime data to monitor access control, message integrity, message confidentiality, quality of service (defined in service-level agreements) and displays that information in graphical charts.

Contents

 [hide]


History

Oracle WSM was formerly called Oblix COREsv. Oblix was acquired by Oracle in March 2005.


Licensing

Oracle WSM ships both as a standalone product running on Oracle Application Server and as part of the Oracle SOA Suite.
This is changed in 11g. WSM not shipped as standalone product since October 2009. In 11g WSM is bundled as part of Weblogic Server, and WSM gateway component is not available.


Key features

  • Centralized gateway for all web service requests
  • Policy Manager
  • Policy Enforcement
  • Monitoring Dashboard


Network traffic

Inbound traffic: WSM gateways support the reception of both SOAP messages and standard XML message requests over HTTPSJMS and MQ. HTTPS is enabled by default and cannot be disabled.
Outbound traffic: When configuring the outgoing transport protocol (protocol on which the Web service is invoked) you need specify one of the following protocols: HTTP, HTTPS, JMS, MQ, or even a custom protocol.
Load balancing: Inbound traffic can be load balanced to more than one WSM gateway. This provides fail-over support and greater scalability.

********************************************************************************************************************

Having Confusion around Fusion!!!

Question: What will be my role as Oracle Fusion Developer?

Answer: As a Fusion Developer role you would be playing a very important role in the next generation Applications that customers will be embarking on. It's a paradigm shift from current approach to a process centric approach. Typically in a Fusion project there will be necessity to extend or integrate the functionality with a process centric approach with existing applications (Oracle, Siebel, PeopleSoft , or otherwise) via J2EE/ADF and Oracle SOA—or building new components on the Oracle Fusion Middleware stack. As a Fusion Developer you would building those components on Fusion Stack and Deploy them in Fusion Middleware.

Question: Please let me know the difference between Fusion Architecture, Fusion Middleware and Fusion Applications.

Answer: Fusion Middleware - Middleware infrastructure services that can be used to build and deploy applications.
Fusion Applications - Oracle's next generation applications suite, built on top of Fusion Middleware using Fusion Architecture as blueprint



Fusion Architecture is a reference architecture or blueprint for building applications. It can be referred to as the Enterprise Architecture Platform of Oracle.

Fusion Middleware / 10g Application Server Overview


Industry has started talking about Fusion Middleware & Oracle recently certified 10g Application Server (Portal 10.1.4) with Oracle E-Business Suite so I am discussing overview of Application Server part of Fusion Middleware Family.
Overview of 10g Application Server
10g Application Server Consist of Infrastructure Tier & Middle Tier
What is Infrastructure Tier ?
Infrastructure Tier provides Infrastructure Services to 10g Application Server & consist of following technical components
Database -> To Store User/Applications Identity Data (Portal,Wireless,OID data)
OID -> Oracle Internet Directory, to store User Credentials, Schema passwords, Application details & lot more …
HTTP Server -> This Web Server (OHS, Oracle HTTP Server) on Infra Tier is used to access SSO (Single Sign-On Server) & OIDDAS (OID Delegated Administrative Services)
OC4J -> Oracle Container for J2EE (OC4J_Security for SSO), You have additional OC4J_OCA if you have OCA (Oracle Certifying Autority). OCA is Optional component in Infrastructure Tier
What is Middle Tier ?
Middle Tier is tier where application Server & applications logic resides. It consist of following Technical Components
HTTP Server -> This OHS (Oracle HTTP Server) is separate from above OHS & this is OHS from where users access application Server like portal, wireless, j2ee
OC4J -> These are container which provide place holder for j2ee or web applications . Applications are deployed on OC4J’s. 10g AS comes with default OC4J name “home“, you create more OC4J depending on your requirement
Web Cache -> Web Cache acts as cache for fast response to web server.
Logical Services for Infrastructure Tier
Above was technical components of Infrastructure Tier , Logically Infrastructure Tier consist of Two main categories which are
Identity Management 

Metadata Repository
What is Metadata Repository ?
MR is similar to Database Metadata & MR you can further classify as
Metadata repository for Products (Like Portal, Wireless, BI) This MR usually is user data. Lets assume I created some pages, documents in Portal or User entered some data in any application , such data when stored in database is called as Product MR
MR for OID - Oracle Internet Directory contain some data & data related to this , one can classify as MR for IM (as OID is part of Identity Management - discussed later)
MR for SSO - Oracle Single Sign-On data & schema definitions , one can classify as MR for IM (as SSO is part of IM)
So broadly there are three kind of MR (that’s how I classify MR)
What is Identity Management ?
Logical Grouping of Services which help in Managing Identity is called as Identity Management.
Identity management Consist of following Services like (Discussed later in Detail)
OID Oracle Internet Directory
DAS Delegated Administrative Services
DIP Directory Integration & Provisioning Services
SSO Single Sign-On Service
OCA Oracle Certifying Authority



Thursday, 2 February 2012

Configuring Email notification in Oracle SOA 11g


Sending email notification in Oracle SOA Suite 11g using gmail 


In this post, we are going to see how to send emails in Oracle SOA Suite 11g. Instead of using a local email server, we are going to use Gmail for this purpose. If you do not have a Gmail account, now is the time to create one as you are going to need it very soon.


  I am using Oracle SOA suite 11.1.1.5.If you are using a slightly older version, don't worry because the steps are going to be same.So let us get started straight away.Start the weblogic server and the SOA server.Next login to the Enterprise Manger Console.For me, it is available at:

 http://localhost:7001/em

Next, expand the "User Messaging Service" node in the left pane.Next right click on the "usermessagindriver-emai(soa_server1)" node and select the "Email Driver Properties" option from the context menu.






The email driver properties page should open up.We will be setting the following values in this page:-



  • OutgoingMailServer
  • OutGoingMailServerPort
  • OutGoingMailServerSecurity
  • OutGoingUsername
  • OutGoingPassword
We are going to use Gmail for sending mails.So, enter "smtp.gmail.com" as the value for "OutgoingMailServer".

Enter the value "465" for the "OutGoingMailServerPort" property.

Select the "SSL" option from the drop down for the property "OutGoingMailServerSecurity".

Enter the account username for the property "OutGoingUserName".

For the property "OutGoingPassword", select the "Use Cleartext Password" option from the "Type of Password" drop down and enter the password for the account.



Hit the "Apply" button on the top right corner of the page to apply the changes.A message will be displayed at the top of the page saying that the values has been updated successfully.



If you want to use any other popular mail provider, you can get the details from the following link:-


In this case, enter the values according to the vendor you choose.Next, restart the SOA server.

Our next step is to obtain and install the security certificates for Gmail into our JRE.For this, we are going to use "OpenSSL" to obtain the certificate.You can download "OpenSSL" from the following link:-

                        http://gnuwin32.sourceforge.net/packages/openssl.htm

Download and install "OpenSSL".The path I installed it in is "C:\openssl".From now on, this is referred to as OPENSSL_HOME. To launch "OpenSSL", go to OPENSSL_HOME\bin.Then double click on the file "openssl.exe" to launch it.A new command prompt will open with "OpenSSL" prompt.


 Make sure you are connected to the internet.Next, type in the following command hit enter in the "OpenSSL" console:-

              s_client -connect smtp.gmail.com:465

 The certificate will be output on the console itself. Copy the portion from the "BEGIN CERTIFICATE" to the "END CERTIFICATE' as indicated in the image below:-



 Open your favourite text editor, paste the copied string and save the file with the name "gmail.cert". You can use whatever name you want.Just make sure the extension of the file is ".cert".

  Next, back in the "OpenSSL" console, hit "CTRL+C". Then type in the following command and hit return:-

                 s_client -connect imap.gmail.com:993


Like before, copy the portion from the "BEGIN CERTIFICATE" to the "END CERTIFICATE".This time save it in a file named "gmail_imap.cert".

In the previous step, we got hold of the certificates.Next, we are going to install these certificate into our JRE.Open a new command prompt.Next, issue the following command and hit return.

keytool -import -alias smtpgmail -keystore my-trusted-certificates.jks -file C:\gmail.cert


Adjust the command according to the file location of the "gmail.cert". You will be prompted for setting up a password for the first time.Enter "changeit".The certificate will be added.

Similarly, issue the following command to add the "gmail_imap.cert" file to the key store.

keytool -import -alias imapgmail -keystore my-trusted-certificates.jks -file C:\gmail_imap.cert


After executing the commands, a new ".jks" file named "my-trusted-certificates.jks" will be create in the directory where you executed the commands from.


Now, go to SOA_HOME/user_projects/domains/domain1/bin(e.g. D:\Oracle\Middleware\user_projects\domains\domain1\bin).

Next ,edit the setDomainEnv.cmd file and replace the existing javax.net.ssl.trustStore property setting with :-

Djavax.net.ssl.trustStore=D:\Oracle\Middleware\jdk160_18\jre\bin\my-trusted-certificates.jks 

 and


 -Djavax.net.ssl.trustStorePassword=changeit

Adjust the location of the ".jks" file and the password according to your system.Restart the server once again.We are all set to go now.


Open JDeveloper if it is not already open.Next go to File->New.


In the "New Gallery", select the "Applications" node under the "General" node.In the right pane, select the "SOA Application" option and hit OK.


In the "Create SOA Application" window, enter a name for the application.To follow along, enter "GmailNotificationApp".Hit next once you are done.




In the next screen, enter a project name.To follow along, enter "GmailNotificationProject".Hit next once you are done.



In the next screen, select the "Composite With BPEL Process" option and hit finish.




Your project will be created.Next, the "Create BPEL Process" window will pop up.Enter a name for the BPEL process.To follow along, name "GmailNotifierProcess".Select the "One Way BPEL Process" template.Make sure you check the "Expose as a SOAP service" option.Hit OK once you are done.You can use the following image as a guide.



Your composite will look like the following image.



Double click on the BPEL process to open it.Next, drag and drop an email activity from the component palette and put it just below the receive activity.



Next, double click on the "email" activity.Under the "General" tab, enter the values.First, click on the expression builder button just beside "To" to bring up the expression builder.



In the expression builder, select the "input" variable under the "inputVariable" node and click on the "Insert Into Expression" button as indicated in the image below.Hit OK once you are done.



Back in the "Email" activity configuration screen, enter a value for the "Subject" and "Body".You can use expressions for these values also.Hit OK once you are done.Click on "Save All" to save the changes.



Our application is complete.You can deploy and test the application.Make sure you are connected to the internet.In the Enterprise Manager console, enter the email address where you want to send the email as the input and test the service.

Finally..Enjoy with SOA 11g...!!!