您的位置:首页 >> 编程开发 >> Java >> JavaBeans >> 正文
RSS
 

WebLogic的研究之三--开发、部署EJB(1)

http://www.rdxx.com 01年11月17日 11:08 互联网 我要投稿

关键词: 部署EJB , WebLogic , 开发 , Web , JB

// Utility Methods
//----------------------------------------------------------------------------

private void log(String message) {
if (message.length() > MAX_OUTPUT_LINE_LENGTH) {
System.out.println("-- " + message.substring(0, MAX_OUTPUT_LINE_LENGTH) + " ...");
}
else {
System.out.println("-- " + message);
}
}
/**Main method*/

public static void main(String[] args) {
HelloWorldBeanClient1 client = new HelloWorldBeanClient1();
// Use the client object to call one of the Home interface wrappers
// above, to create a Remote interface reference to the bean.
// If the return value is of the Remote interface type, you can use it
// to access the remote interface methods. You can also just use the
// client object to call the Remote interface wrappers.
}
}


build.cmd

if "" == "%JAVA_HOME%" set JAVA_HOME=\java
if "" == "%WL_HOME%" set WL_HOME=\weblogic
set MYSERVER=%WL_HOME%\myserver
set MYCLASSPATH=%JAVA_HOME%\lib\classes.zip;%WL_HOME%\classes;%WL_HOME%\lib\weblogicaux.jar;%MYSERVER%\clientclasses

@REM Create the build directory, and copy the deployment descriptors into it
mkdir build build\META-INF
copy *.xml build\META-INF

@REM Compile ejb classes into the build directory (jar preparation)
javac -d build -classpath %MYCLASSPATH% HelloWorld.java HelloWorldHome.java HelloWorldBean.java

@REM Make a standard ejb jar file, including XML deployment descriptors
cd build
jar cv0f std_ejb_HelloWorld.jar META-INF hello
cd ..

@REM Run ejbc to create the deployable jar file
java -classpath %MYCLASSPATH% -Dweblogic.home=%WL_HOME% weblogic.ejbc -compiler javac build\std_ejb_HelloWorld.jar %MYSERVER%\ejb_Hello.jar

@REM Compile ejb interfaces & client app into the clientclasses directory
javac -d %MYSERVER%\clientclasses -classpath %MYCLASSPATH% HelloWorld.java HelloWorldHome.java HelloWorldBeanClient1.java



作者:XYZ※版权所有
转载请注明来源
CGI编程设计室】
http://zjxyz.yeah.net

9 7 3 1 2 3 4 8 :

 
 
标签: 部署EJB , WebLogic , 开发 , Web , JB 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站