Using JBossIDE + XDoclet with both JBoss4.0.0 and WebSphere AS 6.0

Prepare:
  1. Download the latest version of JBossIDE ( JBossIDE-1.5M2-Bundle-win32.zip is recommended)

  2. 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.

  3. 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)

  4. install WebSphere Application Server 6.0

Development:
  1. 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.

  2. Config XDoclet properties to add extra support for WebSphere.(the support for JBoss is provided by default)

  3. Add XDoclet annotation "@ejb.util generate="physical"" to the ejb class

  4. Run XDoclet, then you will get source files for ejb home and deployment descriptors for both JBoss and WebSphere.

  5. Modify "SomeEjbLocalHome.JNDI_NAME" from "xxx" to "local:xxx", this is a workground for WebSphere

  6. Modify jndi references in all descriptors from "xxx" to "local:xxx".

  7. 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>

  1. 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)

  2. Run "Packaging", then you will got yourejb.jar and youweb.war

  3. Config "Packaging Configurations" of project, create the app.ear which include yourejb.jar and youweb.war and application.xml

  4. Run "Packaging" again to create app.ear

Deployment:
  1. you can use JBossIDE deploy app.ear to JBoss directly

  2. or you can use any other methods such as Web Administration Console to deploy our application to WebSphere and JBoss


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值