Adam Bien's Weblog
Starting WebSphere With Java EE 6 …In 3 Seconds--A Smoke Test
WebSphere Liberty Profile (WLP 220.127.116.11) can be downloaded with a single click. The installation archive is a 52 MB jar file: wlp-developers-runtime-18.104.22.168.jar.
The installation is painless and fast: you only have to execute
java -jar wlp-developers-runtime-22.214.171.124.jar to start the text-based installer. After agreeing on terms and conditions, the archive is extracted to the current directory. The installation process takes a few seconds.
Now you have a WLP server, without a server, so it is time to create one :-). Just execute:
[INSTALL_DIR]/bin/server create [SERVER_NAME]
After this step the whole installation folder (base installation + create server) takes ~73 MB.
WLP will create a folder with the name: [SERVER_NAME] in
[INSTALL_DIR]/usr/servers/. In the same folder you will find a minimalistic
server.xml configuration file which needs some treatment. Just replace
<feature>webProfile-6.0</feature> to make WLP a web profile Java EE 6 server.
After enabling the webProfile-6.0 feature in
server.xml WLP is ready for deployments. To deploy an app, just copy a WAR archive to:
[INSTALL_DIR]/usr/servers/[SERVER_NAME]/dropins. The deployment of ServerSmokeTest.war worked immediately without any tweaks. The application became immediately available under the http://localhost:9080/ServerSmokeTest URI. A server start with deployment takes about 3 seconds.
I tested WebSphere already a few years ago, but the installation of the installer took longer, than the whole server test, configuration with installation of WLP 126.96.36.199 now. WLP looks fresh and promising. The installation is uncomplicated, and comparing it to my previous experiences with WebSphere, unbelievably easy. GlassFish, JBoss, TomeEE or Resin, are still easier to install, but the difference are a few clicks, not hours.
I would expect WLP coming with Java EE 6 support out-of-the-box, what is not the case. WLP comes with preconfigured jsp-2.2 (?!) support instead. However, this can be fixed by replacing a single string in the configuration file, as described above.
Big thanks to Marek Zajac for the idea and pointer to the standalone download!
See also smoke test of other Java EE 6 servers.
See you at Java EE Workshops at MUC Airport!
NEW workshop: Java EE 7 Testing, Deployment, Automation and Code Quality: January 28th, 2015, Airport Munich