CoCoME Cloud JEE Service-Adapter
This repository contains the service-adapter implementing the evolution scenario adding a service-adapter.
- Running Glassfish 4.x
- A database supported by JPA (e.g., PostgreSQL)
Before compilation you must copy the
settings.xml.template located in
the project root directory file to
settings.xml and adjust the
properties defined in the XML file.
The properties correspond with values of your running Glassfish
instance. In a default Glassfish installation the domain is called
domain1 if you did not provide a different name. However, we recommend
to create your own domain, e.g.,
To build the service-adapter with Maven type in the project root directory:
mvn -s settings.xml compile
If the compilation is successful you can proceed and type
mvn -s settings.xml package
to produce deployable packages. This last step can be omitted when you choose to directly deploy your build with Maven. However, it is helpful to make sure packaging works before trying to deploy. Therefore, we recommend to test packaging before deploying.
Before you can deploy the service-adapter make sure you have added a
data (re)source called
jdbc/CoCoMEDB. This can be done on command line
or via the Glassfish UI. You need:
- A JDBC connection pool (please consult the Glassfish documentation)
- A JDBC resource named
jdbc/CoCoMEDBusing the connection pool you defined
You can directly deploy them via the Cargo Maven plug-in with
mvn -s settings.xml install
Alternatively, you can deploy the application via
asadmin or the
Glassfish administration interface.
Undeployment can be performed via the Glassfish administration
asadmin command line tool or with
mvn -s settings.xml post-clean
Before you start to contribute to the service-adapter make sure you adhere the coding style of the service-adapter and setup your IDE accordingly. For Eclipse, we provide configuration files in the root directory.
eclipse.importorderYou can use them globally in preferences or configure them in each project.
Furthermore, we provide a
checkstyle.xml configuration, which can
be used with Maven and in your IDE.
mvn -s settings.xml checkstyle:check
This will produce also errors in existing code. We are aware of that and will fix in over time.
For your Eclipse setup you may use the Kieker Eclipse setup page as reference (https://kieker.uni-kiel.de/trac/wiki/KiekerCodingConventionSetup)
In case the deployment fails, this might be due to a wide range of problems. You may consult the server logs and your settings file.
- Make sure admin user name and password are correct and that the ports are set properly. Depending on your installation they might differ from 4848 (admin) and 8080 (web).
- In case you deployed before, redeployment will fail until you undeploy
first. This can be done with
mvn -s settings.xml post-clean installwhich undeploys and then tries to deploy the application again
- If undeployment does not work. Try undeploying with the Glassfish
administration interface or
asadmin. In seldom cases Glassfish does not delete all necessary files for undeployment. You may repair this as follows:
- stop your Glassfish server
- go to
- delete all directories which correspond with your deployment
- You must also check the
- Find the
config.xmland remove references to the deployment.