这是the specification of EJB上摘录的,也许对楼主有帮助: The Enterprise JavaBeans (EJB) architecture has the following goals: • The Enterprise JavaBeans architecture will be the standard component architecture for building distributed object-oriented business applications in the Java™ programming language. • The Enterprise JavaBeans architecture will support the development, deployment, and use of web services. • The Enterprise JavaBeans architecture will make it easy to write applications: Application developers will not have to understand low-level transaction and state management details,multi-threading, connection pooling, or other complex low-level APIs. • Enterprise JavaBeans applications will follow the Write Once, Run Anywhere™ philosophy of the Java programming language. An enterprise bean can be developed once, and then deployed on multiple platforms without recompilation or source code modification. • The Enterprise JavaBeans architecture will address the development, deployment, and runtime aspects of an enterprise application’s life cycle. • The Enterprise JavaBeans architecture will define the contracts that enable tools from multiple vendors to develop and deploy components that can interoperate at runtime. • The Enterprise JavaBeans architecture will make it possible to build applications by combining components developed using tools from different vendors. • The Enterprise JavaBeans architecture will provide interoperability between enterprise beans and Java 2 Platform, Enterprise Edition (J2EE) components as well as non-Java programming language applications. • The Enterprise JavaBeans architecture will be compatible with existing server platforms. Vendors will be able to extend their existing products to support Enterprise JavaBeans. • The Enterprise JavaBeans architecture will be compatible with other Java programming language APIs. • The Enterprise JavaBeans architecture will be compatible with the CORBA protocols.
The Enterprise JavaBeans (EJB) architecture has the following goals:
• The Enterprise JavaBeans architecture will be the standard component architecture for building distributed object-oriented business applications in the Java™ programming language.
• The Enterprise JavaBeans architecture will support the development, deployment, and use of web services.
• The Enterprise JavaBeans architecture will make it easy to write applications: Application developers will not have to understand low-level transaction and state management details,multi-threading, connection pooling, or other complex low-level APIs.
• Enterprise JavaBeans applications will follow the Write Once, Run Anywhere™ philosophy of the Java programming language. An enterprise bean can be developed once, and then deployed on multiple platforms without recompilation or source code modification.
• The Enterprise JavaBeans architecture will address the development, deployment, and runtime aspects of an enterprise application’s life cycle.
• The Enterprise JavaBeans architecture will define the contracts that enable tools from multiple vendors to develop and deploy components that can interoperate at runtime.
• The Enterprise JavaBeans architecture will make it possible to build applications by combining components developed using tools from different vendors.
• The Enterprise JavaBeans architecture will provide interoperability between enterprise beans and Java 2 Platform, Enterprise Edition (J2EE) components as well as non-Java programming language applications.
• The Enterprise JavaBeans architecture will be compatible with existing server platforms. Vendors will be able to extend their existing products to support Enterprise JavaBeans.
• The Enterprise JavaBeans architecture will be compatible with other Java programming language APIs.
• The Enterprise JavaBeans architecture will be compatible with the CORBA protocols.
结合自己的理解。是否可以这样组织结构。对于频繁使用的实体bean,写一个对应的wraper类,实体bean的调用尽量通过会话bean调用。以减少对数据库的频繁访问。通过wraper类也减少通过远程调用ejb的开销。
所以无状态SESSIONBEAN是不能被普通的JAVABEAN代替的
一般来说实体BEAN的性能不好,所以一般用会话BEAN+JDBC做,让JDBC把查到的数据通过会话BEAN 返回