Oracle Center of Expertise by Pavan

Tuesday, July 31, 2007

Configuration for JNDI while deploying a BPEL Process using Apps Adapter

Inorder to deploy a bpel process using apps adapter as a partnerlink, we need to make sure that the details of connection used in designing the process is present in oc4j-ra.xml

Now, oc4j-ra.xml is runtime connection configuration file which binds connections details to JNDI names. Suppose while designing the BPEL Process, if you choose a connection to your apps database - For example:
Say, atgtest1.idc.oracle.com-1528-AIA is the connection, the JNDI name which would be created will be 'eis/Apps/atgtest1' - This can be changed at anytime.

At runtime this JNDI name would be looked up in oc4j-ra.xml to find out which database connection it points.

oc4j-ra.xml is present at $ORACLE_HOME\j2ee\home\application-deployments\default\AppsAdapter, where ORACLE_HOME is directory where 1013 SOA Suite is installed.

Sample entry in oc4j-ra.xml would be like this (click on enlarge):



Replace APPS_USER,APPS_PASSWORD,MACHINE,PORT_NUMBER and SID with those of Database you intend to use apps adapter on.

Restart BPEL Server after modifying oc4j-ra.xml to reflect the changes. Inorder to restart server :

a. Open command shell
b. cd $ORACLE_HOME/opmn/bin
c. $ opmnctl stopall
d. $ opmnctl startall

Monday, July 23, 2007

Uncover OC4J - Part II


OC4J History and Now


My computer faculty always used to say – ‘In the S/w industry - Only fools write the code from the scratch”, When Oracle has started its Web Components development, might had the same thought - so it did not write the Web Server from scratch instead it has borrowed the Open-source Apache Web Server code.

(Just a nut crack, Oracle's decision to opt for Apache is due to its flexible, modular and extensibile architecture, cost cutting in development and testing for Web Server code and other important implications - all of the above - code reusability ;) )

After Oracle has decided to go for Apache, it has fine-tuned Apache for performance and gave it a new name called OHS – Oracle Http Server. It has then introduced new modules like mod_plsql for accessing database via Web Server, mod_osso for facilitating Single Sign-on etc.

Now, regarding the Java part – if a client (or browser) requests for a JSP / Servlet, the first entity that picks up the request from client (or in other words, the first entity which the request goes to) is Web Server i.e., in our case, Apache Web Server. Now the Apache Web Server detects that it has to serve the client with a Java file, it redirects the request to the Java sub-system, which is mod_jserv. Mod_jserv is again a Apache based module which is again fine tuned by Oracle to serve its Java programs.

Oracle Applications contain many self-service applications, which use mod_jserv for executing / running the self-service pages.

Now mod_jserv is just a Java server and contains mini Servlet containers in which servlets and JSPs do get executed. But it does not contain / does not have a fully-feature servlet containers which have advanced features like load-balancing, connection pools etc and also neither it contains any J2EE compliant containers like EJB Containers, JMS, JMX, JAAS supportability etc.

Technology gets emerged and new components are getting added to J2EE. This is sensed by Oracle long before. To copeup with the competition and technology, Oracle has to create its own Java containers which supports the Java Enterprise Edition standards like JDBC Pools, EJB containers, JMS and JMX suppportability, Security features like JAAS, Mailing specs like Java Mail and others. With these requirements, Oracle has started creation of the OC4J containers.

All the OC4J containers are purely written in Java, which support all the specification and components listed in J2EE Specification. Some of them are fine tuned and customized to suit Oracle needs – for example – Oracle implemention of JAAS specification is called as JAZN.

In short, OC4J is a Java based container that fully supports all the specifications of J2EE. 10.1.3 OC4J supports J2EE 1.4 and part of 1.5 specifications. Also, OC4J itself contains Http Server – called as OHS (Web server with Apache code base) in itself, but this web-server is not for serving the client requests. Instead this webserver is used for management i.e., to:
a) Configure OC4J itself (remember OC4J is just a container and it does not have any interface to get managed unless like in WebLogic where we get a Java console).
b) Configure the applications (like Web beans, EJBs and others) deployed in the OC4J Container. Further going, Oracle replaces mod_jserv and market OC4J server.
c) Create and manage multiple instances of OC4J.

Once you connect to the Webserver of OC4J at 8888 port, the main index page would open up and we all are aware of this component page before – i.e., EM – Enterprise Manager. We will see about this EM application in coming parts.

(One thing to note here is – If Oracle iAS, we still get the Apache folder and all the apache configurations. I agree that this is a duplication of webservers but one thing we should not forget here is that all the requests are first taken by a Web server – here it is Apache Web server and not OC4J Webserver and if any request for J2EE component, would redirect it to mod_oc4j.
Apache Server (also called Oracle Http Server or OHS is for serving the client’s request and the webserver in OC4J is to manage OC4J server). Apache server in production systems generally run at 80 to which clients get connected and OC4J webserver default port is 8888. Apache Server is for clients and OC4J Webserver is for Administrators to configure OC4J and to deploy and manage the J2EE Applications).)

Going further Oracle will remove mod_jserv module and mod_plsql modules from its Applications and iAS versions and market OC4J for all Java and J2EE needs.

