Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

excluding classes from hot-reloading in Play Framework

I'm experimenting with the Play Framework and really like the experience thus far! Especially hot-reloading is a huge time saver.

However, I want to be able to exclude some class-instances from hot-reloading on a code-change. (For example I have configured some repositories which need a pretty long time to initialize and I'm sure the code of these repositories won't change) .

How would I indicate which classes / packages are disabled from hot-reloading?

Thanks, Geert-Jan

like image 947
Geert-Jan Avatar asked Oct 10 '22 11:10

Geert-Jan


1 Answers

One way is to have this code as a separate project in your IDE, and create a JAR file. Place this JAR file in the play lib folder when you have compiled and updated the necessary code. You could even do this reasonably straight forward with an ant script to compile the set of classes, and drop it into the lib folder.

There are other ways to approach this, but as far as I know, it would involve changing, or extending the Play framework, and I think this is overkill for what you need.

like image 152
Codemwnci Avatar answered Oct 13 '22 09:10

Codemwnci