-
Get an jrebel license file (jrebel.lic) from http://zeroturnaround.com/software/jrebel/offline-registration/ or by using the Eclipse tooling signup form.
-
Create or add the following items to your AS7 or EAP6 application:
a) mkdir /.jrebel
b) cp jrebel.lic /.jrebel/jrebel.lic
c) cp jrebel.jar /.jrebel/jrebel.jar
The presence of .jrebel/jrebel.jar is what we'll use to know if the jrebel agent should be added or not.
-
Add the following to /.openshift/action_hooks/pre_start_jboss
export JAVA_OPTS="-javaagent:${OPENSHIFT_REPO_DIR}/.jrebel/jrebel.jar -Drebel.log=true -Drebel.log.file=${OPENSHIFT_REPO_DIR}/.jrebel/jrebel.log -Duser.home=${OPENSHIFT_REPO_DIR} -Drebel.remoting_plugin=true"
-
Make sure you have created rebel.xml + rebel-remote.xml via the eclipse tooling (or manually)
The content automatically generated should suffice - no need to mess with it; ignore its using machine specific paths - it will work.
-
Now remember to git add and commit all this before you do git push. Note: the git push might report it cannot startup EAP6/AS7 - unless you made an error in above it is just caused by jrebel taking a bit longer to start but eventually your app should be ready.
-
Go set http://app-domain.rhcloud.com/ as the remote url in eclipse tooling.
Voila - you should be all ready to go and use jrebel remoting on OpenShift and have changes propogated more or less instantly via JRebel > Synchronize (or enable it to be automatically done for each build)