Abstract
Deployment at a Glance
When
you develop an oracle application system there is a need to deploy it in web
server like apache or application server
like websphere or weblogic so that everybody should be able to access it from
different location. For this activity we need to run several commands which
will be used to deploy your local application code to your server.
This
blog post is intended to provide the details for deployment by the user so that
he will be able to the see the web application in browser.
About
the Domain
Fusion Technology is
focused on bringing together diverse technologies like Real Application
Clusters, Business Orchestration Tools, Web Services, evolving Web programming
framework like ADF (application Development Framework), OA Framework and
concepts of Web 2.0, associated with Fusion Architecture.
Oracle
application provides framework called OA Framework which will use to develop a
web based application which is more secured than other framework.
When
you developed a oracle application there is a need to deploy it in web server
like apache or application server like
websphere or weblogic so that everybody should be able to access it from
different location. For this activity we need to run several commands which
will be used to deploy your local application code to your server.
On
the solution you will generate a command which contains the entire necessary
step to create MDS (MetaData Services) in database which will be loaded in memory
in run time.
Business components you extend consist of
the following:
- XML
files that provide the declarative properties for your extended component
- Possibly
one or more Java files where you have overridden methods from the base
class for the component, to provide custom business logic programmatically
At design-time, JDeveloper reads the
component's declarative metadata definition from its respective XML file that
resides on your file system and runs the associated Java classes from your
JDEV_USER_HOME.
For run-time use, the BC4J XML for your
extended business components and the corresponding compiled Java code will need
to be deployed to the file system of your middle-tier server. The substitutions
specified in the .jpx definition file will need to be deployed
to the MDS repository on the database of your target 11i instance. Note
however, that the .jpx file itself does not need to be copied to
your middle-tier file system.
Custom OA pages you develop consist of the
following;
- XML
files that define the OA components and declarative properties specified
in your pages
- One
or more OA Extension controller Java files
To deploy a custom OA page, the OA
component definitions (in XML files) will need to be deployed to the MDS
repository on the database of your target 11i instance. The corresponding OA
Extension Controller classes will need to be deployed to the file system of
your 11i middle-tier server.
In addition, you will need to deploy any
custom BC4J components that model data for your custom page. These BC4J XML
files and the corresponding compiled Java code will need to be deployed to the
file system of your middle-tier server. If you have extended existing BC4J
components (shipped with an OA Framework-based self-service product) for use
with your page, you will also need to deploy the corresponding substitutions
specified in the .jpx definition file of your JDeveloper
project. You deploy the .jpx file to the MDS repository on the
database of your target 11i instance.
Note:
OA Framework does not
currently support the use of the BC4J deployment wizards provided with Oracle9i
JDeveloper. Although JDeveloper uses a local OC4J instance to allow you to test
your work locally, the 11i technology stack employs an Apache JServ Servlet
engine to process servlet requests, and does not currently use or support OC4J.
Use the instructions in the following
section to deploy the constituent parts of your extension or custom OA page to
your 11i environment. Oracle recommends that you always deploy your extensions
to a test instance first and verify the changes before deployment to a
production server.
Deploying Your
Business Logic Extension
Step 1: Compile your Java
in JDeveloper and zip up your Java classes
Create a zip of <JDEV_USER_HOME>\myclasses\<CompanyIdentifier>, electing to preserve the directory structure. You
will be picking up both BC4J files and MDS XML in your zipped file.
Expand your zip file to the middle-tier of
your 11i instance under $JAVA_TOP, ensuring that the
directory structure of your packages is preserved. Your directory structure
should now resemble the following:
<$JAVA_TOP>/<CompanyIdentifier>/oracle/apps/<AppsProductShortName>/server (BC4J files)
Step 2: Run the jpx import
utility to import substitutions specified in the .jpx definition file to the MDS repository.
Create a folder in your drive say C:\Code_upload.Create
a folder called zips and put the necessary
jars and zips under this folder.It should contains following zips and jars
1.
Classes12.jar
2.
Collections.zip
3. Fwk.zip
4.
Fwkjbo.zip
5.
Mdsrt.jar
6.
Nls_charset12.zip
7.
Oamdsdt.jar
8.
Ojdbc14.jar
9.
Share.jar
10. Uix2.jar
11. Xmlparserv2.jar
Run
the following command from command prompt:
C:\code_upload>java -cp zips\classes12.jar;zips\collections.zip;zips\fwk.zip;zip
s\fwkjbo.zip;zips\nls_charset12.zip;zips\oamdsdt.jar;zips\ojdbc14.jar;zips\share
.jar;zips\uix2.jar;zips\xmlparserv2.jar;zips\mdsrt.jar;
oracle.jrad.tools.xml.im
porter.XMLImporter
C:\code_upload\Myprojects\rajeev\oracle\apps\ak\employee\webu
i\EmployeePG.xml
-rootdir myprojects\ -username apps -password apps -dbconnection
"(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp)(HOST=172.18.18.30)(PORT=1611))
(CONNECT_DATA=
(SERVICE_NAME=VINDIA) (INSTANCE_NAME=VINDIA)))" > CRPGSEC_xmlimport_output.txt.
The
underlined xml is the xml for which you want to make MDS.
In
dbconnection you should give whatever you have written in tnsnames.ora.
When
you run this command you will see one text document generated in
c:\code_upload..
If
it succeeds it will show you “import completed”.
Step 3: Bounce the web
server
Step
4: Review your deployed extensions
At
this point the deployment of your extension is complete, and you should be able
to login to your application to verify that your changes have successfully
taken effect.
Note: If
you unloaded your BC4J XML and Java to a location other than $JAVA_TOP,
or a location not already in your classpath, you will need to modify your
classpath to add that location to it and bounce the web server before logging
in to view your changes.
Step
5: Creating Menu and Function
Open Oracle Application Instance.
After giving User Name and password there will be responsibity links. Click on
System Administrator link. There will be Function link under application. Click
on the function link. Under the description tab enter Function name and the
user function name. Under properties tab give type =JSP interoperable with OA.
Under Web HTML tab give the full path of the XML file which needs to be deploying
(example OA.jsp?page=/rajeev/oracle/apps/ak /employee/webui /EmployeePG).
Creating Menu
In System Administrator Navigation
click on menu. Give the name of the menu in Menu and in the User Menu Name. In
the Function column give the function name that you created just now. Give some
prompt name and sequence.
Creating Responsibility
In System Administrator Navigation
click Responsibility-Define link. In the Responsibity Name give some name. In
Application give System Administration and give some Responsibility key.
In System Administrator Navigation
click Switch Responsibility. After giving the reponsibility that you created just
now you will be able to see your page in browser.
Snapshots:
1)
Snapshot of your zip folder
2) Snapshot of your
command promt: