Discussions

EJB design: Local Interface

  1. Local Interface (6 messages)

    What is the advantages using local interfaces in EJB?can you please suggest the details about this?

    Threaded Messages (6)

  2. Local Interface[ Go to top ]

    Hi !

    The main advantage of LocalInterfaces is that we get rid of the costly remote call.

    In previous version of EJB, due to lack of local interface, the call to the bean lying within the same VM prove to be very costly due to network overhead involve.

    Since, if 2 beans are in same VM-area there is no need to bring in the stub & skeleton story. The pass simply by should be references & thats what happen with local interfaces. They play with ref. rather than copies.

    Now, many Application Servers Vendors went thru their own implementation to cut, remote calls off. This lead much towards a non-standarized world. It all ended with Sun introducing LocalInterfaces.

    I hope u got the idea.

    Let us know of anything else.

    Thanks.
  3. Hi Moiz,
     as you have explained local interface are for local call within the same JVM. How does an EJB-to-EJB call behave when I have configured dependent ejbs resources as local interfaces to another EJB and the deploy all the ejbs over a cluster.

     Will the server always route such calls from the originating EJB to the instances of EJBs in the local VMs even though it is in a cluster and the local instance may not be available or it will have some magic behaviour to convert the local to a remote call over the cluster to any other clustered server.

     Thanks in advance.

    Kam
  4. How Local Interfaces Behave in Cluster[ Go to top ]

    hai Kam :
      local interfaces just like the pure javabean, just bc that there is no stub ,no remote reference!so u can think that if in Cluster , it will act as a bean actor,and as I know ,the local interfaces will be referenced by the SB which packaged in the same jar.
     
    steff
  5. How Local Interfaces Behave in Cluster[ Go to top ]

    Hello Steff,

        You used the phrase "bean actor" in your response. I am not familiar with this. What does it mean? I thank you.

    Sincerely,
    jonnie savell
  6. How Local Interfaces Behave in Cluster[ Go to top ]

    Jonnie :
       that is the description of the action with Local Interfaces,bc the Local Interfaces is the EJB category,but the function of it is most like the java bean,so I called it 'bean actor'
    Steff
  7. Local Interface advantages[ Go to top ]

    1.performance
    2.can pass non-Serializable parameters between component
    that is all