Is Tomcat version 7 fully ready for production - java

I have a few modular and to some extend a little bit complex applications running perfectly on Apache Tomcat 6.0.32.
All of them are live except one, and I was thinking this would be a perfect time to make the switch to Tomcat 7.
I have not dig in too much in yet, but a simple trial test ran fine, and the selenium test suite runs fine too.
Is there something I should be aware of/start worrying about or can I just start rolling out the new version of Tomcat in production now ?
There's going to be some heavy data processing load dispatching involved, but not so many concurrent users.
Suggestions ? Comments ?
Note: I would like to hear some stories/feedback from the trenches, like am I going to get some performance decreases in some specific cases, is memory management working as good as claimed etc ... that kind of production questions.

Yes. The previous company I worked for have been successfully running 7.0.8 (while I was still there) on production, for about 5 months now already, no problems.

yes you can,
Because tomcat 7 is a stable release and current version is Tomcat 7.0.19
It implements Servlet 3.0, JSP 2.2, and EL 2.2 specifications.

I do not upgrade production servers unless I need a feature provided with newer version or there is some security bug. So rolling Tomcat 7 just for sake of new version makes no sense. I also found the new version less structured. If I could extract Jasper from 6.x quite easily, it was a bit more complicated for 7.x due more dependencies, so I can conclude that new codebase is lacking in quality.

Related

Replacing Weblogic with Tomcat?

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.

Is it worth upgrading to JBoss 7.1 from JBoss 5.1

Currently our production environment runs JBoss 5.1 and we have been debating whether or not its worth migrating to JBoss 7.1. If it was a simple server upgrade, then it wouldn't be a problem. But, unfortunately, we would have to change configurations and that would take some effort. Also, our server runs in a cluster and I read that JBoss 7.1 has more cluster support.
So is it worth it or not?
Thanks
We're currently in the same situation.
There seem to a a lot of things on the positive side:
We'll have to migrate off 5.1 at one point. We need full profile and there are not that many OSS alternatives (GlassFish and maybe Geronimo). That point alone will probably sell the migration since PCI-DSS forbids us to use EoL'd software.
The configuration is so much better and simpler. It's no longer spread over 20 XML files in which you configure aspects in XML files but one central place. All ports are configured in one central place, there is no longer an XSL file that transforms server.xml. You can make sense of the configuration file without knowing the implementation details of classes. It's hard appreciate this if you've never configured a JBoss.
The EJB remoting no longer uses a thread per socket.
Removing a subsystem you don't need is so much easier.
The class loding model looks sane and you get a lot of control through jboss-deployment-structure.xml
The EJB client library looks much more cleaned up. It's down to 10 JARs from 20, half of them are even OSGi bundles (our client is an Eclipse RCP application).
While we're not too excited about Java EE 6 replacing some of our SLSBs with #Singleton beans and some of our SARs with timer EJBs certainly looks interesting.
Faster start up and less memory usage (at least for an empty server or small deployments). We haven't yet tested a large deployment.
The deployments folder is empty by default
Things that we still need to look into:
We're a bit worried about Infinispan performance. We currently use the TreeCache API of JBoss Cache. While there is an adapter for Infinispan that provides the same API some theoretical tests show worse write performance. This only applies to the tree API of Infinispan.
ExternalContext is no longer supported, we currently use it to populate a JNDI tree from a .bindings file
JMX console is gone, if you have anything that builds on this it needs to be adapted, Edit there is actually a port of JMX-Console available AS7-2227
We don't run in a cluster so I can't comment on that.
What will probably be the biggest effort for us is migrating all the shell scripts (installation, integration tests, …) that interact in one way or another with JBoss.
Update
We have migrated and it was definitely worth it. Some updates to the points above:
Even large deployments are fast with minimal amounts of tuning.
The centralized logging (Slf4j, JUL, JCL, Log4j, …) is really nice.
7.1 has so many bugs it was unusable for us, so we are on 7.2 / EAP 6.1 and plan to go to 7.3 / EAP 6.2. Still has its fair share of bugs but we can work around them. We're especially looking forward to role-based access control for the management interface which will allows us to run our scripts with minimal privileges.
There will not be a supported version of GlassFish 4 which puts a big question mark on it for production use.
EJB remoting security is a lot less flexible. We had to put in some workarounds since previously we were mixing authenticated and unauthenticated EJB calls — this is no longer possible.
The JEE 6 BOM POM from JBoss is a mixed bag. In theory it is nice because it manages the versions of all you JEE dependencies. In practice the coordinates are horrible with the version in the artifactId which is going to be annoying when we migrate to JEE 7. Also it isn't very helpful when you want to include an implementation of a JEE API for tests.
Infinispan tree API performance was not an issue.
We replaced the JMX-Console scripts with DMR scripts.
Update 2
There is a deadlock when using EJB remoting over SSL. This deadlock is present even in EAP 6.2. We're now at the point when we have quite a patch set of features backported from WildFly to AS 7.
Is everything working on JBoss 5.1.0 for you? Is your performance something you can live with?
I'm currently in the middle of upgrading from JBoss 5.1.0GA to JBoss 7.1.1 and it has not been easy at all. You're basically upgrading to a new application server. You will need to budget a lot of dollars for this effort I'm guessing.
Having said that JBoss 7.1.1 is VERY fast compared to 5.1.0 (start up times at least). I think in the next 6 months (or so) most of the "hard" migration and transition issues will be fleshed out in the jboss forums or through bug fixes. At that point you and your team can reevaluate if you want to do the migration.
Good luck!
If you are using SSL, one advantage to upgrading is that JBoss 7.1.1 runs on jdk 1.7, which has support for TLS 1.1 & 1.2, while jdk 1.6 only supports up to TLS 1.0. JBoss 5 will not run on java 1.7 so you are susceptible to a BEAST attack.
Regardless, I'd wait a bit.
AS 5 is a EE5 server, AS 7.1 is a EE6 server (and EE6 spec came out in 2009). So that's alot of work for an excellent new runtime environment, but it won't give you any hot architectural possibilities.
The WildFly 8.0.0.CR1 is already due and that's EE7 server bringing you a bunch of new interesting developing possibilitites, like WebSockets and JAX-RS 2.0 (http://www.slideshare.net/dandreadis/2013-11devoxxwild-flybof). New admin features like Single Instance Patching. And it's not sure that AS7-to-WildFly8 will be a super-easy migration since som major new stuff is introduced, like Undertow instead of JBossWeb/Tomcat.
If you gotta go, you gotta go - and if U wind down the dead 7.x path, don't forget to get your hands on the much improved 7.2.0.Final tag (several hundred issues better that 7.1.1). But if you think you can start developing/migrating now using Beta/CR releases and wait some months for a nice production-stable WildFly 8.x.x release, you might be able to sit tight longer before next major update.
br,
Jens

