X

Shay Shmeltzer's Oracle Development Tools Tips

Hot Deployment in JDeveloper 12c - Don't Stop/Start Your App

Shay Shmeltzer
Director of Product Management - Oracle

Old habits are hard to get rid off, and I still see long time users of JDeveloper (and also many new users) who are stopping/starting their application on the embedded WebLogic each time that they make a change or addition to their code.

Well you should stop it! (I mean stop stopping the application).

For a while now, JDeveloper has support for hot deployment that means that when you do most of the changes to your code you just need to do save-all followed by a rebuild of your viewController project - and that's it.

You can then go to your browser and reload your page - and the changes will be reflected there.  This will not only save you the time it takes to undeploy and redeploy your app, it will also reduce the amount of memory you use since frequent redeployment of the app on the embedded WebLogic leads to bigger memory consumption.

In the demo below I use JDeveloper 12.1.3 to show you that I can just do the save->rebuild and pick up:

  • Changes in the JSF file
  • Changes to the JSF configuration file adfc-config.xml
  • New classes that are added to both the model and viewController projects
  • Changed to the ADF configuration files (pagedefs, data binding, data controls)

So for most cases, you should be covered with this hot-deployment capability.

There are some cases that will require a redeploy of the application (for example if you add a new skin css file, or if you change some runtime configuration of your app in web.xml) but for most cases you don't need to continue with the stop/start habit.

Join the discussion

Comments ( 10 )
  • guest Sunday, July 12, 2015

    Hi Shay,

    Thanks for sharing this info, we certainly shall use it. Another thing, which I would like to know if there any development to do a hot deploys into a standalone WLS? This feature would greatly help.


  • Shay Monday, July 13, 2015

    guest - you should look into WebLogic's Hot-Deploy and FastSwap capabilities in the product's doc.

    Also into setting it in the JDeveloper preferences->Run->WebLogic


  • Chandresh Patel Tuesday, July 14, 2015

    We have been using this for a quite some time now. We are setting "Fast Swap" in JDeveloper Preferences - Run - WebLogic section, which has worked much better than "Servlet Reload". We were seeing ClassCastExceptions with "Servlet Reload" option. Now we just save a file and there will be a message in console about it and it's gets picked up right away for most files.

    One thing we have noticed is that at times WebLogic crashes(with "Fast Swap"), when we put a break point. It continues to reload files correctly if we don't put a break point. We have been able to resolve this issue by doing a Clean All on workspace and deleting application folder in system..../o.j2ee/drs folder, but some times we have to start new instance of system folder using -J-Dide.user.dir on jdevW.exe command line to resolve this issue.


  • Florin Marcus Wednesday, July 29, 2015

    I have tested this feature and it works nicely with small to medium JDeveloper workspaces.

    Then I was checking it against a large Forms-2-ADF migration, where the 'master' workspace contains around 20 projects. "Rebuild" takes around 3 minutes to run, while restart - only 40 secs.

    Probably an extreme use case, but I thought it worth mentioning.


  • Praveen Monday, August 10, 2015

    Hello Shay

    Changes in VO.xml,adf taskflows will be reflected with this new feature? Like adding new attribute to ViewObject or changing the query etc.

    Thanks


  • Anant Wednesday, September 2, 2015

    Hi Shay,

    Does the hot deploy in 12c also pick up changes from ADF libraries on which the view controller project depends?

    Thanks,

    Anant


  • guest Tuesday, December 29, 2015

    Hi

    I am using JDeveloper 11.1.1.7

    we are deploying the portal app as standalone application in integrated server.

    The portal app has Dependency JARS and few JARs are deployed as shared library.

    For any change in jsff , we are redeploying the application.

    How do we resolve it?


  • guest Tuesday, January 5, 2016

    guest - the feature I showed is new in JDev 12, since you are using an older version of the platform I would suggest that you would look in the documentation for WebLogic hot-deployment.


  • guest Tuesday, November 29, 2016

    Hi Shay, I am running 12.2.1.1 and I have the hot class reload policy set to Fast Swap, but I get an error if I use lambda expressions - java.lang.ClassFormatError: Class file version does not support constant tag 18 in class file. If I switch to Servlet Reload, the error related to lambda expression is gone, but I get another error: ADF_FACES-30200:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.

    I can reproduce this in a very simple project with a single page, fragment, task-flow and backing bean. All my teammates were able to reproduce it as well in a newly setup environment.

    Any suggestions?

    Thanks!


  • Daniel Merchan Wednesday, September 12, 2018
    Sadly, you cannot use FastSwap when your Java has JDK 8 Lambda Expressions.

    Is there any patch for this?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.