I want to change GWT's v. 2.7.0 embedded Jetty version v. 8.1.12.v20130726 to later jetty v. 9.2.22.v20170606, because for some reason Atmosphere
websockets do not work with jetty 8 version (while it works with 9).
To make sure that it's Jetty that's causing problems for Atmosphere (and not GWT super dev mode), I deployed application.war to tomcat/Jetty servers:
Tomcat 7.0.79: works
Jetty 9.2.22.v20170606: works
Jetty 8.1.12.v20130726: does not work
I found a thread asking quite a similar question, GWT: Jetty version in dev mode, and I would like to expand on that. If I were to implement ServletContainerLauncher , would it not conflict with JettyLauncher ? How should I go about writting my own ServletCotainerLauncher for dev mode?
If you have any better ideas then writing my own ServletContainerLauncher, I would like to hear them.
GWT 2.8 underwent specific modifications to make this possible - it wasn't simple, though if you review the commits, you could probably make the same changes.
Instead, I strongly urge you to consider moving to GWT 2.8.2, the latest version of GWT, released just a few days ago. The version you are using, GWT 2.7.0, is almost three years old, and has a number of other bugs that have been resolved since then.
Related
I wonder if the GlassFish project is dead or still alive? I am realy a fan of glassfish from the early first days. I started projects with GlassFish2 and have lot of customers using GlassFish3.
Since a few months I try to migrate some of my projects to GlassFish4. But I did not really have success. The problem for me is, that I can't find support form the community. It's hard enough to find a forum. To me it looks like Oracle had did a lot to stop any community driven development.
In the mean time I migrated my main project to Wildfly 9. In contrast to Oracle's GlassFish, RedHat's Wildfly is working perfect. There is a vital community, where you can ask questions and discuss open issues.
So I wonder what is the sense of the GlassFish project? Is it just the place where the 'reference' implementation can be hosted. A reference implementation which is (and maybe should not) be productive ready?
What did you think about this project?
GlassFish is absolutely still alive, there was a new minor release just a few days ago. It is still the reference implementation for Java EE, so you can expect GlassFish to be around for as long as Java EE is.
Oracle's other application server, WebLogic, still doesn't even fully support Java EE 7 - both they and IBM seem to have similar strategies of maintaining stability in their "full-fat" releases while being more "bleeding edge" with GlassFish for Oracle and the Liberty Profile for IBM's WebSphere.
It's also important to take note of the Payara project, which provides support for GlassFish, but also is actively looking for and fixing bugs in the upstream codebase. Some of the bugs which have been fixed in Payara have now also been incorporated to the latest GlassFish 4.1.1 release.
Finally, your point about whether or not GlassFish is "production ready" doesn't take into account the amount of GlassFish which is comprised of other projects, like Apache Catalina, Jersey, EclipseLink, Weld and others. These are the same technologies used in JBoss EAP, WebLogic, Tomcat etc.
It's difficult to get a good idea of activity in the GlassFish project, but it's easy to see how active Payara is.
Edit: David Delabassee has tweeted that the first nightly build of GlassFish 5.0 is now available to download
There do seem to be forums at www.java.net/forums/glassfish-0 and https://community.oracle.com/community/java/java-ee-java-enterprise-edition/java_ee_sdk but not very active as you've probably seen. There seems to be more information on the mailing list, the archive of which you can see here https://java.net/projects/glassfish/lists/users/archive
It is hard to find any information about the development plan is, so I think (especially as Oracle would like you to move to Weblogic and pay them lots of money) that its aiming to be a reference implementation.
Having said that, we've been using Glassfish for quite awhile and have been using Glassfish 4 in Production since April this year. What problems are you having migrating your projects?
Z
I have two questions:
1. Which Jetty version is used by GWT 2.5.1 in dev-mode?
2. Is there a way to change this version?
6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml)
Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106
Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use org.eclipse.jetty rather than org.mortbay.jetty as a root package so there shouldn't be any problem (with the old GWT pre-2.6).
FYI, gwt-dev will be split into several JARs in the next version of GWT (or maybe the one after that) and the dependency on Jetty will be moved to an optional JAR, and will possibly be updated as well. (note though that GWTTestCase also depends on Jetty)
EDIT: this finally happens with GWT 2.8, but Jetty is needed for SDM (CodeServer) and Jetty has a bad track of backwards compatibility.
I did several projects using Seam 2 on JBoss5/6 and liked the feature that certain java classes (usually GUI handlers and util classes) could be put in a special src folder and be hot replaced through a special class loader after saving the file and an explode target running automatically afterwards.
Now I like to switch to Java EE 6 + CDI and use JBoss7, so I started with a maven based Java EE web project generated by JBoss tools in eclipse Juno. If I only change xhtml files, I can see the changes after the automatic re-publish, but not so with changes in java files.
Is there a way to get a similar behaviour in my new project setup than I had before with Seam 2 without using 3rd party tools like JRebel?
Edit 2012/07/23:
I add another point to the question - with newer containers like JBoss7, restart of an application seems to go quite fast - so is it even necessary trying to integrate code replacement tools and hoping for the best?
When I evaluated JRebel about a year ago for that stack (Java EE 6 / CDI / JBoss AS 6), even that tool did not cope with CDI. This might have improved in the last 12 months, but generally speaking:
I'm not aware of any advanced hot-deployment support of Java EE 6 on JBoss AS, with or without tooling support.
(If you read the thread to the end the situation seems to be better for GF, but that's out of the scope of your question)
Take a look at JRebel. CDI parts are constantly being improved and although there's still a way to go, it can be quite a time saver. If you find the cases when JRebel fails to deliver, report at the forum and the devs will do their best to improve the experience.
In regards to the second question, even if container startup takes no time, like in case of Tomcat or Jetty, the application deployment time will not get much faster and might still take considerable amount of time.
So the answer is - yes - code replacement tools are still relevant even with the lightweight containers.
I'm currently struggling with the project setup while implementing a Java EE 6 application with Eclipse Indigo and JBoss 6. The application server and the IDE is pretty much set in the project. Maven 3 is used and was the base for the setup by using the WELD archetype and creating a WAR.
Now, the problem is, that I'm very disappointed about the development turnaround. I don't have a working automatic redeploying within eclipse and often need to restart JBoss since it gets confused with the new publishing and then is not able to redeploy correctly. This is very frustrating and time consuming. (Plus I feel the smirks behind me from the guys preferring script languages.)
From earlier projects we were using Seam 2 and the project created by seam-gen came with a somewhat decent republishing, although I still had to do a manual application restart whenever I changed Java classes. Then, from playing around with Netbeans 7 and the integrated GlassFish 3.1 I found that automatic redeployment was working ok. And since Java EE 6 is very wide spread, I assume, there must be a better setup than I have now.
So with this post I hope to get some more insight in having a good project setup for fluent development of Java EE 6 based WAR projects on JBoss and eclipse - who can share some best practices?
Thanks a lot!
You should use JBoss Tools plugins for Eclipse. JBoss Tools 3.3M2 is compatible with Indigo and JBoss AS 7 (which is 10 times faster than JBoss 6 for redeploy).
Regarding an equivalent to Seam Gen with CDI, you should really take a look to Seam Forge which is included in JBoss Tools 3.3 now.
Finally I'm using Jrebel to reload class and configuration without restarting the server. But for now it doesn't work yet with JBoss AS 7, so if you stick with JBoss AS 6 it's a goof combination.
This might not be the answer to your question, but if you want Java and fast turnaround look at http://www.playframework.org/ your script colleagues will be astounded.
For Eclipse to work well, use Eclipse Java EE edition and then add the JBoss server adapter.
The usual WTP-tooling then works for automatic deployments etc.
In the scope of deploying small Java EE web applications at various client sites, I am searching for an easy application server solution.
I think I remember hearing that it was possible to use Jetty as a JavaEE 6 lightweight application server but I can't seem to find more evidence on this right now on the web.
Knowing that my development environment is JSF2 + RichFaces, CDI (Weld) and JPA 2 => NO EJBs at this point), is Jetty a possible solution for me?
If yes, could you point me to some docmentation or specific keywords helping me?
If no, what other lightweight Java EE 6 application server should I use?
Jetty is a servlet container, just like Tomcat. At the moment it's utterly unsuited as a Java EE 6 application server since the core requirement for a servlet container in that stack is being a Servlet 3.0 container.
Jetty 7, the latest stable version, is still at Servlet 2.5. At the moment nobody knows when Jetty 8, which will support Servlet 3.0 will be released, but experimental releases can already be downloaded. See http://www.eclipse.org/projects/project-plan.php?projectid=rt.jetty
Even when Jetty 8 will eventually be available, you'll of course still need to add JSF2 (Mojarra), CDI (Weld) and JPA2 (Hibernate).
Currently lightweight alternatives are Glassfish V3 (especially the Web Profile version). This weighs in at a 47MB download and gives you the full web profile. Glassfish starts up in approximately one second on modern systems and something like 2 or 3 on older ones. Memory overhead is minimal.
Yet another alternative is Caucho Resin. It's an inch away from being Java EE 6 Web Profile certified (see http://caucho.com/resin-4.0/changes/resin-4.0.14.xtp), and for all practical purposes is already fully useable as a Java EE 6 application server. Although I haven't personally used Resin, being lightweight seems to be their top priorities.
(do note that 'lightweight' is a vague and much disputed term)
Finally, you could give JBoss AS 6 a spin. Few people would call JBoss AS 'lightweight' (startup time on fast hardware is at least 12 seconds, and its download size is 181MB), but its free and open source and depending on your definition of lightweight those numbers may be 'good enough'.
I was very happy with a solution very similar to yours but using Spring 3 instead of CDI. It's almost the same. Everything was bundled inside WAR and for development mvn jetty:run was enough. No local app server needed.
However I'm sure you can embed Weld CDI implementation inside WAR. Still I'd prefer either "real" CDI JEE 6 stack or Spring.