Threading delegate in EJB


EJB design: Threading delegate in EJB

  1. Threading delegate in EJB (3 messages)

    I would like to know whether threading can be done by a normal class in a
    EJB server which will be called by a bean.

    For eg: I have to retrieve around 2000 rows each from 10 different tables
    and aggregate them and send it to the client.
    So instead of sequentially accessing each table, can i write a class A which
    implements Runnable and spawns ten threads for acessing each table and
    aggregating the values(to be passed to the bean which will pass it to the

    Does this violate the EJB specs or is an acceptable workaround?


    Threaded Messages (3)

  2. Threading delegate in EJB[ Go to top ]

    According to EJB specifications, you cannot call or use Threads from inside the EJB container.

  3. Threading delegate in EJB[ Go to top ]

    This does indeed violate the EJB spec. One option would be to use JMS and a Message Driven Bean to simulate multiple threads.

    Dave Wolf
    Internet Applications Division
  4. Threading delegate in EJB[ Go to top ]

    Hai dave,

    Will you give me with small snippet code how
    to do threading in JMS.----(1)

    Applet will invoke EJB.EJB inturn call JMS.JMS
    will give the results back to the EJB component.
    The component wil response back to the
    Am i right------------------(2)