2 Replies Latest reply on Aug 4, 2009 9:47 AM by robert.geisler

    static ejb client stubs?

    robert.geisler Newbie


      in our project we used ejb 2.1 and JBoss 4.2.2. lately we migrated to ejb 3.0 and tested portability on WebsphereAS. this worked very well, but there was one clear conspicuousness... that is that WebsphereAS uses static ejb stubs, which the developer/ deployer has to generate and to deploy to clients.

      now we wonder how this is done in JBoss. we know about dynamic stubs aka. proxies; the server generates and the client downloads them; all automatically.
      and well, this is fine, because it is easy. but is it best?

      thats why i am asking you... can you please (link me to some documentation that) explain in detail how client-server-communication works?

      • when and how many times does the client download a stub for one remote business interface? how often does the server generate that stub?
      • is there a option in JBoss to use static stubs (as in WebsphereAS)? how does one generate these stubs?
        i guess, you allready noticed that i am asking because of performance (cpu for generating, network traffic for downloading). of course i know that dynamic stubs are easy, but i want to balance both options.

        thanks in advance.

        • 1. Re: static ejb client stubs?
          jaikiran pai Master

          From what i remember, WebSphere generates these static proxy classes during deploy time. I don't think there will be any noticeable performance difference of generating dynamic proxies (as JBoss does) against using static proxies (as WebSphere) does. I don't have any documents which can show you the exact numbers.

          • 2. Re: static ejb client stubs?
            robert.geisler Newbie

            thank, jaikiran, for your response...

            well, we learned that we have to generate the stubs explicitly by executing create_EJBStubs.bat in WebSphere installation directory that creates us a .jar file containing stub classes for EJBs in an .ear. we deploy this .jar with our standalone client later.
            the disadvantage i see is the additional effort in putting together client libraries. the advantage is, that the client do not need to download stubs again and again.

            at least this is how i think it is done by JBoss...? i imagine that our users download stubs again and again, whenever they start and stop the standalone client. or even whenever the client application does a remote lookup? or even whenever it does a remote call!?
            am i right? or is there something like caching on client side?

            this is the reason why i am interested in this... i would like to reduce network traffic by using static ejb stubs (in single server environment)... given that there is such a feature in JBoss...?

            thank you again.