>
> The SessionBean's client will know the number of requests to be processed
> and supply that as the argument to work().
>
> It would be very helpful if you could share your valuable opinions about
> this and suggest a problem.
>
Its possible but you need to have your helper class execute its thread creation inside
of
a privaledged block as below. You would also have to deploy your Helper class in a
jar that was in a codebase that has the modifyThreadGroup permission. Typically this
means placing the jar file in the -classpath of the VM running the app server.
class Helper
{
public void doWork(int noofprocess)
{
AccessController.doPrivileged(new PrivilegedAction()
{
public Object run()
{
internalDoWork(noofprocess);
return null;
}
});
}
private void internalDoWork(int noofprocess){
MyThread[] myThreads = new MyThread[noofprocess];
for (int i=0; i<noofprocess; i++){
myThreads[i] = new MyThread();
}
for (int i=0; i<times; i++){
myThreads[i].start();
}
}
}
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".