1

We have a legacy Maven application which is being deployed to IBM Websphere 8.5. Is a multi module application, and some of the modules contain Ejbs (Session, message driven, and entity) 2.0

Application modules

Until now, we are generating the EAR artifact from the local machine. During the build process, the deployment code for EJBs are being generated and included into the ejbs jar modules by the was6-maven-plugin.

Pom with was6-maven-plugin

Now, we want to setup a GitHub actions pipeline for this application, but don't reach to have the stubs and stuff needed to deploy the EJBs in Websphere, since we cannot use was6-maven-plugin in the pipeline. Why not? Because it requires and installation of websphere to work in the machine <wasHome>${was.path}</wasHome>.

All the ways I have found generate the deployment code during the build process for these Ejbs need to have a Websphere installation available.

Also I have read that if the deployment code is not generated during the build process, the server generates it during the deployment phase. Y have deleted was6-maven-plugin from the pom, generated the EAR without the stubs, and tried to deploy it. Indeed the server launch the ejbdeploy task and tried to generate the deployment code for EJBs, but unfortunately the process goes hung and never ends.

System.out

I want to know if is there any way to generate the EJbs code without a server installation available, and if not, if is there any way to have an installation of the server available in the pipeline in order to this work (pipeline is running over ubuntu-18.04)

  • 1
    Could you just add a step to your build where you start a WebSphere docker container, copy what you need into the container, and then run the plugin, and then copy out what you need? I don't actually know what this plugin does, just a possible workaround/solution. – KyleAure Mar 01 '23 at 19:46
  • @JasonAller, at the moment I'm exploring the workaround you mentioned. But I've never worked with Docker and not very experienced also in GitHub Actions, so I'm wondering if there is not an easier way to to solve the problem. Hard to me to say whay the plugin is doing here since the link to the documentation is broken [https://www.mojohaus.org/was6-maven-plugin](https://www.mojohaus.org/was6-maven-plugin/) , but seems that behind the scene is calling the IBM API in order to generate the code. – user3065868 Mar 02 '23 at 09:04
  • 1
    Deployment code should be generated during the install, so if it hangs for you, check the `SystemOut.log` if there are any error messages. – Gas Mar 02 '23 at 16:01
  • @Gas, thanks for your help. There must be a good reason why the people who developed the application thought it was better to generate the deployment code during the package build, and not postpone it to the server deployment phase. Anyway, if I try to build it during deployment, the system.out doesn't show any errors. The EJBDeploy utility just starts running but there comes a point where it doesn't do anything else. I have attached what the system.out shows when EjbDeploy tool is runnig. – user3065868 Mar 03 '23 at 08:56
  • 1
    @user3065868 could you try to manually call ejbDeploy on your ear (not during the install but before)? Maybe it will give some more info about the issues. I suspect it was earlier done during the build to speed up the installation. – Gas Mar 03 '23 at 10:18
  • 1
    @Gas, I have manually launched the ejbdeploy tool from cmd and the process has worked correctly, without errors. No idea why during deployment it doesn't get to work. – user3065868 Mar 03 '23 at 11:31
  • 1
    @user3065868 hmm thats strange. In that case I'd check if you are not hitting memory/cpu limits when deploying to the server. Maybe you will need to increase heap size on DeploymentManager. And this hang - is it when you are installing via web console or cmdline? – Gas Mar 03 '23 at 11:54
  • 1
    @Gas, thanks for the idea. I've increased the memory available in ejbdeploy.bat and now the process is working fine during deploy. I'm doing it by the Admin web console. It can be a good alternative if I dont find a way to generate deployment code in the pipeline during de build process. – user3065868 Mar 03 '23 at 14:06
  • @user3065868 to incorporate it in the pipeline you would most probably use Kyle idea - so to build your own image that would be used in the ghaction to build app and generate deployment code. – Gas Mar 03 '23 at 14:51

0 Answers0