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
client)?
Does this violate the EJB specs or is an acceptable workaround?
Regards
vinoth.c
-
Threading delegate in EJB (3 messages)
- Posted by: vinoth chidambaram
- Posted on: February 08 2001 05:18 EST
Threaded Messages (3)
- Threading delegate in EJB by Justin Van Vorst on February 08 2001 10:04 EST
- Threading delegate in EJB by Dave Wolf on February 08 2001 22:15 EST
- Threading delegate in EJB by vinoth chidambaram on February 09 2001 05:22 EST
-
Threading delegate in EJB[ Go to top ]
- Posted by: Justin Van Vorst
- Posted on: February 08 2001 10:04 EST
- in response to vinoth chidambaram
According to EJB specifications, you cannot call or use Threads from inside the EJB container.
-JC -
Threading delegate in EJB[ Go to top ]
- Posted by: Dave Wolf
- Posted on: February 08 2001 22:15 EST
- in response to vinoth chidambaram
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
Sybase
-
Threading delegate in EJB[ Go to top ]
- Posted by: vinoth chidambaram
- Posted on: February 09 2001 05:22 EST
- in response to Dave Wolf
Hai dave,
Will you give me with small snippet code how
to do threading in JMS.----(1)
Architecture
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
applet.
Am i right------------------(2)
Regards,
Vinoth.C