速度不行和1.1与2.0有关吗?
WAS4的EJB1.1大部分可以直接迁移到WAS 5上去,没有必要改成2.0

解决方案 »

  1.   

    For migration from WebSphere Application Server V3.5 or V4.0, see
    Migrating to WebSphere V5.0: An End-to-End Migration Guide, SG24-6910.
      

  2.   

    3.8.3 Migrating code from EJB 1.x to EJB 2.0
    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.
      

  3.   

    楼上的,这里不是英语角.而且我问的是如何改程序而不是如何整合到was5里面,was5支持1.1这是必然的.
      

  4.   

    实体bean改成2.0主要是EJBSQL的改动,然后可以改成本地实体bean,
    会话bean基本不需要太大的改动。
    基本上是体力活。
      

  5.   

    另外实体CMP Bean需要一些变动。你不需要在你的JAVA程序里定义
    你的persistence fields. 你只需提供access methods. 然后定义persistence fields
    在你的Deployment Descriptor.EJB2。0允许你定义Container-managed Relationship。基本上也是定义
    在 你的Deployment Descriptor