[英]Turn Managed bean into EJB
Is it possible to turn a Managed bean into an Enterprise Managed Bean? 是否可以将托管Bean转换为企业托管Bean? Would you give some example?
你能举个例子吗?
For turning a POJO bean class into an EJB, add the @Stateless
of @Stateful
annotation and implement the @Remote
or @Local
(or both) interfaces. 对于把一个POJO bean类为EJB,添加
@Stateless
的@Stateful
注释和执行@Remote
或@Local
(或两者)接口。 Of course some additional configuration steps will be necessary, but that depends on the particular application server you're using. 当然,一些额外的配置步骤是必要的,但这取决于您使用的特定应用程序服务器。
Do something along these lines: 遵循以下步骤:
@Local
public interface ServiceLocal {
}
@Remote
public interface ServiceRemote {
}
@Stateless
public class ServiceEJB implements ServiceLocal, ServiceRemote {
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.