Stateless Session Bean accessing ordinary java object


EJB programming & troubleshooting: Stateless Session Bean accessing ordinary java object

  1. Hi,

    I would like to know more about the consequences of stateless session bean accessing an ordinary java object. This java object is not an Entity Bean. I need to use this java object as a wrapper to access the 3rd party API that I want to encapsulate within my app.

    Session Facade-->OrdinaryJavaObject---->3rd Party API.

    All kind of suggestions/feedbacks are welcome.. I'm primarily interested in synchronization, performance and scalability issues in a scenario when there are 20 (simple case) stateless session beans trying to access this ordinary java object that inturns encapsulates the 3rd party API...

    Thanks in advance,
  2. Why would there be any difference between using an "ordinary" java object with a java object from the Java library (e.g String) ??

    Your concern should actually be more on the 3rd Party API that you mentioned about.
  3. 3rd party API calls[ Go to top ]

    The only concern I can think of is to make sure that the 3rd party API adhere's the bean contract requirements in the EJB spec (no threading, no non-constant statics, and so forth). The EJB spec is available at javasoft. If the 3rd party API breaks the bean contract, you'll want to do some thorough testing before relying on it in production.

    Derek C. Ashmore
    (Author of ThreadWorks)