
In WebSphere, JVM arguments are set via server.xml configuration which is quite unusual.

Jrebel demo how to#
The hard part was to figure out how to configure JVM arguments. The Dockerfile above packages JRebel distribution into the image. '-Xshareclasses:none -agentpath:/tmp/jrebel/lib/libjrebel64.so']])"

RUN wsadmin.sh -lang jython -conntype NONE -c "AdminConfig.modify(AdminConfig.list('JavaVirtualMachine', \ĪdminConfig.list('Server')), [['genericJvmArguments', \ Hence, the corresponding Dockerfile will get a little more complicated: Next, as we want to enable JRebel, we also need to package the agent binary into the image, and also we need to modify JVM arguments of the application server. You also need to invoke a script to actually deploy the application: call wsadmin.sh by providing it a snippet of Jython code.
Jrebel demo archive#
]]')"Īs you’ve noticed, it is not enough just to copy the application archive to some folder. '[ -appname petclinic -contextroot /petclinic -MapWebModToVH \ RUN wsadmin.sh -lang jython -conntype NONE -c "AdminApp.install('/tmp/petclinic.war', \ Let me explain some interesting bits of the outcome.įirst of all, we need to derive from the base image, package the application archive into the new image, and make sure that WebSphere will deploy the application when it starts:įROM ibmcom/websphere-traditional:profileĬOPY target/petclinic.war /tmp/petclinic.war With the help of the article I have assembled a demo project that deploys a Petclinic application on WebSphere running with JRebel in Docker container. The developerWorks' article demonstrates it pretty clearly, what needs to be done in order to get WebSphere running in Docker and deploy a web application. The good news is that there is a WebSphere Docker image that you can use for development. WebSphere Application Server is available for Linux and Windows platforms, but not for MacOS. For instance, if you’d like to try JRebel on WebSphere AS and you are using MacOS, then you will have to take another route. However, there are some exceptions to that. Configuring JRebel agent for the server is also quite straightforward. You can just download the zip archive, and start the contain either from command line or via IDE integration. Getting any Java application server up and running in the development environment is usually a fairly simple task.