There is a reason for this –
mod_plsql is a security vulnerability that is prone to attacks by hackers. Although, I would not go in depth here to list all the techniques but to mention URL re-writing is one of the most used hacking techniques. One could directly call the plsql procedures from URL and thereby accessing the user / transaction data. After the OC4J is introduced and Web Server tightly integrated into the OC4J itself and high security features such as SSL and cipher algorithms incorporated in the Container, chances of attack were bought to a zero. Any access to the data will have to go through several layers of security and via thin drivers only.
As for mod-jserv goes, one reason I can jolt down here is OC4J is Oracle’s child – it can mould it the way it wishes. One more thing is that the properties in the mod_jserv is all in the ASCII text files which is hard to read. In OC4J, all the properties are in XML format and dynamic in nature, easy to program, easy to configure, modular and more-ever a Standard.

Uff, there goes my day off after briefing and boring with all the history that I know of the OC4J.

For me, OC4J still has a longgg way to go and is still in its primary level but ofcourse its still a robust, full-featured, highly integrated, extensible, scalable, easily manageable, one of the containers ever written with low memory footprint and on the above my favourite application server components.

Catch you more inside in the next part of OC4J – coming soon your way – OC4J Part III

Friday, July 20, 2007

Uncover OC4J - Part 1

OC4J - Oracle Containers for Java

In this topic, I will be discussing the very basics of OC4J containers from Oracle. Although there are plethora of Java containers outside in the market, I always prefer the OC4J due to its architecture and modularity and the amount of flexibility in the maintenance.

OC4J is a Oracle developed propreitary module into the Apache Web server. Apache Web server is a Open Source web server which is picked up by Oracle and fine tuned Apache into Oracle Http Server (aka OHS).

Those who are new to OHS, OHS is Apache at its core. As Apache, OHS is also a module-based Webserver. Oracle has developed Java containers and incorporated this module into the OHS and called it OC4J (aka Oracle Containers for Java).

OC4J containers are based on J2EE specifications supported all the J2EE components like Servlets, JSPs, JAAS, JMS, Java Mail, JSFs, EJBs.

OC4J has multiple incarnations :) (aka versions)
- 1.0.2.2.x
- 9.0.2.x
- 9.0.3.x
- 9.0.4.x
- 10.2.2
- 10.1.3 - Most Recent version

There are 3 types of Deployment types for OC4J
- Standalone
- Embedded
- AS Component

Standalone OC4J
- comes as a ZIP file as oc4j_extended.zip file. You need not install anything. Simply uninstall the zip file and launch the process. This is purely written in Java from scratch and some options like JAZN-LDAP and SSO are not avaliable in this type of deployment. Generally used for quick testing and development of components.

AS Component
- comes with iAS installation CDs. Can be installed via OUI as a part of iAS installation. Have all the features enabled. Used in Production instances.

Embedded OC4J
- comes as a part of JDeveloper. Have all the features in it and also available at API level. Can be started and accessed via JDeveloper only.

Be there for some more stuff in Part II ....... :)

Monday, July 16, 2007

OID - Oracle Internet Directory

In this writing, I will tell you about OID - acronym for Oracle Internet Directory. Guys, it is a bit tough and confusing in understanding OID in the start but once OID is understood its a childs play. Oracle does have complex products and OID is one of them but I bet it is the best among the LDAP implementations.

Let us share our views about OID first as FAQs. We will then look into the configuration of 10g and then 9i (I dont give preference in configuring the older versions but dont worry we will have writing on that too - ;) )

1. What is OID ?
OID is a
LDAP implementation by Oracle Corporation. It is more than a just mere LDAP server. It can store all the user details, organization details and object details in some cases. It can be used via standard LDAP commands like ldapsearch, ldapadd to search the entities within it.
Oracle always goes with the Standards as it did with OID. Oracle Internet Directory helps in better organization of data and the resources. It can be implemented in an organization as a single source of truth.
Other major competitors to OID are Microsoft's Active Directory, Sun's SunOne Directory and others.

2. Whats the use of OID ?
When a company needs a database which holds all the user information and can act as a single source of truth, LDAP can be implemented. OID is the best choice as it is very easy to configure, manage and work.

3. Why only OID ?
i) OID is built as a hierarchical tree which is easy to understand and navigate.
ii) OID is created in Java from scratch. So, can run on any of the platforms with same look and feel. iii) OID data is stored in Oracle database and due to the fact of Oracle Database capabilities, it can handle enormous amounts of data,
iv) OID can retrieve data within seconds due to enterprise search inbuilt in the database.
v) OID can be integrated with any other LDAP implementations and also can be implemented with any of the Oracle Applications seemlessly.
vi) OID can be managed locally as well as remotely i.e., via both Web and also via a client software.


4. How can I install OID (or) from where do I start from ?
There is a catch here.
Oracle 9i:
OID (both server and client software) by default comes with Oracle Database 9i Enterprise Software disks. We need to choose Enterprise option while installing OID or choose Custom select OID.

Oracle 10g (9.0.4 and above):
From Oracle 10g, OID server is no longer shipped with Database instead it is shipped with 10g iAS. Yes, when we install Oracle 10g database, we do get a directory called ldap but they are only supporting files for LDAP. I mean when the OID is installed, the data is stored in the database. So, to navigate this data and local client (Swing UI) is shipped with Oracle 10g database software disks.
In order to install OID 10g, we need to install from 10g iAS CDs.

5. I have Oracle 10g IAS CDs and trying to install OID. Which option do I choose for installing OID ?
We need to choose OracleAS Infrastructure 10g option and choose Identity Management inorder to install the OID server.

6. Which port does OID run at ?
OID runs at two ports by default : non-SSL : 389 and SSL : 636

Hang on, still some more of the questions .. coming on your way..

How do you feel the content of this site ?

FeedBurner FeedCount