Skip to content

QoS Manager Develop

mmarjanovic edited this page Jul 11, 2014 · 9 revisions

System requirements

All that is necessary to build this project is Java 7.0 (Java SDK 1.7) or later, Maven 3.0 or later, and the CUPUS library installed to your local maven repository. The application this project produces is designed to be run on JBoss Enterprise Application Platform 6 or JBoss AS 7.1.

In order to deploy QoS Manager, please provide all initial parameters in the OpenIoT properties file located in JBOSS configuration folder jboss-as-7.1.1.Final/standalone/configuration. The connection pool class will read all the configuration values from this file to initialize the QoS Manager and connect to the rest of OpenIoT platform.

Download

To download QoS Manager’s source code, use your favourite git client and retrieve the code from the following URL: https://github.com/OpenIotOrg/openiot.git

The QoS Manager is available under the “openiot/modules/QoSManager” folder.

Deploy from the source code

If you have not yet done so, you must Configure Maven before using any maven commands over OpenIoT modules.

To Start the JBoss Enterprise Application Platform 6 or JBoss AS 7.1 with the Web Profile:

  1. Open a command line and navigate to the root of the JBoss server directory.
  2. The following shows the command line to start the server with the web profile:
  • For Linux: JBOSS_HOME/bin/standalone.sh
  • For Windows: JBOSS_HOME\bin\standalone.bat

Build and Deploy a module to JBoss

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  1. Make sure you have started the JBoss Server as described above.
  2. Open a command line and navigate to the root directory of the module’s Project.
  3. Type this command to build and deploy the archive: mvn clean package jboss-as:deploy
  4. This will deploy target/QoSManager.war to the running instance of the server.

Access the application

The application will be running at the following URL: http://localhost:8080/QoSManager/.

Un-deploy the Archive

  1. Make sure you have started the JBoss Server as described above.
  2. Open a command line and navigate to the root directory of the module’s Project.
  3. When you are finished testing, type this command to undeploy the archive: mvn jboss-as:undeploy

Deploy from Eclipse

Integrating and Starting JBoss server

You can start JBoss Application Server and deploy the QoSManager from Eclipse using JBoss tools. Detailed instructions on how to integrate and start JBoss AS from Eclipse with JBoss Tools are available at the following URL: https://docs.jboss.org/author/display/AS7/Starting+JBoss+AS+from+Eclipse+with+JBoss+Tools

Integrating and deploying QoS Manager

To integrate and deploy the QoSManager in Eclipse one should follow the steps below:

  1. Import existing maven project “File>Import>Maven>Existing Maven Projects”
  2. Click the Browse button and navigate to the QoSManager’s source code directory that has been previously downloaded.
  3. Choose the QoSManager and click the Finish button.
  4. Right click on the “QoSManager” project and choose “Run As > Maven Build…”
  5. Insert into:
    • Goals: “clean package jboss-as:deploy”
    • Profiles: “arq-jbossas-remote”
    • Name: “QoSManager package-deploy” (or your preferred name)
  6. Click the Run button (the JBoss Server should be already running). The project will be built and deployed automatically, and will run on the JBoss AS running instance. From now on this configuration should be available at the Eclipse Run Configurations under Maven Build.

To Undeploy the QoSManager from the running instance of the JBoss AS, follow the steps below:

  1. Right click on the “QoSManager” project and choose “Run As > Maven Build…”
  2. Insert into:
    • Goals: “jboss-as:undeploy”
    • Profiles: “arq-jbossas-remote”
    • Name: “QoSManager undeploy” (or your preferred name)

Click the Run button (the JBoss Server should be already running). The project will automatically be undeployed from the JBoss AS running instance. From now on this configuration should be available at the Eclipse Run Configurations under Maven Build.

More detailed documentation about QoS Manager component is given in Deliverable 4.6.

Clone this wiki locally