Friday, May 7, 2010


*Alert Another Oracle related technical post.

Salam and good-day all my technical readers (Though i knew, not many of my fans are technical readers). :D

Have you ever heard of Oracle Application Server? No? Why not? You use tomcat? With administrative gui? What if your gui crash? or worst, it's not pre-installed? Dont worry, there's always another way to spell three.

local oc4j

1. Make sure your local oc4j is up and running.

2. Issue this command
java -jar admin.jar ormi://oc4jHost:oc4jOrmiPort adminId adminPassword options

F:\oc4j_extended\j2ee\home>java -jar admin.jar ormi://sphbdb:23791 admin password
4 -help
Error: Illegal command -help
java -jar admin.jar [-help] - print out this usage

java -jar admin.jar ormi://<:port> username password [command]
Commands are:
-shutdown [force|ordinary] [reason] - shuts the entire server down
-restart [reason] - restarts the entire server
-deploy [subswitches] - (re)deploys an application. Sub-switches are:
   -file [filename] - Enterprise Archive to deploy
   -deploymentName [name] - Name of the application deployment
   -targetPath [path] - The path on the remote OS to place the archive at. If no
t specified the applications directory is used
   -parent [name] - Specifying parent application of this application, the defau
lt is the global ('default') application
   -deploymentDirectory [path] - Root of the deployment configurations, "[NONE]"
 to place them inside the .ear
   -cluster - Signals that the deployment should be propagated to other live clu
ster nodes if part of a cluster
   -iiopClientJar - the path on the local OS to place the jar file containing th
e application client stubs
-undeploy [application name] - remove a previously deployed application
-site [subswitches] - configures a site. Sub-switches are:
   -add - adds a site
      -host [host] - host/IP of this site
      -port [port] - port of this site
      -display-name [display-name] - display name of this site
      -virtual-hosts [virtual-hosts] - virtual hosts of this site
      -secure [secure] - true if this site is secure; otherwise false
      -factory [factory] - name of SSLServerSocketFactory implementation if not
using JSSE
      -keystore [keystore] - the relative/absolute path to a keystore used by th
is site
      -storepass [storepass] - keystore password
      -provider  [provider] - the provider used if not using JSSE
      -needs-client-auth [needs-client-auth] - true if needs client auth; otherw
ise false
   ......... yada yada yada yoda..

*This mean your oc4j is up and running. Congrats!

3. Issue this command to start the deployment process:

java -jar admin.jar ormi://localhost:23791 oc4jadmin password -deploy -file utility.ear -deploymentName utility 

Example Output:

F:\oc4j_extended\j2ee\home>java -jar admin.jar ormi://sphbdb:23791 admin password
 -deploy -file F:\2_devspace\1_MBAS\listprovider\deploy\listprovider.ear -deplo
ymentName listprovider
Notification ==> Application Deployer for listprovider STARTS [ 2010-05-07T16:09
:25.088SGT ]
Notification ==> Undeploy previous deployment
Notification ==> Copy the archive to F:\oc4j_extended\j2ee\home\applications\lis
Notification ==> Unpack listprovider.ear begins...
Notification ==> Unpack listprovider.ear ends...
Notification ==> Initialize listprovider.ear begins...
Notification ==> Initialize listprovider.ear ends...
Notification ==> Initialize listprovider begins...
Notification ==> Initialize listprovider ends...
Notification ==> Application Deployer for listprovider COMPLETES [ 2010-05-07T16
:09:38.675SGT ]


4. Test your application in browser.
Now your application is deployed. :P Any question? do leave comment(s). 

No comments: