-
1. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
maxandersen Mar 20, 2012 7:17 AM (in response to xsalefter)Depends what kind of hotdeployment you refer to.
if updates to xhtml, html etc. kinda content then it should just work out of the box and changes should show up as soon as you refresh the browser.
if you are changing .class or .jar's then there has never been such support in any AS version (except for seam components which did a classloader hack to implement such)
In that case you have a few options in latest jboss tools release:
1) when you have done such changes right click on the module and click "Restart" and it will redeploy the module (without restarting the server)
2) if #1 is to cumbersome and you really want to restart the module on any .class file change then change the field in the server editor that currently says "\.jar$" to "\.jar$|\.class$" and it will also restart the module on every class change.
3) if #1 and #2 are too cumbersome consider using something like JRebel which is the only way to get something like "full hotdeployment" running on any java based system afaik.
-
2. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
xsalefter Mar 20, 2012 7:47 AM (in response to maxandersen)Hi max.. Thanks for your reply. Ok.. then we should talk for jsp/xhtml/css/javascript only.
Max Rydahl Andersen wrote:
if updates to xhtml, html etc. kinda content then it should just work out of the box and changes should show up as soon as you refresh the browser.
But unfortunately this is not work in my case. My approach was either:
- Right click on the project -> run as -> run on server
- Drag the project to server instances.
Both of it doesn't work, and jboss as seems doesn't even "know" that there's a new project added to him. Then I looking where the projects actually deployed by "right click on the server" then "explore". I see my project deployed on <eclipse-workspace>\.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_7.1_Server\deploy. This is by design? How jboss as know that there's a project need to deployed?
Any suggestion? FYI, (if this matter), i'm running 64bit version of windows 7, eclipse, and JDK.
Thanks,
xsalefter
-
3. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
maxandersen Mar 20, 2012 8:00 AM (in response to xsalefter)1 of 1 people found this helpfulhmm - if you are seeing that then your are not using a JBoss 7 Server adapter.
It should go into <serverhome>/standalone/deployments.
What server adapter are you using ?
What are the settings in the server editor under deployments ?
-
5. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
rob.stryker Mar 21, 2012 3:34 AM (in response to xsalefter)Recent changes have allowed us to use the management API to add and remove deployment scanners for folders such as .metadata in the same way that older jboss versions allowed us to use JMX to dfo the same.
Beta3 has committed code that allows a newly started up as7 to deploy to that .metadata folder and still have the app server pick it up.
-
6. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
geekkit Jun 8, 2012 7:27 PM (in response to xsalefter)This screen shot helped me. I'm new to JBoss so I was perplexed why I couldn't see changed automatically. IMO it would be better to have this as default.
-
7. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
maxandersen Jun 11, 2012 4:13 AM (in response to geekkit)Which default are you referring to exactly ?
-
8. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
lukasw44 Jul 15, 2012 4:50 AM (in response to xsalefter)Hello i use Jboss tool and i dont know why when i click button (green) "Start Jboss" i have got deploy 2 folder into deployments dir
1) lupa ("myprojectname" )
and
2) lupa.war ("myprojectname.war")
Why i have got 2 folder ?? its a bug ?
and i have got another problem because i have got my own dependency :
<dependencies>
<groupId>my-common</groupId>
<artifactId>my-common</artifactId>
<version>1.0</version>
</dependencies>
and i have got this jar in maven local repository but when my project use hot deploy i havent got this jar in WEB-INF/lib folder ?? i have got all library such as spring byt i haven 't got my own jar ?
plz help
-
9. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
geekkit Jul 16, 2012 10:23 AM (in response to maxandersen)Auto-deploy expanded (i.e. directory). By default hot deploy is only set to WAR files and not directories. Rather silly oversite IMO.
-
10. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
lukasw44 Jul 16, 2012 4:36 PM (in response to geekkit)But i have got error in jboss that this folder havent got content type war ....
my lupa.war project deploy fine but i have got also error that i have got folder lupa
so its bug in configuration jboss tool ?
And i dont know why jboss tool dont expadnd my own jar ?
-
11. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
henk53 Jul 22, 2012 5:16 PM (in response to maxandersen)Max Rydahl Andersen wrote:
Depends what kind of hotdeployment you refer to.
if updates to xhtml, html etc. kinda content then it should just work out of the box and changes should show up as soon as you refresh the browser.
if you are changing .class or .jar's then there has never been such support in any AS version
Actually, the support was there but it almost seems as if was a kind of hidden support that everybody plain forgot about.
The JVM infact does support class reloading natively, via a mechanism called hotswap (see this for some more background: http://java.dzone.com/articles/reloading-java-classes-401). As long as you're only changing code inside a method's body, the JVM will happily accept the changed class. The (WTP) deployer has to cooperate though and really deploy updated .class files. If the change is incompatible with what the JVM accepts, it should warn about that.
This has always worked in AS 4, 5, and 6.
-
12. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
maxandersen Aug 2, 2012 8:24 AM (in response to henk53)Henk - yes, this is what happens when you run in Debug mode and eclipse warns you if it can't hotswap the content of the classes via the debugger.
but this is not about updating the deployed artifacts, this is done via remote connections to the JVM.
Thus again, JBoss does not currently nor before actively pick up changes in changed .class files; if it did everything, would be fine because the WTP deployer actually do update the .class files
-
13. Re: Best Practice for Hot Deploy in JBoss AS 7 for JSF 2 + CDI + EJB 3.1 + JPA + Maven Project
geekkit Aug 2, 2012 10:08 AM (in response to henk53)Actually, the support was there but it almost seems as if was a kind of hidden support that everybody plain forgot about.
That's really what chased me away from using JBoss AS. There are some great features but the documentation is lacking and it's not worth the effort to chase down details.