Stubs & Skletons

Discussions

EJB programming & troubleshooting: Stubs & Skletons

  1. Stubs & Skletons (5 messages)

    Hii

    In the case of EJBs, how many stubs & skeletons are created and who does create them ??

    Shoj

    Threaded Messages (5)

  2. Stubs & Skletons[ Go to top ]

    In the case of EJBs, how many stubs & skeletons are created and who does create them
    There is one stub/skeleton per EJB class. The EJB server's compiler tool creates them. This happens (a) when you deploy the EJB to the server or (b) by pre-compiling the EJB using the servers EJB compilation tool (for example, the "ejbc" tool for Weblogic).
  3. Stubs & Skletons[ Go to top ]

    Hii

    In the case of EJBs we have both Home Objects & EJB Objects, what both of them have stubs & skeleton ??

    When we do a look up for an EJB we get the Stub of Home Object corresponding to the bean & when we call the create method on the Home Object Stub we will get the Stub of EJB Object

    Is this correct ??

    Thanks
    Shoj
  4. Stubs & Skletons[ Go to top ]

    When we do a look up for an EJB we get the Stub of Home Object corresponding to the bean & when we call the create method on the Home Object Stub we will get the Stub of EJB Objec. Is this correct
    That's correct.
  5. Stubs & Skletons[ Go to top ]

    Thanks Strack

    So the conclusion is we have two stubs

    & 2 skletons

    Shoj
  6. Stubs & Skletons[ Go to top ]

    Well ... it depends.

    So far as I know, two stubs is correct. But I have seen some EJB servers optimize by creating a single "combined" skeleton on the server-side to handle both home and remote invocations.

    You have to be careful about sweeping generalizations on how EJBs work "under the cover", because different EJB vendors implement the gritty details in a variety of ways.