热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Question: What is Session Bean?
Answer:

A session bean is a non-persistent object that implements some business logic running on the server. One way to think of a session object is as a logical extension of the client program that runs on the server.

Session beans are used to manage the interactions of entity and other session beans,access resources, and generally perform tasks on behalf of the client.
There are two basic kinds of session bean: stateless and stateful.
  1. Stateless session beans are made up of business methods that behave like procedures; they operate only on the arguments passed to them when they are invoked. Stateless beans are called stateless because they are transientthey do not maintain business state between method invocations. Each invocation of a stateless business method is independent from previous invocations. Because stateless session beans are stateless, they are easier for the EJB container to manage, so they tend to process requests faster and use less resources.
  2. Stateful session beans encapsulate business logic and state specific to a client. Stateful beans are called 'stateful' because they do maintain business state between method invocations, held in memory and not persistent. Unlike stateless session beans, clients do not share stateful beans. When a client creates a stateful bean, that bean instance is dedicated to service only that client. This makes it possible to maintain conversational state, which is business state that can be shared by methods in the same stateful bean.

保存以便复习

收藏此条目、标记为困难题,或将其加入复习集合。

打开我的学习资料库
这有帮助吗?

Most helpful rated by users:

版权所有 © 2026,WithoutBook。