Scott,
Your explanation on 2 was what I thought I remembered reading about EJB's.
Although this is a "skewed" viewpoint, I remember thinking of EJB's the same
way I think of a Visual Basic exe. The VB "model" is essentially
threadsafe, so a VB programmer develops his code without any concerns
regarding thread execution, as the VB "container" handles it for him. I
have not yet had time to delve into EJB's, so I may change my initial
"comparison" after actually coding a few EJB's.
Thanks for the information!!!
Celeste
-----Original Message-----
From: Scott Stirling [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 1:53 PM
To: JRun-Talk
Subject: RE: beans vs ejb's (was "RE: Ist it possible to seperate EJB
and Servlet Server?")
> From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
{snip]
> Also, to my knowledge, EJB's are a single threaded model,
> i.e.. they do not support multi-threading. Or did I miss
> something in my reading of EJB's?
1. The EJB spec says EJBs cannot create threads. Most app servers don't
actually enforce this restriction (or others, like the ability to read or
write a file, or the ability to open a socket), but you can enforce it via
programming practice or Java security policies.
2. EJBs themselves are generally implemented by the container as
single-thread model, but the container creates lots of them, so the
single-threadedness is transparent to the client. The EJB server has leeway
to implement the EJBs in a variety of ways (not sure how many ways are
really viable for performance or J2EE-compatibility issues), but the
container has to ensure that EJBs are thread-safe and that the container can
handle multiple concurrent clients. So, in short, EJBs may not be
multi-threaded internally, but the containers maintain the apparent behavior
that they are.
Scott Stirling
JRun QA
Macromedia
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists