4

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?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Alexander Rühl
  • 6,769
  • 9
  • 53
  • 96

3 Answers3

2

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)

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Jan Groth
  • 14,039
  • 5
  • 40
  • 55
  • 1
    JRebel works well from my perspective having used it to help create some demo apps for Seam and jdf. Also we're looking at our own solution done by Stuart Douglas (https://github.com/fakereplace/fakereplace) – LightGuard Jul 20 '12 at 16:31
  • There might be some corner cases in respect to CDI, which is the core of Java EE 6, but generally, JRebel does handle CDI related changes, like adding new CDI beans, injecting bean into another bean, etc. – Anton Arhipov Jul 20 '12 at 20:31
0

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.

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43
0

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.

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43