Closed Tanmay-Kudchadkar closed 2 years ago
The application that runs inside the docker image is already maven enabled, so we should be using maven to package the executable and copy only the uber jar that gets created into the run image.
We will then not need all the wget statements as a mvn package clean
will fetch all the dependencies.
The first image can be based on https://hub.docker.com/_/maven eg. FROM maven:3.6-jdk-11 or FROM 3.8.4-openjdk-11
In the dockerfile update the tested list.
Switch to the MQ image
Tested with
9.2.4.0-r1
9.2.0.0-r2
9.2.0.0-r1
9.1.5.0-r2
9.1.5.0-r1
To what you have tested with. Remove any that you have not tested against.
MQTicketService/README.md remove the line
Make sure you have these ```.jar``` files in your class path when compiling and executing code.
Change
Build the
.jar
file required for by running the following command:
to
Build the application by running the following command:
EnvSetter.java Clean up the error catch. Currently the code is
e.printStackTrace();
logger.log(Level.SEVERE, "Credentials are incorrect, could not create context", e);
when the error is instanceof JMSSecurityRuntimeException
as well as when it is not. Decide which it should be and remove the 2 duplicated lines.
Clean up the indentation in the method setJMSProperties
Manager.java
Add in-code documentation as to what
final String key = "org.glassfish.jaxb.runtime.v2.bytecode.ClassTailor.noOptimize";
System.setProperty(key, "true");
does.
Same applies to Reseller.java
MQTicketService/startApp.sh With a maven build inside the docker image, the run command should get updated to run the uber jar.
TicketRequester.java Remove commented out import.
main readme
mvn clean package
removes any previous builds, then recompiles and creates the uber jar.
So the following is not needed, and should be removed.
To compile run
javac -cp target/ModelAnswer-1.4.jar com/ibm/mq/demo/*.java
Edit the test against list to only those versions that you have tested with.
the ticket service has been tested with the ibmcom/mq images
9.2.4.0-r1 9.2.0.0-r2 9.2.0.0-r1 9.1.5.0-r2
This pull request was created to update the existing code to work with Java 11. It uses the Jakarta XML Bind library instead of the Javax XML Bind library. The directories have also been restructured to integrate Maven.