java ee server similar to cassini - java

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.

Related

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.

Java EE Download Link

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/

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.

Java web development environment to minimize build-deploy-test cycle time?

What Java web development environment is the best for absolutely minimizing the build-deploy-test cycle time?
Web development environment: JBOSS, Tomcat, Jetty? Deploy WAR exploded? Copy WAR or use symbolic links? There are factors here I don't know about.
Build-deploy-test cycle? The amount of time it takes to test a change in the browser after making a change to the source code or other resources (including Java source, HTML, JSP, JS, images, etc.).
I am looking to speed up my development by reducing the amount of time I spend watching Ant builds and J2EE containers start. I want the Ruby on Rails experience --- or as close as I can get.
I'd prefer a solution that is web framework agnostic, however if a particular framework is particularly advantageous, then I'd like to hear about it.
Assume all the standard tools are in use: Hibernate, Spring, JMS, etc. If stubbing/mocking support infrastructure is required to make this work, I'm OK with that. In fact, I'm OK with having a development environment that is very different from our production environment if it saves me enough time.
You should probably take a look at Javarebel:
http://www.zeroturnaround.com/javarebel/
and this thread here:
How to improve productivity when developing Java EE based web applications
JBOSS uses Tomcat for its servlet/JSP engine, so that's a wash.
Tomcat does support hot deploy.
Jetty's pretty small and starts quickly, but it doesn't support hot deploy.
Eclipse is merely an IDE. It needs a servlet/JSP engine of some kind. If it's like IntelliJ, you can use any Java EE app server or servlet/JSP engine you'd like.
IntelliJ is pretty darned fast, and you don't have to stop and start the server every time you rebuild. It works off the exploded WAR, so things happen fast.
Building (used to be compiling) is a a sign of our times. We need quick validation of our thoughts and our actions. Whenever I find myself building to many times it is usually a sign that I'm not focused. That I don't have a plan. For me this is the time to stop and think. Do a list of things that need to be done (this is web framework agnostic) do them all and test them all after one build.
Jboss Seam together with the Jboss Developer Studio is good for hot deploying everything aside from EJBs (SLSB, SFSB and Entities need redeploy).
Have you considered Grails?
Deployment is as fast as it can get with Google App-Engine + GWT (optional) + Eclipse Plugin.
Never seen anything faster.
Maven 2 and eclipse. mvn eclipse:eclipse <- pure awesomeness. Also, WTP within eclipse works great (and maven generates working WTP projects).
Small web containers will load faster than overloaded webcontainers with the kitchen sink built in (.. cough .. jboss ).
Some design decisions slow build times (e.g. aspect-weaving based toolkits add an aspect-weaving phase to compile times).
Avoid building components that can only be tested after long elaborate load cycles. Caches are a prime culprit here. If your system has deep dependencies on a global cache scattered everywhere you'll need to load the cache every time you need to test something.
Unit-testable components, so you can run pieces instead of the whole thing.
I find that projects built reasonably compile, deploy, and startup in a few to 10 seconds, which is usually fine.
GWT in eclipse is probably the fastest I can think of. Using the hosted mode browser for your tests you can debug and change your code without restarting anything. Just need to click the refresh button in the browser and the changes are there (java, css, etc). One other thing is that GWT is adding this same support to normal browsers (Firefox, IE, Safari) so you can debug from within them the same way. These changes are coming in 2.0. See http://code.google.com/events/io/sessions/GwtPreviewGoogleWebToolkit2.html
Have you tried using Eclipse Java EE and then tell it to deploy to a server managed by Eclipse? Tomcat and JBOss works pretty well in this way. Also allow you to change code in a method, use Ctrl-S and have the class updated inside the server.
MyEclipse also works pretty well like this.
JRuby on Rails. Develop on whatever platform you want, deploy to standard Java servers.
I think the best way to avoid the long build deploy tests cycles is writing unit tests for your code. This way you can find bugs without waiting for the build/deploy phases.
For JSP you can edit the JSP files directly in the JBOSS work folder:
> cd $JBOSS_HOME/server/default/tmp
> find -name myJspFile.jsp
./tmp/vfs/automountd798af2a1b44fc64/Jee6Demo.war-bafecc49fc594b00/myJspFile.jsp
If you edit the file in the tmp folder you can test your changes just hitting the browser refresh button.

http/AJAX (GWT) vs Eclipse gui for thin client deployment

I am starting a project for which we will have a thin client, sending requests and getting responses from a server.
We are still in the planning stages, so we have a choice to settle on either an Eclipse based GUI (Eclipse plugin) or using GWT as a fromtend for the application.
I am not very familiar with Eclipse as a GUI (Nor with GWT) but do know 'normal' Java.
What would be the main benefits and drawbacks of either approach?
Edit: Addressing the questions posed:
The project, if Eclipse based, would be using the core Eclipse gui (No coding tools, just bare bones) and the GUI would be packaged with it.
I have been looking at GWT and so far seems the best choice, but still have some research to do.
Communication method is a variant of CORBA (In house libraries)
If you are thinking of using Eclipse to build a standalone client or a plugin that's just added to an existing Eclipse install, how are you planning to communicate with your server?
Our team tried building an Eclipse Rich Client Platform application and having that communicate with a J2EE EJB-based middle tier over RMI, and that worked pretty well, except for when we got to security and couldn't use any of the standard J2EE security patterns to create a login on the Eclipse client that would authenticate against the server.
This seems to be a known issue in Eclipse circles, but I haven't seen anything thats a good solution for it.
GWT seems pretty advanced for what it is, and there's several IDEs that added tooling for working with it, but I have no first hand experience developing with it. Everything that I have seen in terms of demos and examples makes it look really powerful and easy to use.
So my basic point is, Eclipse is an exciting platform, but you will face difficulties which you might have to solve yourself. GWT seems to be an easier alternative for now.
Coming from someone who has just as much experience as you do (haven't developed any Eclipse based plugins or anything with GWT), this is purely an opinion from another set of eyes on your problem.
Purely from the standpoint of this application being served from a thin client, I would think GWT would fit the bill for this situation a bit better. It would certainly be a bit lighter and would not require the overhead that an Eclipse Plugin would.
I also think this would make deploying updates a lot easier.

Categories