Skip to main content

5 posts tagged with "oc4j"

View All Tags

· 2 min read

You have probably heard about Web Tools Platform (WTP), this project extends Eclipse with various tools for developping J2EE applications. It contains editors for HTML, JSP, XML and so more... In addition to various wizards to create Web Services, EJB, Connector and more... WTP allows developers to package the application using J2EE standard packagind: EAR,WAR,RAR,JAR and deploy and run the application from the IDE.

The challenge here is not how you build J2EE components using an IDE, but more how do you package, deploy and run your application easily from the IDE. Eclipse WTP allows you like Oracle JDeveloper does, to package the various J2EE components in standard archives (JAR, WAR, EAR, RAR, ...) and deploy them to a J2EE container. WTP project has a very nice list of containers you can deploy to: Oracle, IBM, BEA, JBoss, Tomcat, ...

With the latest build of Eclipse WTP (Release 1.0M8), Oracle Application Server 10g is now part of the default server list. So if your are an OracleAS user you can now use WTP and start to run and debut your application running in OracleAS from Eclipse.

What do you need to start using WTP and OracleAS:

  1. Download and install Eclipse WTP 1.0M8 from Eclipse site.
  2. Download and install OracleAS 10g (OC4J 10.1.3 Developer Preview 4) from OTN
  3. You must set a administrator password for OC4J using the start command
  4. Done! You can now use OC4J and Eclipse. I have a viewlet that shows the basic steps to create and run your first Web application.

OC4J configuration

Update (Nov,18) : I forgot to mention the Oracle Application Server Adapter tutorial from the Web Tools project.

· One min read

I am using internally Blojsom for blogging about the product I am taking care of: OC4J and especially the Web Services stack. In this post I am quickly documenting, as the title says, how to install Blojsom on OracleAS 10g.

1-Download

The first thing to do is to download the product itself, just download the Blojsom quickstart from sourceforge.

2-Deploy

Since, Blojsom is distributed as a WAR file you have nothing special to do, just deploy it. Anyway I have created a viewlet  that shows step by step deployment using Oracle Enterprise Manager.

So the application link will be: http://localhost:8888/blojsom/

Note: if you want to use the command line utility (admin.jar) or the Ant deployment task, you should package the Web archive in an EAR file.

3-Update the home page

The easiest way will be to just change the index.html page to redirect to the default blog. The index.html page to be modified is in:

  • $ORACLE_HOME/j2ee/home/application/blojsom/blojsomXXXX/index.html where blojsomXXXX is the name of the Web application generated during deployment.
4- Start blogging...

This is it...

· 2 min read

OC4J 10g (10.1.3) is a J2EE 1.4 containers, so as part of the specifications, it supports JMX for management and deployment. One of the benefits of JMX is the fact that finally Java applications, and in our case the J2EE containers, have a standard based interface to be administered. OC4J exposes using its MBean Server system and application lever management beans (MBeans) that you can monitor and control from the Oracle Application Server Control (ASC) that is pre-deployed; but you can use any JMX client application. Sun has included as part of Java 5 JMX but also provides a standard JMX client called JConsole. This post is simply explaining how you can use the Sun's JConsole with OC4J.

  1. Set the environment:
$ORACLE_HOME to the OC4J home

$JAVA_HOME your JDK home
  1. Start the OC4J with the following property set
$JAVA_HOME/bin/java -Dcom.sun.management.jmxremote -jar oc4j.jar

The -Dcom.sun.management.jmxremote system property creates an RMI connector to the MBeanServer, we will use this RMI connector from the console iself.

  1. Start the JConsole, with the following command, adding the OC4J administration class to the classpath.
$JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar;$ORACLE_HOME/lib/adminclient.jar

  1. The console will automatically ask you to connect to the OC4J process and you can start to monitor and administer your OC4J instance

Connection to the OC4J MBean Server

Java 5 JConsole browsing the OC4J MBeans