WebSphere Application Server & Liberty

 View Only

 IBM WAS 8.5 traditional Docker - loose application how install?

Paweł Lee's profile image
Paweł Lee posted Sun April 06, 2025 03:01 AM

I want to use WAS 8.5 traditional docker as a local development server. I have configured the profile using Jython scripts. When I install app.ear everything works fine for me.

However, I would like to install the app from the local environment without building ear. I have mounted the local workspace to the container. I try to install by pointing to the ear directory, which contains a looseconfig.xmi file containing a description of the jar and war files with an indication of the paths to the binaries.

Unfortunately the installation doesn't work, it looks like it ignores looseconfig.

Does anyone have an idea how to install loose application on WAS 8.5 traditional on docker to have changes from local environment live on server without build ear?

Scott Kurz's profile image
Scott Kurz

A key original use case for this "loose" app support used the Eclipse tooling (RAD, etc.).  I'm not sure how far you'll get trying to do this manually outside of the tool (unless someone else can help).   One alternative possibly would be to use the monitored app deploy dir.  I wrote up a quick sample for that here:  https://github.com/scottkurz/traditional-websphere-drag-and-drop.  Though you still have to build/package the EAR you at least don't have to call wsadmin to redeploy.

Paweł Lee's profile image
Paweł Lee

Thanks Scott for your answer. It doesn't solve my issue, but as an alternative solution it will certainly be useful.

We used to use RAD a long time ago, which supported “loose” and hotdeploy for WAS. Later we switched to Intellij's IDEA and dealt with deployment without ear building by simply copying files to directories:
- profiles/profilename/config/cells/cellname/applications/AppEar.ear/deployments/AppEar/...
- profiles/profilename/config/cells/cellname/blas/AppEar... 
- profiles/profilename/config/cells/cellname/cus/AppEar/...

In the first directory in the deployment.xml file, we had added:
    <properties xmi:id=“Property_1234567890123” name=“was.loose.config” value=“file:/C:/Users/.../projects/SomeApp/AppEAR/looseconfig.xmi”/>.
 
It worked this way with no problem on Windows on WAS 8.5.5.9.

We are currently trying to switch from this local environment to docker, but the analogous approach does not work (WAS traditional 8.5.5.27 docker ubi-8).

I have the local project mounted to /work/localProject/, so I change the appropriate paths, e.g.
<properties xmi:id=“Property_1234567890123” name=“was.loose.config” value=“file:/work/localProject/AppEAR/looseconfig.xmi”/>.

Anyone have an idea if anything changed in WAS 8.5.5.9? It's possible that I have some stupid bug, but it could be that deployment.xml no longer supports this property: was.loose.config in higher versions than 8.5.5.9 or you have to enable extra some mode in settings.

looseconfig.xmi looks more or less like this:

<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.jst.j2ee.commonarchivecore.looseconfig:LooseArchive xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.jst.j2ee.commonarchivecore.looseconfig="commonarchive.looseconfig.xmi" uri="/work/localProject/AppEAR" binariesPath="/work/localProject/AppEAR" resourcesPath="/work/localProject/AppEAR" archiveType="EAR">
  <looseChildren uri="SomemoduleEJB3.jar" binariesPath="/work/localProject/SomemoduleEJB3/bin" resourcesPath="/work/localProject/SomemoduleEJB3/bin" archiveType="EJBJAR"/>
  <looseChildren uri="Somemodule.jar" binariesPath="/work/localProject/Somemodule/bin" resourcesPath="/work/localProject/Somemodule/bin" archiveType="SIMPLEJAR"/>
</org.eclipse.jst.j2ee.commonarchivecore.looseconfig:LooseArchive>

Hermann Huebler's profile image
Hermann Huebler IBM Champion

Hello Pawel,

unfortunately I can't anwer your question but maybe you can try to determine if its the docker installation or the WAS version causing the issues you are facing? Can you say that for sure? From the current updates I'm could not answer that question. What I'd try if your case would be use use a WAS 8.5.5.9 image and see if the way you try to deploy works. If it works it's the WAS version if it's still not working it is related to the deployment on Docker and not related to WAS. Knowing that I think would help to know where to focus the next PD steps.

Scott Kurz's profile image
Scott Kurz

Another thought: if you have the ability to install WebSphere 8.5.5.27 on Windows (i.e. on the same local system as Eclipse), you could try using the WebSphere Eclipse tooling to deploy your app there and then take a look at the deployment-relate XML files.   Use the "Run server with resources within the workspace" option (the default, which is the "loose app" option).   If you don't have access to RAD, you can use the WebSphere Developer Tools (https://marketplace.eclipse.org/content/ibm-websphere-application-server-v85x-developer-tools).     I don't think this what you're doing is necessarily a documented approach, so it will probably be somewhat of a hack, but I gather you already understand that.