会话bean和实体bean之间的差异,以及有状态会话bean和无状态会话bean [英] Differences between session beans and entity beans, and stateful session beans and stateless session beans
问题描述
,它们是什么?
我的意思是SSH是Spring Struts和Hibernate,其实我不知道他们三个与EJB有一些关系?
而且我想知道这个bean是EJB上下文中的概念吗?当我们谈论其他框架像SSH时,我们从来没有说过bean?
什么是bean
在EJB的上下文中,bean是由容器管理的类。
在会话bean和实体bean之间
会话bean表示逻辑,而实体bean表示持久对象。这些天,实体bean不再用于JPA实体。
状态会话bean和无状态会话bean之间的区别
一旦获得对状态会话bean的引用,您将始终使用该特定实例。无状态会话bean被汇总并随机返回给客户端。
这些概念只存在于EJB中
是的,虽然bean也存在于Spring框架中,具有相似的含义但不同的设计概念。
是EJB与SSH的一些关系
您可以通过SSH使用SCP部署EJB。但严重的是,您似乎混淆了SSH与...?
I use SSH for a some while, and some friends ask me what is bean, and difference between session bean and entity bean, and difference between stateful session bean and stateless session bean, is those concept only exists in EJB(I also want to ask is EJB some relation with SSH), or they are general concept? and what are they?
what i mean SSH is Spring Struts and Hibernate, actually i do not know they three has some relationship with EJB?
And i want to know is that bean is concept in the context of EJB? And when we talks about other framework like SSH, we never said bean?
解决方案what is bean
In context of EJB, bean is a class managed by the container.
between session bean and entity bean
Session beans represent logic while entity beans represented persistent objects. These days entity beans aren't used anymore in favour to JPA entities.
difference between stateful session bean and stateless session bean
Once you obtain a reference to stateful session bean, you will always use that particular instance. Stateless session beans are pooled and returned to the clients at random.
those concept only exists in EJB
Yes, although beans are also present in Spring framework with a similar meaning but different design concepts.
is EJB some relation with SSH
You can deploy EJBs via SSH using SCP. But seriously, seems like you are confusing SSH with...?
这篇关于会话bean和实体bean之间的差异,以及有状态会话bean和无状态会话bean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!