ejbhome and initialcontext caching


Performance and scalability: ejbhome and initialcontext caching

  1. ejbhome and initialcontext caching (2 messages)

    hi all,
    im looking into strategies concerning caching of ejbhome references and initialcontexts in weblogic 5.1, using the service locator pattern.

    does this have a proven effect, or does wls cache these things in the jndi implementation?

    and, does caching the homes have any security sideeffects?

    any pointers would be helpful.

    morten wilken
  2. well most of app servers usually implement home object caching. i know WebSphere does, not sure bout WebLogic.

    Anyway its still a good idea to cache Home and initial context objects. makes your app more portable across app servers. remember not all app servers cache them.

  3. I have an additional question on the strategy for ejbhome caching:
    I have created an EjbHomeFactory as described in the EJB Design patterns book. For every type of home interface, I store one instance returned from the jndi lookup in my factory.

    Recently I saw some code that kept a whole pool of instances for every type of home interface.

    Have I created some kind of bottleneck in my code? Does this mechanism prevent me from scaling my app because all beans will be created through the same home interface? Or is the code I saw needless complex?