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?
According to EJB specifications, you cannot call or use Threads from inside the EJB container.
This does indeed violate the EJB spec. One option would be to use JMS and a Message Driven Bean to simulate multiple threads.
Internet Applications Division
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)