An enterprise bean may not use thread primitives. I take this to mean
it cannot do this:
Thread t = new Thread(someRunnable);
t.start();
...or this:
synchronized (someGuard) {
doCriticalWork();
doMoreCriticalWork();
}
...or this:
Thread t = new Thread(someRunnable);
t.start();
t.join();
...but the specification seems to imply that it COULD do something like
this--and I hope I can:
ThreadDelegate td =
new BasicJavaObjectThatUsesThreadsAndSynchronizationInternally();
td.doWork(); // implementation works with threads
Is this true? If for some reason it is NOT true, doesn't this mean I
now have to know about implementation details of all the plain-Jane Java
objects my enterprise bean might use? Wouldn't such a thing blow
reusability out of the water?
If it IS true, then why can't an enterprise bean use threads directly,
as the invocation of td.doWork() in the example above occurs in the
enterprise bean's caller's thread anyhow?
Cheers,
Laird
===========================================================================
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".