which is best server for developing java web applications?

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.

Real world comparisons of Glassfish and JBoss 5?

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.

Running Apache Geronimo in production

If you're running Apache Geronimo in production why did you choose it over other application servers and what are your experiences with running Geronimo in production?
Can you also please share what servlet engine you decided to use (Tomcat/Jetty) and why you made this decision?
UPDATE: So far this question got two up-votes and one star but no answer. I'm starting to wonder, is anyone using Apache Geronimo at all? My logic would be, if you use Geronimo for development you'd also use it for deployment. Right? So, does that mean that no one is using Geronimo at all?
We definitely use Geronimo in production!
We have used the Tomcat version since 1.0, about four years ago as I recall. We are currently running mostly 2.1.1.4.
One of our apps gets about 1 million page views per day. The others are nowhere near that, but they are important apps that need to work well.
Our choice was based primarily on:
Price: At the time our company started using Java, we weren't sure what we needed out of an app server. So we decided to start at free and work our way up, if needed.
Basic features: I had experience with WebSphere (base/ND) and plain old Tomcat. Geronimo had the J2EE features we wanted, all within a lightweight package.
Open Source: Our primary client that we use Java for required Open Source.
Familiarity: Being an Apache-based server, we were already comfortable with Tomcat, OpenJPA, Axis web services, and others. Furthermore, we were comfortable with the Apache community as far as bug tracking and other minor things.
Support: We expected to be mostly on our own, but knowing that the Apache community was active was important. As was the availability of commercial support from IBM, as we are an IBM Business Partner.
Our experience has been great overall. The servers are very reliable. I search our logs once in awhile and sometimes see weird errors with a database connection, an EJB call, but those are pretty rare (and quite possibly our code's fault).
Performance is impressive. I joke that we could run Geronimo from my laptop and the clients wouldn't see a difference. Give it any decent server and it will purr along for months.
I'm not sure how many people actual run Geronimo. I'm rather confused about that. I've seen slides (years ago) that listed some big names like eBay using it. The mailing list is active but sometimes seems like only the Geronimo team communicating with each other.
The only serious bug I've run into is this one. It is a big deal to us, but of course Geronimo is free and I don't expect them to fix bugs that are important just to me.
I've been meaning to check out Apache TomEE server, wondering if it is more actively or openly used. Just to see how the community and usage compares to Geronimo.
WebSphere community edition is Geronimo. So IBM chose it as a platform of choice.
When choosing an application server, you're really choosing the APIs you want to use in your application and maybe the administration interface (but you only use that once in a while).
Answer to your update: It just means that SO users are not using Geronimo or are all busy voting and making witty comments.
There seems to be quite a bit of acivity on Geronimo's mailing list, and I would say that you'll get better results there.

Categories