Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
JRebel allows for newly compiled code to be redeployed without restarting the application. I am wondering if there are any alternative (free?). The FAQ page answers this question, but I am sure it's biased towards JRebel. This question was asked a year ago on this site, but I am bringing it back up to see if anyone has any new information.
One additional note, I am working on an open source project, and they offer free one year licenses to people who can prove they are on an open source project. Which works great for me (www.kuali.org), but I won't be on that project forever.
Take a look at DCEVM, it's a modification of the HotSpot VM that allows unlimited class redefinitions at runtime. You can add/remove fields and methods and change the super types of a class at runtime.
The binaries available on the original site are limited to Java 6u25 and to early versions of Java 7. The project has been forked on Github and supports recent versions of Java 7 and 8. The maintainer provides binaries for 32/64 bits VMs on Windows/Linux. Starting with Java 11 the project moved to a new GitHub repository and now also provides binaries for OS X.
HotSwap support: the object-oriented architecture of the Java HotSpot VM enables advanced features such as on-the-fly class redefinition, or "HotSwap". This feature provides the ability to substitute modified code in a running application through the debugger APIs. HotSwap adds functionality to the Java Platform Debugger Architecture, enabling a class to be updated during execution while under the control of a debugger. It also allows profiling operations to be performed by hotswapping in versions of methods in which profiling code has been inserted.
For the moment, this only allows for newly compiled method body to be redeployed without restarting the application. All you have to do is to run it with a debugger.I tried it in Eclipse and it works splendidly.
JRebel is free. Don't buy it. Select the "free" option (radio button) on the "buy" page. Then select "Social". After you sign up, you will get a fully functional JRebel license key. You can then download JRebel or use the key in your IDEs embedded version. The catch, (yes, there is a catch), you have to allow them to post on your behalf (advertise) once a month on your FB timeline or Twitter account. I gave them my twitter account, no biggie, I never use it and no one I know really uses it. So save $260.
But its a licensed version and cost is very high its very worthy for me to buy 10-20 developer license.Any one know any open source or less costly licensing product which i can use for Hot deployment of Java classes as like JSPs OR JSF so i do not need to restart the server again and again for small Java class change.
You can make a search on the same topic in StackOverflow or Google and you'll find plenty of questions like your own. None of the alternatives are at the same level. You may take a look at Play! Framework, for instance, but that will require you to change the technology stack for your current project.
You may know from our Spring Boot overview that Spring Boot is an open source, microservice-based Java web framework. The Spring Boot framework creates a fully production-ready environment that is completely configurable using its prebuilt code within its codebase. The microservice architecture provides developers with a fully enclosed application, including embedded application servers.
Spring Boot is just an extension of the already existing and expansive Spring frameworks, but it has some specific features that make the application easier for working within the developer ecosystem. That extension includes pre-configurable web starter kits that help facilitate the responsibilities of an application server that are required for other Spring projects.
While Spring Boot is the clear favorite, it could be worthwhile to explore other frameworks. These alternatives are not all in Java, and some may be better for certain types of development (i.e. creating reactive applications) than others.
Quarkus is a Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM. Designed with a container-first approach, Quarkus has a small memory footprint. It starts up fast, which has a positive effect on overall costs and resources.
Server-side-oriented web applications are no longer tied to only the Java world; you can write a world-leading application in JavaScript as well. Node.js is a server-side run-time environment that is built on the V8 JavaScript engine, so it can compile and execute JavaScript code.
Python is one of the most popular programming languages, and when it comes to choosing the best framework for web development, Django is the perfect choice. It is a high-level Python web framework that is packed with dozens of extras to handle common web development tasks.
While both frameworks look good and are open source, you must keep in mind that they are from different programming worlds. But if you are a Python developer looking for a good framework for your web development, Django is the right choice.
After covering two non-Java technologies, we are back with Vert.x, which is a toolkit used to build reactive applications on the JVM. The main parts of Vert.x are Verticles and Event Bus. Verticles are pieces of code that are being executed. The Event Bus is the nerve system of any application that is using Vert.x and is allowing Verticles to communicate with each other.
Another interesting thing is that Verticles can be written in different languages. This is possible because of the polyglot nature of Vert.x. If you want to try out Vert.x, you can generate a new application here.
Spring Boot is a mature, open-source, feature-rich framework with excellent documentation and a huge community. By choosing the market leader, you can be pretty sure the framework has the functionality and flexibility to match your more complex use case.
If you are using Java as your main language, JRebel can help. JRebel skips the redeploy phase, allowing developers to load code changes immediately. Try JRebel free for ten days to see how it works with your tech stack.
Pavel is a Solutions Consultant at JRebel by Perforce. Pavel is passionate about helping Java development teams increase development efficiency with our tools, while providing continued support for ongoing success.
The installer is a plain executable JAR file, which you can start with java -jar DCEVM-installer.jar . In Linux, I usually start this with admin privileges (using sudo), because it will add/modify files in the Java installation, which is usually read-only for standard users if installed system-wide: sudo java -jar DCEVM-installer.jar
I was usually successful with installing DCEVM as an alternative engine, which is less intrusive and very transparent. The DCEVM engine can then be enabled by a command line option only if you want it and you can have the same Java installation for both running third-party Java programs and development.
If starting Payara Server from IDE, you may have to apply the step 2. and 3. in the configuration of your IDE, because the Payara Server plugin in most IDEs bypasses the standard Payara Server configuration and starts Payara Server with the Java runtime and command line parameters specified in the IDE. Mind that in that case, you have to use the full path to the hotswap-agent.jar and avoid using the $com.sun.aas.instanceRoot variable.
The web application is deployed from an exploded directory called application-war (not to be confused with a war file package) so that changes in resources like XML or JSF pages are also picked up automatically. Most IDEs support building a web application as an exploded directory. Maven also stages the application in a directory in the target folder before creating the WAR file and you can deploy your application from that directory using Payara Micro.
Now, you can debug the application in a standard way from within NetBeans. The IDE will automatically compile all classes, update them in the server. It will also copy all changed resources into an exploded directory which it used to deploy the application so that these resources are refreshed too, because Payara Server monitors them for changes.
How do I make these files change aswell with JRebel? Or is there another way to update the content which is not Java some simple and quick way without the need of a complete restart?
Any ideas would be greatly appreciated.
No, there is no other way to do so. As far as workflow is a concern, you can reduce your frequency of restarts up to some extent by using Activiti community instance to design and test your workflow. You can export process file (xml) and use it once you're done.
There is an alternative to this hot-reloading. You can upload your bpmn20.xml (workflow process file) at the following path in the Alfresco repository in order to deploy it without restarting the server.
I think its gradlew idea or gradlew eclipse which sets this same output dir as build dir. Are you saying we should override default behavior? Only advantage with same dirs is when dev is using jrebel and we want build system to support this.
Then we have Eclipse community who use it mostly as editor and use command line for most of their build needs. They also expect their changes picked by JRebel immediately after they do incremental compile from Gradle command line.
Starting of app is from Gradle - gradlew start-tomcat. Essentially, its all about which directories should jRebel monitor. What we dont want is extra configuration that each dev has to do based on what IDE he is using.
Right now only directory we share with IDEs is build/classes/main and nothing more. Our resources also go in the same directory. It has worked reasonably well except the reported file permission issue.
ff7609af8f