Closed OndroMih closed 8 years ago
Maybe is time to
@Payara_Fish is it possible you guys cooperate/promote this maven plugin https://t.co/koseP201IF ? @javaee_guardian @Java_EE #ApacheMaven
— Gilberto C. Andrade (@Gilberto_gca) May 10, 2016
I've tried some maven plugins [1]. The best one is the TomEE Embedded Maven Plugin [2]
[1] https://github.com/gilbertoca/jsf-sandbox [2] http://tomee.apache.org/tomee-embedded-maven-plugin.html
Ugh. I would consider hot-deploy exploded application for development only. In no way that should be the way apps are run in production. This is one of the worse vestiges from the 'old bad days' of doing things, prior to containers, CI and CD.
Hello everyone, i want to notice that hot-deploys works very well and should be used only for development purpose. Something like hot-deploys on production environment could be a nightmare. What we should do with currently working transactions/ threads during hot-deploys? Should we use plugins to achieve this? How it could affect to application architecture? I think this is something like crazy things and we should stop discussing them :)
But, you can use EJB remote interfaces, split application to some modules and deploy / redeploy these modules separately. It should work. But why do you need this ? :) How this can help to earn more money for your business? :)
All these things looks like overengineering. Try to stay lean with Java EE. POJOs save the world! :)
I think that the questions about hot-deploy were targeted for development environment. AFAIK, noone uses JRebel in production too. However, for development purposes, hot-redeploy is a very nice thing, reducing development time and increasing programmers' happiness.
Payara Server does not provide a solution for hotdeploy out of the box. However, recently I was testing http://www.hotswapagent.org/ with Payara server, and it work like a charm with my sample application. The configuration to get this running is not straightforward and requires some steps to do, but I was able to get it running in Netbeans. You may see more details in #715. I plan to post a blog about this once I find some time.
@gilbertoca, we've noticed your previous suggestion on Twitter, I'm sorry if you received no reply from the Payara team. We certainly consider either to contribute to existing glassfish maven plugins (including the one you mentioned) or derive a plugin supported by Payara, which would be compatible also with GlassFish.
I think hot deploy is good for...
1) development: save very much time 2) production: I would consider levels of redeploy, one more simple where we need to change some class that do internal logical without connection to database or other kind of servers, and if I just change the .class file in the deployment directory, Payara detects the change and recharge the file in memory. Other more complex situation is to change a Controller/CDI-injected/Database connected/etc .class file, but it would be great in a second moment of Payara devel of hot-deploy to allow changing of any kind of files.
I have an environment where the webapp is deployed in separate files, not just one .war file. This saves much time, allowing uploading new .xhtml/images/etc files fastly without sending all the app again.
The time to redeploy all the app is more than 5 minutes, there are many modules.
On my opinion deploy / re-deploy classes to application server is bad idea, really.
As was mentioned earlier:
What we should do with currently working transactions / threads during hot-deploys?
As you say:
one more simple where we need to change some class that do internal logical without connection to database or other kind of servers
Ok, but i think this internal logic may be used for some calculations or something else and finally will affect database.
If you want to customize some logic (formulas, some algorithms) look at Nashorn. Moreover with Nashorn questions are the same (working threads, transactions....)
So there is no silver bullet to achieve partial re-deploy. Application modularity can be easily achieved with remote EJB interfaces and you can to deploy these modules separately. But the same story with (threads and transactions) :)
Ohh, i have an idea :) Before re-deploying module you can freeze the transaction service, and unfreeze after deploy. :) But this looks like crazy thing.
To summarize:
Take also a look to the Manik-Hot-Deploy Eclipse plugin supporting hot deploy https://github.com/imixs/manik-hot-deploy/wiki
Just a remarck, Payara Micro supports hot redeployment (in exploded war with a touch on a .reload file in the root directory). But if you hadve a user session, it will be lost.
I've seen people asking the following question: