兼容的API标准
J2EE 1.3
JSP 1.2
Servlets 2.3
EJB 2.0
JTA 1.0
JMS 1.0
JNDI 1.2
Java Mail 1.1.2
JDBC 2.0 Extension
JAAS 1.0
JCA 1.0
JAXP 1.1
适用的JDK平台
JDK 1.3和1.4.1
需要设置环境变量
%J2EE_HOME% = %OC4J_INSTALL_PATH%/j2ee/home
安装
java -jar oc4j.jar -install
启动
java -jar oc4j.jar
停止
java -jar admin.jar ormi://host:port admin_name admin_passwd -shutdown
重启动
java -jar admin.jar ormi://host:port admin_name admin_passwd -restart
强行停止
java -jar admin.jar ormi://host:port admin_name admin_passwd -shutdown force
默认HTTP端口
8888
默认RMI端口
23791
快速运行Servlet和JSP
@ 把Servlet放在j2ee/home/default-web-app/WEB-INF/classes下, 然后从host:8888/servlet/pkg.class访问.
@ 把JSP放在j2ee/home/default-web-app下, 然后从host:8888/jsp访问.
发布应用程序
方法一, 自动发布
把ear文件拷贝到%J2EE_HOME%/applications下
方法二, 手工发布
1. 修改server.xml, 加入
<
application name
=
"
myapp
"
path
=
"
/private/applications/MyApp.ear
"
auto
-
start
=
"
true
"
/>
2. 修改...-web-site.xml, 加入
<
web
-
app application
=
"
myapp
"
name
=
"
myapp-web
"
root
=
"
/myapp
"
/>
方法三, 通过工具发布
java
-
jar admin.jar ormi:
//
host:port admin_name admin_passwd -deploy -file filename.ear -deploymentName app_name -targetPath path/destination
java
-
jar admin.jar ormi:
//
host:port admin_name admin_passwd -bindWebApp app_name web_app_name web_site_name context_root
卸载应用程序
java
-
jar admin.jar ormi:
//
host:port admin_name admin_passwd -undeploy app_name -keepFiles