Den 9/19/11 1:44 AM, skrev Arved Sandstrom:
On 11-09-18 07:30 PM, Torsten Kirschner wrote:
Den 08.09.2011 23:41, skrev Arne Vajhøj:
On 9/8/2011 1:53 PM, nroberts wrote:
If higher ups decided that I had to work with Tomcat...no JBoss or
glassfish or anything...what limitations am I looking at? What parts
of Java EE become unavailable to me?
Tomcat is a web container only (Java EE Web Profile in
Java EE 6 terminology).
[...]
You don't have EJB, JCA, JTA, JMS etc..
[...]
Using the Spring Framework (
http://www.springsource.org/), one gets
most of the above, except EJB, I guess. Add Hibernate and you're set.
[... spherical cows in an EJB container ...]
The OP's clearly stated premise was being limited to a given web container.
Yes, and you've supplied a fairly decent chain of quoting. So, given
that he asked what would be unavailable if he was stuck with Tomcat, and
it was made clear that most of Java EE is unavailable (out of the box),
why not leave it at that?
The way I look at it is, if you shoehorn everything possible into
Tomcat, including Spring, just to make it act like a crippled Java EE
server, are you not subverting the point of sticking with Tomcat?
Presumably there is a reason why the OP could be limited to that servlet
container - suggesting ways in which it can be seriously modified (in a
less than optimal fashion) to not be just a servlet container anymore is
changing the premise.
Apparently the decision to move to Tomcat was simply one of
standardization. I think perhaps the decision was made a while back.
At any rate it was made without me for reasons I do not know. I was
told though, when I mentioned being worried that such limits could
increase development effort, that I can use whatever libraries or
extensions I need. This includes things like OpenEJB etc...
After learning more about these buzzwords and what they actually
implement though I'm starting to wonder what is left for EJB. I can
replace standard Java EE JPA with Hibernate as it implements it now.
I can pull in JSF with either the standard implementation or MyFaces
(and tobago or whatever looks pretty interesting). I can get
dependency injection with CDI; I'm thinking this gives me all the
advances in unit testing that EJB 3.1 gave us. I can get @WebService
with JAX-WS though I might not even want it.
Unfortunately, if I use OpenEJB I'm stuck with an older Tomcat as it
doesn't work with 7.0 yet. I tried a patched version that someone
released and it kind of worked I thought, but yesterday I found that
webservices were bugging out...either that or need a totally different
way of setting them up that would likely be a nightmare to figure
out. I spent a good day on it yesterday just trying to get the ejb
example webservices to work and the way I fixed it was to stop trying
to use a patched version and just downgrade Tomcat.
I'd rather not base a new project on old technology that's just going
to end up obsolete the next release if I can at all help it.
Another thing about the previous technologies I listed is that I can
put them in my app's WEB-INF folder; I don't have to install them in
Tomcat. Perhaps OpenEJB is the same way but I've not seen clear
documentation on doing so.
What is it that EJB offers me that I don't get with these other
standard technologies? I thought it was things like SessionBeans and
such, but if I use the CDI and JSF bits it seems like I get a lot of
the same behavior because I've got @ManagedBean or @Named. I'm
finding this confusing.