What my Requirement is: When doing any sort of modification in my project's file(s), I want those particular files to get redeployed automatically without manually doing rebuild/redeploy/restart.
That is, I want changes to reflect on my webpage as soon as I change any file and save it. Changed file should automatically be redeployed in server.
What I've tried so far:
Changed standalone.xml file in JBoss for redeploying the app whenever any files gets changed. But this does not fulfill my requirement properly. Also this method generated Out of Memory error many a times.
Thought of using JRebel but it is not available for free.
Tried using DCE VM, but no help.
Please suggest any alternate as redeploying project manually takes a lot of time. I want to automate this process by deploying only the changed files in the exploded ear. I don't want to use any IDE.
Related
Can anyone suggest how to do the hot fix deployment for the nifi-famework generated war file.
I would like to make some css and js changes in nifi-web-ui under the nifi-nar-bundles and want the new build should be copied automatically each time i do the changes , to my nifi-assembly/target/...(parent directory).
Is there a way for an auto deployment, without doing the maven build everytime which is consuming a lot of time and how my latest changes can be reflected everytime without doing the build
I am trying to copy from
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/target/nifi-web-ui-1.8.0-SNAPSHOT.war
to
nifi-assembly/target/nifi-1.8.0-SNAPSHOT-bin/nifi-1.8.0-SNAPSHOT/work/jetty/nifi-web-ui-1.8.0-SNAPSHOT.war
Hello i would like ask how it is possible configure glassfish server for something like live, hot deployment:
every time when i change some code of my jsp,html,js or css file i always need to clean and build project than deploy project to glassfish and again, again and again. That cost a lot of my time. I waste time for that. It will be easy when i could work on files which already use a started glasfish (deployed). But this files is in WAR file "project.war" and through my IDE (Netbeans) i cant edit this files (jsp,css,html or js). Netbeans made this file non editable.
Do you have idea how to speed up my development? I Will grateful for help.
Here is my glasfish home folder and all of 2 deployed applications are empty
yes, you can. if you need change xhtml, js, css only you can do this after your war was deployed. You can find all the files in the folder of your application
****\glassfish-4.1\glassfish\domains\domain1\applications\MyWebApplication\
when you complete your changes you need copy them to project folder and rebuild war
I'm working with a decent sized application (300-350MBs) in my Eclipse IDE. All is well, but when I modify a source file (i.e. MyServlet.java), I can't see any changes until I clean the project, which in turn runs a project build. Due to the size of my project, this build takes about 3-5 minutes.
I guess what I'm asking is if there's a faster way to update changes made to my source files, so that whenever I need to debug, I don't have to wait 5 minutes for every minor change.
What I've tried so far:
Restarting the server
Refreshing the project
Restarting Eclipse
Committing to the SVN
Clearing my browser cache
There is a dedicated tool for that: JRebel. Problem is that you need a licence.
But what you really need to do is to recompile changed class. In your case if this is a Servlet you also need to deploy it to server (+some servers support 'hot-deploy' and some don't, I.e. do you have to restart the server)
I have got a maven project.
So when ever there is a changes done in java file, we take a rebuild of the application .
Put our ear file in deploy folder of jboss and restart the Jboss.
This waste our lot of time in restarting jboss again and again .
I heard about hot deployment in Jboss .
Can any one tell how to do in my case .
Hot deploy is enabled by default in JBoss AS 5.
It should start automatically a couple of seconds after you put ear in deploy folder.
Maybe someone had previously disabled hot deployment on your instance.
Then see Turning off JBoss hot deploy service? and do the opposite.
As I understand, u need a class reloading solution, not auto redeployment.
I recently work out a solution with JBoss 4.x. It probably work with JBoss5.x too. In most of time when I change my code, it reflects immediatly and no redeployment in JBoss.
Here is how:
Turn off JBoss hot deploy service, u can google how.
Create a folder named project.war under JBoss deploy folder, it just works like a war file.
User a file sychronize tools(like FreeFileSync) to sychronize your_project_web_root folder to the project.war folder.
The most important part, use spring-loaded. It's easy and no need to change anything in your project.
4.1 Download springloaded.jar
4.2 If u are using eclipse, just add the following code in the VM arguments of the JBoss Run Configuration.
-javaagent:/springloaded-{VERSION}.jar -noverify
That's it. Now u modify/add methods or fields in a class and then sychronize the class file to the project.war folder, JBoss will reload it and the changes reflect immediately. But springloaded still got some limitation, read the FAQ.
I am developing a sample web application in spring tool suite. I find that during the builds in the Tomcat local host, I loose all the data that was stored prior to the build. Data include directories and their contents that were stored by the applicatin prior to the new build. I use the sample application to store pictures. The problem is all of the pictures are lost after a new build. Is there a parameter that needs to be set to preserve the directories and the data. Is is this an expected process and that I need to backup all the application data prior to the build?
If I deploy on a cloud server using a .war file, will it behave the same way.
Please let me know if I need to post any files here.
Thanks
Balaji
Once you republish to Tomcat all new files form your workspace/project folder will be copied to the webapps folder, as well as all files in your webapps folder, which do not exist in your workspace, will be removed. If you upload files into f.e. webapps/YourProjectName/uploads/* directly, they will be removed because they do not exist in your workspace.
The best way is to separate your projects files (everything in your .war) from custom files like user data or uploads, by saving the the latter in a directory outside your webapps folder. Once you are republishing they are not going to be removed.
Otherwise, if you need something like 'example images' in your app to show to your customers (lets say they do not change that often) you can copy them into your workspace, so they will be republished every time.