« ADF UIX: Things I don't like | Main | Interesting read on the Eclipse vs. <insert your favourite IDE> debate »

Deploying to OC4J: The Better Way

After reading a number of blog entries (blojsom, harri) on deploying blojsom to OC4J. It's time to provide a solution for the easiest command line way.

Although Harri's entry is very complete, he edits the Orion or OC4J server configuration files by hand (shudder). The better and less error prone solution is to use the command line tool admin.jar

Deploying EAR files with admin.jar

This will replace step 7 and 8


cd $ORACLE_HOME/j2ee/home
java -jar admin.jar ormi://hostname[:port] admin welcome -deploy -file /path/to/blojsom.ear -deploymentName blojsom

The generic code line is

java -jar admin.jar ormi://hostname[:port] username password -deploy -file &lt;full-path-to-file> -deploymentName &lt;deploymentName>

Setting the Context Root with admin.jar

This will replace step 9

cd $ORACLE_HOME/j2ee/home
java -jar admin.jar ormi://hostname[:port] -bindWebApp admin welcome blojsom blojsom http-web-site /blojsom

The generic code line is

java -jar admin.jar ormi://hostname[:port] username password -bindWebApp &lt;deploymentName> &lt;war-file-basename> &lt;web-site-basename> &lt;contextroot>

Conclusion

Editing the Orion/OC4J server XML configuration files is error prone and tedious. If you're able to use a tool for this, use it.

Bonus

These tools can be used in build scripts from Ant, too. See Steve Button's Entry for details.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on April 15, 2005 4:02 PM.

The previous post in this blog was ADF UIX: Things I don't like.

The next post in this blog is Interesting read on the Eclipse vs. <insert your favourite IDE> debate.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle