另外,在下一个专栏中,我们将研究服务数据对象,以及EJB(实体和会话)将如何参与到面向服务体系结构中。
Otherwise, in the next column, we will examine Service Data Objects, and how EJBs (both entities and sessions) will play a role within a Service Oriented Architecture.
会话或实体e JB组件的远程接口提供了位置独立性。
Remote interfaces to session or entity EJB components provide location independence.
这里讨论的方案并未涵盖所有情形,但是它们代表了实体EJB组件和会话 EJB 组件的一些最常见用法。
The scenarios discussed here don't cover every situation, but they are representative of some of the most common uses for entity EJB components and session EJB components.
其想法是这样的,一个实体希望发起与另一个实体的通信,并向通信会话发送一个INVITE(图1)。
The idea is that one entity wants to initiate communication to another entity, and sends an INVITE to a communication session (Figure 1).
始终使用会话虚包来启动有关所使用实体的全局事务。
Always use a session facade to start a global transaction around the entities used.
图3演示了两个实体之间的简单会话。
Figure 3 illustrates a simple conversation between two entities.
在部署时,会话ejb需要的工作实际上与实体e JB相同。
Session EJBs behave essentially the same as entity EJBs when it comes to deployment.
简而言之,如果您想接收位于会话外观后的本地实体eJB,您也要接收位于其后的本地有状态会话ejb。
In short, if you are willing to accept local entity EJBs behind a session facade, you should be willing to accept a local stateful session EJB behind one as well.
在J2EE探险者系列的第三部分中,我们针对数据持久性将实体bean与会话bean和jdbc组合作了比较和对照。
In this third installment of the J2EE pathfinder series, we have compared and contrasted entity beans with session beans and JDBC for data persistence.
会话bean通常会操作一个或多个实体bean。
Session beans typically operate on one or more entity beans.
首先,为了避免网络开销并强制遵守业务规则,几乎总是通过会话bean访问实体bean。
First, to avoid network overhead and force adherence to business rules, entity beans are almost always accessed through a session bean.
当收到一条消息时,该客户机便可以与应用服务器建立一个同步的RMI连接,并按照常规的方式调用会话bean或者实体bean。
Upon receiving a message, the client could then establish a synchronous RMI connection with the application server and invoke the session or entity beans in the usual way.
因此,访问会话BeanAccountManagement中的业务方法的实体e JB都在一个全局事务中执行。
Therefore, Entity EJBs accesses in any business method of the session bean AccountManagement are executed in a global transaction.
位置独立性是由远程接口使用RMIover IIOP提供给无状态会话Bean或封装服务的实体home方法的。
Location independence is provided by remote interfaces using RMI over IIOP to stateless session beans or entity home methods that encapsulate the services.
在本文中,我们将讨论可使用CommunityEdition来保护会话、实体和消息驱动的EJB的不同选项。
In this article we discuss the different options available to secure session, entity and message-driven EJBs using Community Edition.
这将使执行转移到servlet控制器,然后转到会话bean,再转到实体 bean。
This will pass execution on through to the servlet controller to the session bean on to the entity bean.
一个会话bean访问多个实体bean比允许客户机进行多次远程方法调用效率要高得多,维护起来也要容易得多。
A session bean accessing multiple entity beans is much more efficient and easy to maintain than allowing clients to make multiple remote method calls.
会话bean和实体bean可以发送JMS消息,但只能同步接收这些JMS消息。
Session beans and entity beans can send JMS messages, but can only receive them synchronously.
与会话Bean和实体Bean不同,消息驱动的Bean不会由其他Bean或客户端应用程序调用。
Unlike session and entity beans, message-driven beans are not invoked by other beans or client applications.
典型情况下,会话bean用于实现业务逻辑和封装实体bean。
Session beans are typically used to implement business logic and encapsulate entity beans.
这样,会话bean就为我们与实体bean的交互提供了一个虚包。
As such, the session bean provides a facade for our interactions with entity beans.
问题:太过于关注SOA中的会话和实体。
The problem: too much focus on sessions and entities in soa.
这段查找代码类似于会话或实体bean 中的代码。
This lookup code is similar to code that's in the session or entity beans.
在这种情况下,实体bean顶层的会话bean将确保整个企业应用程序间对数据的操作统一、一致。
In this case, a session bean layered on top of an entity bean will ensure uniform and consistent data manipulation across the entire enterprise application.
例如我们将把实体Bean和会话Bean放在不同的JAR中,之所以这样做是因为较大的J2EE应用程序常常是由若干JAR或项目组成的。
For example, we will put entity and session beans into different JARs, since larger J2EE applications are often comprised of several JARs, or projects.
EJB技术的两种类型是实体bean和会话bean。
Two types of EJB technology are entity beans and session beans.
SnippetsEJB项目包含一个实体bean和四个会话bean。
The SnippetsEJB project contains one entity bean, and four session beans.
SessionEJBAccountManagement 担任Web应用程序或客户端的会话虚包来访问实体EJB,因此支持远程接口。
Session EJB AccountManagement acts as a session facade for Web applications or clients to access entity EJBs and thus supports the remote interface.
在这种情况下,会话bean将对实体bean执行查找。
In this case, the session bean will perform a lookup on the entity bean.
无状态会话bean的受欢迎程度不象实体bean那样大起大落(请参阅侧栏)。
Unlike entity beans, stateless session beans have not ridden a roller coaster of popularity (see sidebar).
应用推荐