速度不行和1.1与2.0有关吗?
WAS4的EJB1.1大部分可以直接迁移到WAS 5上去,没有必要改成2.0
WAS4的EJB1.1大部分可以直接迁移到WAS 5上去,没有必要改成2.0
解决方案 »
- 关于java 中的protected <P, R>
- junit学习路线
- 实在是找不出来问题,求助!!!
- struts2 fckeditor 上传文件问题
- 进公司后应该看些什么书
- java编程问题
- 如何在提交form表单转到action的同时 向一个servlet发送信息!怎么写?最好具体点 在线等
- Linux(红帽AS4)下tomcat5+oracle10g,对于blob显示为乱码,同样的程序window下正常
- 菜鸟请教:Struts需要安装吗?
- Sql2000的JDBC错误,请帮忙阿
- weblogic Configuration Wizard不会用,帮帮忙.
- 新手求教struts问题:登录显示白屏,该如何解决?!(在线等待)
Migrating to WebSphere V5.0: An End-to-End Migration Guide, SG24-6910.
EJB 2.0 beans are supported only in an EJB 2.0 project (although a 2.0 project
also supports 1.1 beans).
1. For any CMP 1.x bean, replace each CMP field with abstract getXXX and
setXXX methods. (Then the bean class needs to be abstract.)
2. For any CMP 1.x bean, change all occurrences of this.field = value to
setField(value) in ejbCreate() and elsewhere throughout the code.
3. For any CMP, create an abstract getXXX and setXXX method for the primary
key.
4. For any CMP 1.x finder, create an EJBQL (EJB Query Language) for each
finder.
5. For any CMP 1.x finder, return java.util.Collection instead of
java.util.Enumeration.
6. Update your exception handling (rollback behavior) for non-application
exceptions:
– Throw javax.ejb.EJBException instead of java.rmi.RemoteException to
report non-application exceptions.
– In EJB 2.0 and 1.1, all non-application exceptions thrown by the instance
result in the rollback of the transaction in which the instance executed, and
in discarding the instance.
– In EJB 1.0, the container would not roll back a transaction and discard the
instance if the instance threw the java.rmi.RemoteException.
7. Update your Exception handling (rollback behavior) for application
exceptions:
– In EJB 2.0 and 1.1, an application exception does not cause the container
to automatically roll back a transaction.
– In EJB 1.1, the container performs the rollback only if the instance have
invoked the setRollbackOnly() method on its EJBContext object.
– In EJB 1.0, the container was required to roll back a transaction when an
application exception was passed through a transaction boundary started
by the container.
会话bean基本不需要太大的改动。
基本上是体力活。
你的persistence fields. 你只需提供access methods. 然后定义persistence fields
在你的Deployment Descriptor.EJB2。0允许你定义Container-managed Relationship。基本上也是定义
在 你的Deployment Descriptor