2 Replies Latest reply on Nov 15, 2012 10:08 AM by wdfink

    Is a remote EJB proxy cached?

    raylite3

      Hello,

      I have a Swing client that looks up various EJB on a server using the InitialContext. Does the JBoss client layer cache the proxy that I lookup? Is it considered best practice to cache the proxy in my application?

        • 1. Re: Is a remote EJB proxy cached?
          heyw

          Hi!

           

          If you use the ejb client library to invoke a remote stateless session bean, the proxy is created locally. There is no server-side round-trip to get a proxy. But, of course you can hold a reference of the proxy.

           

          You find a detailed description in the community documentation.

           

          Regards, Heinz

          • 2. Re: Is a remote EJB proxy cached?
            wdfink

            The Proxy mostly not contain server related information. It hold the identifier (ejb:app/mod/Bean!xxx), the distribution logic is stored inside the EJBCLientContext.

            You can cache the proxy in your application, also it is possible to serialize it and use in a different environment. The destination server depends on the client-context if the EJB is invoked.

            This is a big difference to former versions!