0 Replies Latest reply on Mar 23, 2007 2:37 PM by natebowler

    Access to SLSB threadpool - throttling EJB usage

    natebowler

      I expose a public API that is backed by a SLSB. As these are publicly available in an environment where multiple tenants are accessing the application, I would like to throttle API usage for each user.

      My thought is if I could access a threadlocal or context setting for SLSBs in the pool, I could determine how much concurrent usage is happening in my system.

      2 questions:

      1) Is there a better approach to accomplishing this?

      2) If this technique is as good as any, how can I access the thread pool and/or SLSB pool during a request in order to make this work?

      Thanks.