I'm confused. There are lot of servers(GlassFish, Tomcat, Apache,etc.,). But which one is used to implement easy for developing web application? Please suggest me.
Thanks in advance.
Glassfish v3 is a slow starter (~30 secs), but its hotdeployments are fast. It happens in less than a second, regardless of what you've edited: JSP files or Java classes. At least, that was my experience in combination with Eclipse and the Glassfish Eclipse plugin. Things which may matter a lot. And as a bonus, you've the opportunity to play with the awesome Java EE 6 API.
Tomcat 6.0 is quick starter, in ~3 secs it's up and running. Hotdeploys of JSP files is acceptable, after ~3 seconds you can F5 to see the new one in browser. But hotdeploys of Java classes is sometimes troublesome. Sometimes it isn't picked up at all, or sometimes it takes too long that it's actually faster to manually restart Tomcat (which however takes "only" 3 seconds).
Take your pick. I'm just using both.
Tomcat: it's free, and it's easy to work with. It's also very widely used and has lots of documentation and "herd knowledge" e.g. here at SO.
If you don't need EJB then it's a good safe choice.
Edit: Tomcat was until recently the "reference implementation" of the Servlet/JSP, although as pointed out by commenters, Glassfish currently has that accolade.
I would go with either Apache's Tomcat or GlassFish.
Tomcat has the benefit of being around longer and having a broader group of users, but GlassFish comes from Sun itself. I've also heard that GlassFish's performance is above Tomcat.
The more commonly used "lightweight" servlet containers are Tomcat, Resin, and Jetty. They are lightweight because they implement only a few of the specifications (at the heart of which is servlet and JSP)/ The larger enterprise level applications JBoss, Glassfish, etc implement much more specifications on the server side.
I'd just suggest Tomcat. It's quick and easy to install, well documented, a support community behind it and very stable.
By experience i would say:
1.Apache Tomcat is quick in respoding to clients,easy to deploy apps,medium to install.
2.Glassfish is i think less quicj=k in responding,easy to deplu apps,easy to install,configure and use.
So i would suggest glassfish
I've usually used Tomcat with no problems. It's always been easy to setup and quick to deploy for me. Sometimes when using NetBeans I will use Glassfish too.
Related
I am investigating replacing Weblogic 10.x with Apache Tomcat for dev machines and I'd appreciate any insight or recommendations anyone may have.
The reason for replacement is probably known to anybody ever trying to do dev work on a production webapp server monstrosity - to improve dev efficiency. The application is large (several million lines of code), legacy codebase, containing a smorgasbord of technologies (Struts, EJB 2, EJB 3, to name a few) and changes to codebase frequently entail doing a redeploy/restart of web server (even with JRebel) - which takes a long time (to the tune of 5-10 minutes). That obviously wastes time, introduces frustrations and leads to mistakes.
What I'd like to know is - is it even tenable contemplating this replacement? The codebase would later on in dev pipeline be validated against a geniune WL instance but for the dev machines, I'd like it to be as lean as possible. This obviously won't be a trivial transition but I'd hate spiking a week on something that's completely impossible or, at least, absolutely inadvisable.
So obviously I'd need something implementing JavaEE spec (doesn't need to be officially validated - as long as it works :) ), so I've looked at possibilites and, to me, Apache TomEE looks promising. Geronimo is long dead, seems like, Glassfish is in limbo (?) and Jonas an unknown. Working under Java 8 would be a BIG plus (which TomEE 1.7 seems to support).
Lastly, we don't work with XA transactions (two-phased commits), so supporting that at least won't be necessary.
Is this a reasonable approach? Is there an alternative I am missing? Any experience doing the transition? Any thoughts are welcome.
long-time TomEE user here. We have been using TomEE in production for the past 3 years. We started off with bigger SOA on version 1.7 (Java EE 6) and a year ago upgraded to TomEE 7 (Java EE 7) for microservices.
Our stack is Kotlin, JAX-RS, CDI, JSON-B, BVal, mybatis for db (pgsql and db2), elasticsearch, hazelcast, kafka, akka-stream-kafka and akka. TomEE makes for a nice, small application server. On startup and initial garbage collection I think it runs around 30m heap usage (or less). We are starting to run Docker on Kubernetes.
WildFly has some cool stuff happening and seems like they are more active, and obviously they have a huge corporate company behind it.
We concur and run the setup that Adam Bien espouses, which is not going uberjar due to the size of docker images, transferring 128M containers vs smaller 5-20M, running on a full application server.
I've tried out WildFly Swarm, it's cool, and there is also a hollow-jar deployment where instead of a fatjar, you can deploy a war (meecrowave also supports this and I think Payara micro too).
I would put TomEE, WildFly (and Swarm), and Payara on my list of app servers to use to stick with Java EE route. If you consider a different direction, prepare to wade through a ton of information, articles, blogs, etc. Akka-HTTP? Play? Scala? Spring Boot, which just runs on netty/tomcat/etc? vert.x?
So many players out there to choose from. Find one that you like and works. For us right now that is TomEE.
I have never used something different than tomcat. For my current university project I programmed a WebApplication with JSF and Java EE 6. I have to hand it in installed on a VM with Ubuntu OS.
My fellow student told me that Tomcat7 is not released for Ubuntu (or is it?) and tomcat 6 doesn't provide Java EE 6 capabilities.
So I want to ask you if there is an appropriate alternative? Maybe something that doesn't have to require a lot of induction for a tomcat user.
Thank you for your help
I don't think Tomcat is release for anything.
They just put out a release, and V7.0 (I think as of 7.0.6) has now been declared production ready.
So just create your VM with Ubuntu, install Java, download Tomcat, unzip the bundle and install your application.
try the new Jboss, it`s really easy to use, almost the same from tomcat, and they should have for ubuntu( the new version) because they are from red hat too!
EDIT:
To clarify my statement before, Jboss it`s as easy as tomcat to deploy a simple J2EE app.
Glassfish is a well-known free open-source Java application server, but it's a bit more full featured than Tomcat and thus potentially more complicated (it has a full Java EE stack).
Jetty is more like Tomcat in that it's primarily a servlet container, you can take a look at that as well. Some projects (such as Grails) have switched from using Jetty to Tomcat for various reasons, but it may work for your needs.
I would go with Jetty, which damn fast and light.
But it does not support Java EE natively.
What are good alternatives? Glassfish/JBoss.
I primarily use Tomcat and Glassfish for Java EE development at work, but was wondering if anyone knew of any small application servers like Cassini for ASP.NET that would make building and testing faster? I would still eventually deploy to one of our production tomcat/glassfish servers, but would prefer something that is simpler and quicker.
I am probably going to take jetty and geronimo for a spin, any others I should check out?
You might want to check out JRebel which eliminates the need to do a redeploy on ~80% of the cases, making the development quicker.
jetty is good for testing, because it's very easy to start a jetty instance in your tests. if you're also concerned about faster development, then the choice of server is not the only factor.
there's also jonas and resin
This may not answer your question directly, but you may want to consider alternative Framework/Server combinations.
Here are a few Java RAD stacks that I have used in the past and work very well when trying to achieve a rapid development -> build -> test loop:
Spring Roo
Grails
Play Framework
Granted, these are not application servers in their own right, but each of them are frameworks/servers that can be used to achieve the results you are looking for. Roo and Play are both Java based, and Grails is Groovy based.
None of these solutions will work if you are looking for a plain container to deploy your application in to. These are more like all in one solutions.
(...) but was wondering if anyone knew of any small application servers like Cassini for ASP.NET that would make building and testing faster?
You should have a look at this Short screencast on GlassFish v3 session redeployment that shows the session state preservation across redeployments in GlassFish v3. Combined with the "deploy-on-save" feature (vs build and redeploy) offered by the GFv3 IDE plugins for NetBeans or Eclipse, Java EE development is very productive (even if GlassFish is not the fastest to start but well, you don't have to start it that often).
I was a big fan of Jetty but I must say that I just love these two features and consider them as direct answers to your concerns.
I know this is a stupid question and I really have been looking around for a few hours... but how can I get Java EE? I would like the Java EE and j2eeadmin tools. What do I download
I have downloaded and installed the jdk-6u16-windows-i586 (Java SE Development Kit 6u16 for Windows)
Can someone point me in the right direction? Thanks.
JavaEE sometimes hard to define
Oh, your question isn't so stupid. It turns out that downloading JavaEE is a slightly tricky thing.
If you go over to Sun, you will find this located at http://java.sun.com/javaee/downloads/. But that's actually a GlassFish d/l. It's fine, but if you go somewhere else you might end up with JBoss which will have its own container implementations and its own package of modules to load. JavaEE is a big umbrella of technologies, many of them quite clunky and obsolete, and in any case you develop and deploy a very specific collection of things, rather than a program which just loads classes from some bigger version of JavaSE.
Or, you might want to start with something even smaller, like Tomcat.
You might want to think more in terms of "how should I set up to develop for the xyz application server".
If you want to just play with JMS on your local computer, you could start with GlassFish from Sun. It will pretty much "just work" out of the box.
Yes, you get the full boat Java EE app server and stack as well, of which JMS is but a component, but at the same time it's trivial to install and get working. Especially if you add in NetBeans as the IDE, since it's well integrated with GlassFish.
That said, you certainly don't need an entire Java EE app server just to use JMS. There are many JMS compatible Messaging servers available. ActiveMQ is a single example.
I only suggest Glassfish because it has a great out of box experience in terms of download, install, start up and it's running.
If you want to work on configuring another option, there are several.
Also, I suggest GlassFish (or any full Java EE server) simply because even if you're just interested in JMS, you'll likely find that the Java EE Message Driven Bean (MDB) model actually works pretty well as a mechanism to leverage JMS. And it, too, is pretty simple to set up for the basic use cases. Once you have an MDB, you might want to talk to a database, and the Java EE server has connection pooling, etc. built in already as well. You also get transaction management with Java EE (which can actually be important with JMS).
Basically, while JMS alone is interesting, the other services are also compelling, even if you "don't need them yet". If you want to dabble with them, they're readily available in a full Java EE server, which promotes experimentation, and perhaps adoption.
So, starting with a GlassFish download can actually be an interesting door for learning and discovery things above and beyond JMS.
http://developers.sun.com/downloads/
Select the Java EE link. Select Java EE 5 (first option). One reason I didn't post the link directly is that you'll be sent to a different link depending on the operating system you are using.
see Java EE at: http://developers.sun.com/downloads/
Does anyone have experiences with both in the real world? How do they compare in terms of performance (memory usage, speed, etc)? Stability?
Does JBoss Seam work well on Glassfish?
A number of things from my own experience:
GlassFish has much better administration console
(JBoss has three consoles, each of them far from being ideal).
Hot deployment is more reliable on GlassFish
JMS works better on GlassFish - this applies to GF vs. JBoss 4.X.
As far as I see the JMS implementation was drastically modified in
JBoss 5.X, so maybe this claim is no longer true
WebServices are working better on GlassFish,
I had a number of issues with more advanced configuration on JBoss
GlassFish has more super-high-end entrprise add-ons, like HA-Database, that stores
user session on a cluster in Database, not in memory, so the full failover is
possible, whatever disaster would happen
JBoss is more much popular, there are a lot of administrators, developers, who know it,
so it is easier to find someone, who can develop on JBoss, there are also more
resources in the net. Sometimes this is more important, then technical superiority of
one solution over another.
GlassFish is friendlier for developers. Redeployment of the web application on GF 3
lasts more or less one second - in oreder to achieve this kind of speed
of redeployment for JBoss I need JRebel. In addition, if someone is using NetBeans,
there is a number of smart wizards, that are very helpful.
The future of GlassFish is not certain because of the acquisition of SUN by Oracle.
Right now Oracle claims it will support it, but who knows how this support will
look like and how long will it last. Even though GlassFish is open source, hardly
anyone is ready to develop application server for his/her own needs...
From my point of view GF is easier to administer, is a better solution from purely technological point of view, but it is far less popular and has uncertain future.
I am not connected in any way with RedHat/JBoss or SUN/GlassFish, my company (erudis.pl) is supporting and developing for both servers.
(disclaimer: I work at Sun and I am in the GF team)
I agree that Seam works fine on GlassFish; see https://blogs.oracle.com/theaquarium/tags/seam
GFv3 is quite different than JBoss 5; in particular:
GFv3 is based on OSGi while JBoss 5's kernel is based on JMX.
GFv3 supports JavaEE 6; JBoss 5 supports Java EE 5.
GFv3 is designed to be very modular; services start on demand, there is an update center repository, etc. GFv3 is significantly smaller than JBoss 5 and will start much faster. JBoss 5.1 GA is listed as 130MB; GFv3Preview is 50MB. GFv3 starts in a couple of seconds; JBoss in tens (you should try the startup for your own platform).
There are other differences, some inherited from GlassFish v2 like the graphical admin console, or the admin CLI.
A more direct comparison for JBoss 5 would be the GlassFish v2 releases, which are based on Java EE 5. The latest release in that family is GFv2.1, with a GFv2.1.1 release scheduled in October (see https://blogs.oracle.com/theaquarium/entry/schedule_for_glassfish_v2_1).
Sun also provides patch releases of GlassFish (akin to RedHat's support for JBoss); see https://blogs.oracle.com/glassfishforbusiness and sun.com/glassfish.
It's strictly what you're used to. I found configuring and using JBoss to be about as pleasing as trying to shave with a jagged spoon while riding a unicycle with no seat. Glassfish however, just seems to work.
My choice is Glassfish: it is faster to start-up, to deploy web applications.
the Admin console is very accurate, moreover it is both graphical and command-line.
Now it is fully-supported by Oracle, its future is not uncertain any more.
It is based upon OSGi: it is really modular.
You can install Spring-osgi applications easly.
You can freely choice between Eclipse Link , Apache Open JPA and Hibernate without pain.
It is greatly integrated in NetBeans (and, of course, Eclipse).
On the other hand, Jboss is more widespread and thus it is easy to find job on it (IMHO because it is an old App Server; glassfish is relatively new).
I started developing a Seam application on JBoss and after a few months tried to get it working on Glassfish. I found the Glassfish enviroment very counterintuitive. I had to fix some strange errors on GF and I could not find any information on the web so after a few days I gave up and went back to JBoss. So personally I would not recommend Glassfish.
I will have to go with Glassfish on this. Deploying a diverse range of application built on different webservices, we had major compatibility issues, resulting in customizing the class loading & still faced many issues. Glassfish I never faced any such issues.