Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Which JEE technologies to use?

0

46 views

We're building a web service from scratch, right from deciding what JEE technologies to use.

It looks like Apache-cxf is a good choice as the frontend. For accessing database, Hibernate looks like a good candidate. What about the business logic in between? Should EJB3 be used?

If EJB3 is NOT used, is Tomcat is good candidate as the App server? If EJB3 IS used, is Tomcat still good? Or a full-fledged JEE server is better, GlassFishV3 for example?

asked April 30, 2011 5:54 pm CDT
posted via StackOverflow

2 Answers

2
 

Glassfish v3.1 using the EJB Lite profile is what you want.

It comes with JPA (based on Eclipselink), it comes with WebServices (JAX-WS via Metro), it comes with Local EJB session beans (part of the EJB-Lite profile). This lets you put the EJBs in your WAR, simplifying deployment. That gives you transaction demarcation at the session bean level, quite nice.

It's the whole stack, you don't have to install anything, configure anything, download jars from anywhere (save Glassfish of course). It's all built it.

Add NetBeans IDE, and you get the whole kit, including Glassfish.

answered April 30, 2011 6:23 pm CDT
0
 

Basically your are asking a question that most Java Developers did at some point or the other of their career. Should I go with a full blown application server or a simpler container with some open source stack above it. A couple of years ago I would advice you to go with Tomcat (or Jetty), Spring and whatever open source stack you feel confortable with. The lower turnaround time would compensate for the extra time needed to put everything together, your solution would be more "lightweight" and simple. Today Java EE 6 Web Profile is pretty simple and lightweight, GlassFish has a decent deploy and publishing time, and EJB 3.1 is far from being the monster it once was. You will just fire your App Server and pretty much everything is already setup for you (at the cost of, maybe, a little extra "service layer overhead" compared to using a "assemble it yourself" Frankenstein container). So, it is a matter of personal taste, your application may not need EJB (or Spring), or it may need it (and you can always go with Tomcat + Open EJB or EasyBeans as an alternative to GlassFish). As an experienced Java EE developer migrating to Java EE 6, I can say that I'm also wondering what approach is the best (see Jetty 8 + EJB 3.1 + JTA + CDI + JPA 2 stack?). Just not to leave you with a empty answer, currently I'm inclined toward GlassFish (as I said, the setup and turnaround time is pretty satisfactory, and I think it is a lot easier to scale using a GlassFish cluster than doing it with Tomcat + Apache + Load Balance + MemCached / Terracota / whatever). But take that (and any other answer you receive tending toward Tomcat 7 or GlassFish) as a matter of personal opinion.

answered April 30, 2011 6:32 pm CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview