Using JBossIDE + XDoclet with both JBoss4.0.0 and WebSphere AS 6.0
来源:互联网 发布:mac双系统安装win10 编辑:程序博客网 时间:2024/06/14 07:36
Prepare:
-
Download the latest version of JBossIDE ( JBossIDE-1.5M2-Bundle-win32.zip is recommended)
-
Download the latest version of XDoclet , extract to a folder and copy *.* to eclipse/plugins/org.jboss.ide.eclipse.xdoclet.core_1.5.0.M2/, or extract to eclipse/plugins/org.jboss.ide.eclipse.xdoclet.core_1.5.0.M2/ directly.
-
Download and install JBoss4.0.0(the default configuration of 4.0.0 is J2EE1.4 compliant, and the default configurations of 4.0.1 and above are not fully J2EE1.4 compliant)
-
install WebSphere Application Server 6.0
Development:
-
Create a new J2EE 1.4 Project, a stateless session bean with local interface, a servlet which would lookup the ejb and invoke some methods.
-
Config XDoclet properties to add extra support for WebSphere.(the support for JBoss is provided by default)
-
Add XDoclet annotation "@ejb.util generate="physical"" to the ejb class
-
Run XDoclet, then you will get source files for ejb home and deployment descriptors for both JBoss and WebSphere.
-
Modify "SomeEjbLocalHome.JNDI_NAME" from "xxx" to "local:xxx", this is a workground for WebSphere
-
Modify jndi references in all descriptors from "xxx" to "local:xxx".
-
Create "application.xml" in META-INF manually, fill its content just like below:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE application (View Source for full doctype...)>
- <application>
<display-name>Both</display-name>
- <module>
<ejb>yourejb.jar</ejb>
</module>
- <module>
- <web>
<web-uri>yourweb.war</web-uri>
<context-root>/yourroot</context-root>
</web>
</module>
</application>
-
Config "Packaging Configurations" of project, add descriptors for WebSphere to standard war and standard jar.(once again, the descriptors for JBoss are included in standard war&jar by default)
-
Run "Packaging", then you will got yourejb.jar and youweb.war
-
Config "Packaging Configurations" of project, create the app.ear which include yourejb.jar and youweb.war and application.xml
-
Run "Packaging" again to create app.ear
Deployment:
-
you can use JBossIDE deploy app.ear to JBoss directly
-
or you can use any other methods such as Web Administration Console to deploy our application to WebSphere and JBoss
- Using JBossIDE + XDoclet with both JBoss4.0.0 and WebSphere AS 6.0
- Check whether directory exist on both PC and AS
- 在eclipse中使用JBossIDE和xDoclet创建EJB
- 今天试了一把JBossIDE-1.5-Preview+jboss4+ejb3
- 今天试了一把JBossIDE-1.5-Preview+jboss4+ejb3
- 今天试了一把JBossIDE-1.5-Preview+jboss4+ejb3
- JBOSS4.2+JBOSSIDE 2.0beta2{Eclipse}开发环境配置常见问题
- Using UTF-8 as the internal representation for strings in C and C++ with Visual Studio
- Using Android monkeyrunner from Eclipse, both in Windows and Linux!
- Using Android monkeyrunner from Eclipse, both in Windows and Linux!
- WITH AS and materialize hints
- WITH AS and materialize hints
- Python之 with and as
- WITH AS and materialize hints .
- DPM for WebSphere Portal best practice 1 - Portal page for both anonymous/authenticate user and WebSphere portal implicit logout
- Using Record Objects as Parameters and Returns
- JBOSS4.2+JBOSSIDE 2.0beta2{Eclipse}开发环境配置问题总结-EJB3.0开发基础
- ant and xdoclet
- 备忘录:JAX-RPC 1.1
- Java的线程最大数量
- C语言中变量的位置与程序优化
- Managing the Container in Spring
- 显示环境变量和 JVM 缺省属性的 Java 程序
- Using JBossIDE + XDoclet with both JBoss4.0.0 and WebSphere AS 6.0
- 华为笔试题
- Oracle 备忘录
- XML形式的配置文件解析框架以及自动代码生成(一)
- JNDI 备忘录
- JavaBean 备忘录
- Vi常用命令(转载)
- 数据库中临时表的应用
- LDAP 备忘录