Java – do I need to use @ remote when I want to expose EJBs to different applications on the same application server?

I have a @ stateless @ local bean successfully deployed in my ear When I browse the JNDI tree, I can see the new EJB 3.1 standard global JNDI name (Java: global / product / product EJB / Product Manager)

I want to use this EJB in different applications on the same application server Do I need to add a remote interface for this EJB?

Solution

The specification does not require inter - application access to the local client view, but the container may choose to support it If you want your application to be portable, you should not rely on it and use remote interfaces (a decent container should optimize calls within the same JVM) From EJB 3.1 specification:

reference resources

>EJB 3.1 specification

>Section 3.2 Section 2 "local client"

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>