0

I just had a chat with a far more experienced and qualified colleague about JPA and application servers.

Right now, I am using JPA with Glassfish, which he says is a bad application server due to the amount of overhead. He also mentioned that he's using Tomcat, which is a standard, which also has a downside of not supporting heavy-weights like JPA in the Java EE. Then a few names are thrown around, like Hibernate and Spring, which I've heard of but not dealt with.

So my question here would be: What are some good choices for an application server that supports Java EE and JPA that's also popular and fast?

Note: I asked a similar question in the past and it was, somehow, closed as non-constructive. If you find this to be a non-constructive post, please write a response detailing why before closing this.

Some Newbie
  • 1,059
  • 3
  • 14
  • 33
  • 6
    Your question isn't a specific programming question and will lead to debate. There is no single answer. Your colleague might be biased against GlassFish and may throw around big words, but it would be more constructive to sit down with him and understand his reasoning (which needs to be based on real-world facts) for his opinion, rather than taking it at face value. – Rajesh J Advani Aug 22 '12 at 15:30
  • 1
    Popularity is somewhat objective. For instance I believe the Jonas Application Server (http://jonas.ow2.org) is *objectively* less popular than the mainstream ones (which doesn't mean it bad product). The top-tier application servers are Glassfish, Tomcat, JBoss, WebLogic, and WebSphere. There are too many parameter to judge the performance of an application server, it depends on the platform, hardware, JVM, features that are used, etc. – ewernli Aug 22 '12 at 15:53
  • Re: Rajesh, there are a lot of valid questions not specific to programming here anyway, so I don't think this question is going to any more "problematic" than the rest. I posted this question here knowing everyone can have different opinions, but whether or not it becomes a flamefest, it'd depend on the respondants' capacity for civil disagreements/discussions. But yes, I ain't taking everything at face value, which is why I am asking for an assortment of input from you guys! :). To narrow down my question a bit is: If I am only using JPA, is Glassfish a bad choice relative to some others. – Some Newbie Aug 22 '12 at 16:20

6 Answers6

1

As per me : The JBoss is the most popular and stable open source application server.

A good discussion available at Stack Trace

Community
  • 1
  • 1
Satish Pandey
  • 1,184
  • 4
  • 12
  • 32
  • define "most stable", "most popular"? If you're going to claim something, evidence is a prerequisite. If you have no evidence then it is a personal opinion based on some projects you've worked on ... hence "in my opinion" is required, rather than claiming something as fact. What does "most popular" mean in anything ? it may be deficient in many regards, yet popular (e.g the windows operating system). – DataNucleus Aug 22 '12 at 16:09
  • @DataNucleus Sorry.. I corrected it – Satish Pandey Aug 22 '12 at 16:12
1

What are some good choices for an application server that supports Java EE and JPA that's also popular and fast?

What server you choose depends on your needs. If you don't need in your application any of the EE features (EJB, transactions etc) then using a heavy-weight server doesn't make much sense and you could opt for Tomcat which is compliant (partially to the specs) lighter (doesn't have all these dependencies that you would not be using anyway) and gets the job done.

If you want specific reviews about all application servers then may be you should do some research and see ask which server suits you better for your requirements. But this is just my opinion...

Cratylus
  • 52,998
  • 69
  • 209
  • 339
1

I'm using Jetty with JPA Hibernate implementation, and it works really well. Out of the box, it is only a subset of JavaEE specs, but it is lightweight and can be extended with external libraries to add missing JavaEE parts.

(My standalone jetty-based application runs with 160MB available RAM on an embedded system)

Toilal
  • 3,301
  • 1
  • 24
  • 32
1

You can use JPA outside of a full Java EE server, but it has to be properly bootstrapped. I believe Spring has ways to do this, and would allow you to use JPA in tomcat, jetty, etc...

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Matt
  • 11,523
  • 2
  • 23
  • 33
1

I would recommend you to first understand your application needs, and understand why you need JPA.
I have nothing against JPA, but in some scenarios it may introduce a performance issue, that you don't want you application to have.
Having said that, I would recommend you to work with a server that supports EJB-Lite.
You can use for example JBoss as suggested above.
Another interesting option is to use TomEE , which provides a full stack of web-profile over tomcat.

Yair Zaslavsky
  • 4,091
  • 4
  • 20
  • 27
  • I am using JPA because it makes the ORM more easily maintainable. If I do the ORM manually, it becomes cumbersome having to keep track of the ordering and type of variables whenever something needs to be changed. So far, the bottlenecks' not in the layer that involves the ORM, which is why I am using JPA. I suppose one thing I'd like to know is if there's any comprehensive benchmarking done between say... Glassfish, Tomcat, JBoss, etc, on various domains? It's be convenient to be able to find something like that. – Some Newbie Aug 22 '12 at 19:02
  • Fair enough, this is your choice. I would recommend besides looking for benchmarks, which may address only specific use cases (and unfortunately I also saw biased behchmarks in the past) to use a profiler and to check your current application stack for bottlenecks. – Yair Zaslavsky Aug 22 '12 at 19:49
  • It's conceptually not a bottleneck because the limiting step is the long mandatory wait interval between script fire, so speed is not as important. As for objectivity, almost anything in this world is potentially biased (even your comments and mine), so the caveat of reading into benchmark is not about them being biased but whether or not the reader reads between the lines and also consult other benchmarks/reviews. – Some Newbie Aug 22 '12 at 19:56
  • 1
    I agree with you comment that we can say that anything in this world is potentially biased. I just wanted to be sure that you know that benchmarks should not be taken for granted. Unfortunately I'm not a user of glassfish. I've been Using JBoss since 2006, and I'm quite pleased with it, especially with JBoss AS 7. – Yair Zaslavsky Aug 22 '12 at 20:19
  • Ok, there are many votes on JBoss, so that's my most likely candidate for reading. I think one of the things I'd look for next is a binary comparison between Glassfish and JBoss and learn why people choose one over the other. Hope there are lots of articles on that in Google! On a side note: My colleague felt the question I asked is rudimentary - If it is that rudimentary, I'd like to know how all of you can make this rudimentary knowledge for you after graduating from college - Reading lots of books/API's? – Some Newbie Aug 23 '12 at 14:44
1

You have many options to choose Java EE application servers. Here is the comparison of popular Java EE servers from Wiki. They all are good application servers. But the most important thing is not server.Using a server that is more convenient for your developing environment is more important. Choose a server that is more convenient for you.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65