Search This Blog

Wednesday, September 11, 2013

Open ATNA

1) Download the source https://www.projects.openhealthtools.org/sf/projects/openatna/


2) Download Maven 2.x

3) Download postgres9.x & install it


4) Type = D:\openatna\trunk\openatna> mvn install:install-file -DgroupId=org.openhealthtools.openexchange -DartifactId=openexchange-actorconfig -Dversion=1.0 -Dpackaging=jar -Dfile=D:\openxds\repo\org\openhealthtools\openexchange\openexchange-actorconfig\1.0-SNAPSHOT\openexchange-actorconfig-1.0-SNAPSHOT.jar


5) Change = D:\openatna\trunk\openatna\audit\pom.xml
    Change to 1.0 for actor-config [ which version you have in ur repo of openxds svn checkout ]

6) Type = D:\openatna\trunk\openatna> mvn install -DskipTests


Database
********

7) Go to D:\openatna\trunk\openatna\audit\src\main\resources\sql
    Use the files to create user and tables etc...


RUN
***

8)To create an executable version of OpenATNA use the following command:

    d:\xxxx> mvn -P exec install

9) COPY =  get D:\openxds\repo\org\openhealthtools\openexchange\openexchange-utils\1.0-SNAPSHOT\openexchange-utils-1.0.jar" 
    OR you can take in from openxds-web.war file web-inf\lib folder
    OR download it
   
    & copy that into D:\openatna\trunk\openatna\all\build\lib

10) Change =
    Go to D:\openatna\trunk\openatna\all\build\openatna-1.2.1-    SNAPSHOT.jar
    extract the META-INF\MANIFEST.MF
    Open it
     add the jar in last line [ one space ].
        lib\openatna-1.2.1-SNAPSHOT.jar

11) This uses a maven profile (-P command). This will create an executable jar file in the "all" directory. Change directory into the all/build folder. You should see a jar file called openatna-version.jar, where version is the version you have downloaded. This is the executable jar file. The dependencies are in the all/build/lib/ directory. To run OpenATNA, type:

    D:\openatna\trunk\openatna\all\build> java -jar openatna-1.2.1-SNAPSHOT.jar


RUN CLIENT
**********
Use eclipse to run it if u cant run the file in command prompt

12) RUN FILE = D:\openatna\trunk\openatna\all\src\test\java\org\openhealthtools\openatna\all\test\TlsClientTest0.java in eclipse [ run as JUNIT ]

13) OUTPUT = go to database tables \ messages etc..


Testing
*******
You can test against the server by running the clients in the "test" directory of the all module. These are JUnit tests and are probably easiest to run inside your IDE. The classes that are designed to run against the server are:


    org.openhealthtools.openatna.dist.test.TlsClientTest0     -    sends messages to the ARR using TLS and Syslog RFC 5424 style messages. The first set of messages use mutually authentication with message encryption. The second set of messages use mutual authentication without message encryption.

    org.openhealthtools.openatna.dist.test.UdpClientTest0     -    sends messages to the ARR using UDP and Syslog RFC 5424 style messages.

    org.openhealthtools.openatna.dist.test.BsdClientTest0     -    sends messages to the ARR using UDP and Syslog BSD style messages.

Some of these tests send erroneous messages to the ARR (on purpose :-)), so you may see error stack traces.


Reporting
*********
The 'web' module contains a simple servlet for querying the database. During the build (when you run 'mvn install') the Servlet is built and and a << war file >> is created. This war file can be dropped into a Servlet container such as Tomcat. For testing purposes, it can also be run using maven. If you change directory into the 'web' directory and type:

D:\openatna\trunk\openatna\web\target\atna.war



Tomcat 6.0
***********
simply copy the war file and run it


JBOSS 6 or Jboss eap 6
**********************

While run from eclipse, add the line in the VM arguments
    Double Click server in the server Prespective
        Open launch Configuration
        add this in VM arg at end with double quotes to avoid logging.properties null error before give one space
       
         "-Dorg.jboss.as.logging.per-deployment=false"



URL : http://localhost:8080/atna





















No comments:

Hit Counter


View My Stats