Search This Blog

Showing posts with label info.drvijay. Show all posts
Showing posts with label info.drvijay. Show all posts

Monday, September 19, 2022

Android Virtual Device - AVD Setup

 1. Install Andriod SDK

2. Set environment for ANDROID_HOME=/home/android/sdk...

3. Install AVD or Android Studio

4. Open Android Studio 

           /home/android-studio/bin/

                        ./studio.sh


5. In that android Studio, you can see Configure Button -> AVD



6. Create Virutal Device or AVD like below. 



7. Start The Emulator by click Play button



8. Add environment variable.

      8.1  goto /etc/profile.d/    [create one file.sh] ex: > sudo vi myenv.sh
         
      export ANDROID_HOME=$HOME/Library/Android/sdk
      export PATH=$PATH:$ANDROID_HOME/emulator
      export PATH=$PATH:$ANDROID_HOME/tools
      export PATH=$PATH:$ANDROID_HOME/tools/bin
      export PATH=$PATH:$ANDROID_HOME/platform-tools

9. > source /etc/profile




Wednesday, February 6, 2019

Stock Market Walk Though - Weekly Expiry - 07-02-19

1. Bank Nifty Weekly Expiry
2. RBI policy announcement is there today and there is a little chance to impact the market.
3. If any rate cut is happens, then that will impact the bank nifty expiry and becomes volatile
4. BN will be in the range of 27000 - 27650 and more chances to close in down side 27200 - 27300 & up side 27350 -27500, coz max pain at 27300.
5. BN daily charts in bullish and it formed like spinning TOP, so take trade after the HIGH or LOW breakouts.
6. MACD & DMA 50,200 golden crossover signal shows the bullish trend,


TRADE WITH CAUTION,


My Trade Plan

 1. BN - Stradle, Strangle [depends]
 2. LOTS - Confidential*


HAPPY TRADING
Vijay


Wednesday, March 7, 2018

PHP - Aes-256-cbc Encrypt Decrypt with IV vector


function encrypt_decrypt($action, $string) {
    $output = false;
    $encrypt_method = "aes-256-cbc";
    $secret_key = 'abcdefghi1234567890';
    $secret_iv = '';
 
// hash
    $key = hash('sha256', $secret_key);
    echo "

".$key;

    // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
    $iv = substr(hash('sha256', $secret_iv), 0, 16);
    if ( $action == 'encrypt' ) {
        $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
        $output = base64_encode($output);
    } else if( $action == 'decrypt' ) {
        $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
    }
    return $output;
}
$plain_txt = "I am vijay";
echo "

Plain Text =" .$plain_txt. "\n";
$encrypted_txt = encrypt_decrypt('encrypt', $plain_txt);
echo "

Encrypted Text = " .$encrypted_txt. "\n";

$decrypted_txt = encrypt_decrypt('decrypt', $encrypted_txt);
echo "

Decrypted Text =" .$decrypted_txt. "\n";

if ( $plain_txt === $decrypted_txt ) echo "

SUCCESS";
else echo "

FAILED";
echo "\n";

?>



Output

Plain Text =I am vijay

681448fb66d8704c7d52f6770f6087882db21c899fe48d21012a587bbe70cdd3

Encrypted Text = THRtUkJYWFUzb1NzUFRoOUw5T3Q2UT09

681448fb66d8704c7d52f6770f6087882db21c899fe48d21012a587bbe70cdd3

Decrypted Text =I am vijay

SUCCESS

Wednesday, May 28, 2014

Tomcat to Support HTTPS / SSL Apache Portable Runtime (APR) with Private key Public Key

1 System Configuration

This document applies to Windows systems running Tomcat 5.5, not to Tomcat 4.1, so it should only be used for sites running MIRC T27 or later. Further, these instructions apply to Tomcat sites running the Apache Portable Runtime (APR). On a Windows computer, this is a dynamically linked library (DLL) that is installed automatically during a Tomcat installation if the user selects the Native option. The APR is strongly recommended, especially on high volume sites, because it is more efficient than the normal Tomcat web server.
You can check whether your system has the APR installed by looking for Tomcat/bin/tcnative-1.dll. If that file is present, Tomcat will automatically use the APR. If your Windows system does not have the APR, you can get it at: http://tomcat.apache.org/tomcat-5.5-doc/apr.html

2 Overview of the Process

When an application (A) establishes an SSL connection to another application (B), it receives encrypted information that identifies B. This information is called a certificate. Certificates are encoded mathematically with keys.
Enabling SSL on a Tomcat installation that is running the APR involves the following steps:
  • Create a private key for Tomcat.
  • Create a certificate for Tomcat.
  • Place the private key and the certificate where Tomcat can find them.
  • Configure Tomcat to enable SSL and use the key and certificate.
  • Do any MIRC configuration necessary for clinical trials.
The first two steps require the use of an open source SSL tool called OpenSSL.

3 Getting OpenSSL

OpenSSL is developed by the OpenSSL Project. Its web site is: http://www.openssl.org.
A special OpenSSL installer for Windows is available on the Shining Light site at: http://www.slproweb.com/products/Win32OpenSSL.html.
After downloading the installer, run it. The result is a directory called OpenSSL. Inside that directory is a bin directory. Although the installer will create entries in the Programs menu, those entries only point to documentation (and to the uninstaller). The OpenSSL program is a command-line utility. In the instructions that follow, it is assumed that the OpenSSL directory is located in the root of the D drive (D:\OpenSSL).

4 Creating a Private Key for Tomcat

To enable SSL communication, Tomcat must have a certificate. To create a certificate for Tomcat, you must first have a private key. This section will demonstrate how to create a private key using OpenSSL.
To start, create a directory in which to work. In this example, the directory is called sandbox.
  • Launch a DOS window. (Click Start -- Run… and type cmd. Then click OK.)
  • Navigate to your sandbox directory.
  • Enter the command:
d:\openssl\bin\openssl.exe
  • OpenSSL will prompt with: OpenSSL>
  • Enter the command:
genrsa –des3 –out tomcatkey.pem 2048
  • OpenSSL will then ask you for a pass phrase for the key. Enter any phrase you want. In this example, we will use the pass phrase tomcat. After entering the pass phrase, OpenSSL will ask you to repeat it.
  • OpenSSL will then create the private key and store it in the sandbox directory in a file called tomcatkey.pem.
You can remain in the OpenSSL program for the next step.

5 Creating a Certificate for Tomcat

Once you have a private key for Tomcat, you must create a certificate. Assuming you are still running the OpenSSL program from the previous step, enter the command:
req –new –x509 –key tomcatkey.pem –out tomcatcert.pem –days 1095
OpenSSL will ask you for the pass phrase that you defined for the private key. This command creates a self-signed certificate with a lifetime of 3 years (1095 days), using the private key. OpenSSL will store that certificate in the sandbox directory in a file called tomcatcert.pem.

6 Storing the Private Key and the Certificate

You must now place the tomcatkey.pem and tomcatcert.pem files where Tomcat can find them. The easiest place to put them is in the top-level Tomcat directory.

7 Enabling SSL in the Tomcat server.xml File

Having put the files in the top-level Tomcat directory, you must now enable SSL in the server.xml file which is located in the conf directory under the top-level Tomcat directory. Using the Tomcat directory in the section above as an example, first make a backup copy of the Tomcat\conf\server.xml file (just in case) and store it somewhere safe. Then open Tomcat\conf\server.xml with a text editor.
Look for the section of code that contains the main connector:
    

 
About 10 lines under that look for the code for the SSL connector:
    


Remove the start and end comment lines, making the code read:
 

 
Next, it is necessary to tell Tomcat where the key and certificate are and how to access them. Add the four indented lines near the bottom of the box below, making the code read:
 

 
In place of tomcat in the SSLPassword attribute, you must use the pass phrase you chose for the private key. Then, save the file.
This will create an SSL connector on port 8443 when Tomcat is restarted. If you decide to use a different port than 8443, you must change the redirectPort attributes in other Connector elements to point to the port you chose; otherwise, redirections to the SSL port will not occur.
Note: enabling SSL on your site does not disable non-SSL connections, so your site will also continue to work with browsers that are not SSL-enabled.
When modifying XML files, it is usually a good idea to confirm that you have not made a mistake in typing and inadvertently created a file that is not well-formed. An easy way to check is to open the file with Internet Explorer, which will parse the file and either display the text in a nicely formatted window or tell you about the first error it found.
At this point, start (or restart) Tomcat. Launch a browser and go to:
https://localhost:8443/tomcat.gif
If your certificate is self-signed, your browser will warn you. You should tell the browser to import the certificate and proceed. You should then see the little Tomcat logo. If you do, you’re done configuring Tomcat.

Enable SSL Https in Tomcat

1. Generate Keystore

First, uses “keytool” command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in the certificate’s detail.
$Tomcat\bin>keytool -genkey -alias mkyong -keyalg RSA -keystore c:\mkyongkeystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  yong mook kim
What is the name of your organizational unit?
  //omitted to save space
  [no]:  yes
 
Enter key password for <mkyong>
        (RETURN if same as keystore password):
Re-enter new password:
 
$Tomcat\bin>
Here, you just created a certificate named “mkyongkeystore“, which locate at “c:\“.


Certificate Details
You can use same “keytool” command to list the existing certificate’s detail
$Tomcat\bin>keytool -list -keystore c:\mkyongkeystore
Enter keystore password:
 
Keystore type: JKS
Keystore provider: SUN
 
Your keystore contains 1 entry
 
mkyong, 14 Disember 2010, PrivateKeyEntry,
Certificate fingerprint (MD5): C8:DD:A1:AF:9F:55:A0:7F:6E:98:10:DE:8C:63:1B:A5
 
$Tomcat\bin>
 
 

2. Connector in server.xml

Next, locate your Tomcat’s server configuration file at $Tomcat\conf\server.xml, modify it by adding a connector element to support for SSL or https connection.
File : $Tomcat\conf\server.xml
 //...
 <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the 
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
 
 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" 
        keystoreFile="c:\mkyongkeystore"
        keystorePass="password" />
  //...
Note
keystorePass="password" is the password you assigned to your keystore via “keytool” command.
 
 

3. Done

Saved it and restart Tomcat, access to https://localhost:8443/

In this example, we are using Google Chrome to access the Tomcat configured SSL site, and you may notice a crossed icon appear before the https protocol :), this is caused by the self-signed certificate and Google chrome just do not trust it.
In production environment, you should consider buy a signed certificate from trusted SSL service provider like verisign/digicert or sign it with your own CA server
 
 

Wednesday, September 11, 2013

Mirth to connect PostgreSQL


Steps:-

1. Create a role mirthdb as password mirthdb in postgres and assign super user priviledge.

 CREATE ROLE mirthdb LOGIN
 ENCRYPTED PASSWORD 'md5ffedeac0808a4430dd3bfa01f1d02bac'
  SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
2. Open the attached sql and run the script.

3. Go to Mirth installe folder ex:- D:\MirthConnect2.2\conf\mirth.properties

    Change the below properties :-
            database = postgres
            database.url = jdbc:postgresql://localhost:5432/mirthdb
            database.username = mirthdb
            database.password = mirthdb

4. Restart the server. ENJOY !!!!!









postgres-database.sql

-- Role: mirthdb

-- DROP ROLE mirthdb;

-- CREATE ROLE mirthdb LOGIN
--  ENCRYPTED PASSWORD 'md5ffedeac0808a4430dd3bfa01f1d02bac'
--  SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;

CREATE TABLE SCHEMA_INFO
 (VERSION VARCHAR(40));

CREATE SEQUENCE EVENT_SEQUENCE START WITH 1;

CREATE TABLE EVENT
 (ID INTEGER DEFAULT nextval('EVENT_SEQUENCE') NOT NULL PRIMARY KEY,
 DATE_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
 NAME TEXT NOT NULL,
 EVENT_LEVEL VARCHAR(40) NOT NULL,
 OUTCOME VARCHAR(40) NOT NULL,
 ATTRIBUTES TEXT,
 USER_ID INTEGER NOT NULL,
 IP_ADDRESS VARCHAR(40));
 
CREATE TABLE CHANNEL
 (ID CHAR(36) NOT NULL PRIMARY KEY,
 NAME VARCHAR(40) NOT NULL,
 DESCRIPTION TEXT,
 IS_ENABLED BOOLEAN NOT NULL,
 VERSION VARCHAR(40),
 REVISION INTEGER,
 LAST_MODIFIED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
 SOURCE_CONNECTOR TEXT,
 DESTINATION_CONNECTORS TEXT,
 PROPERTIES TEXT,
 PREPROCESSING_SCRIPT TEXT,
 POSTPROCESSING_SCRIPT TEXT,
 DEPLOY_SCRIPT TEXT,
 SHUTDOWN_SCRIPT TEXT);
 
CREATE TABLE CHANNEL_STATISTICS
 (SERVER_ID CHAR(36) NOT NULL,
 CHANNEL_ID CHAR(36) NOT NULL REFERENCES CHANNEL(ID) ON DELETE CASCADE,
 RECEIVED NUMERIC,
 FILTERED NUMERIC,
 SENT NUMERIC,
 ERROR NUMERIC,
 QUEUED NUMERIC,
 ALERTED NUMERIC,
 PRIMARY KEY(SERVER_ID, CHANNEL_ID));

CREATE SEQUENCE MESSAGE_SEQUENCE START WITH 1;

CREATE TABLE ATTACHMENT
    (ID VARCHAR(255) NOT NULL PRIMARY KEY,
     MESSAGE_ID VARCHAR(255) NOT NULL,
     ATTACHMENT_DATA BYTEA,
     ATTACHMENT_SIZE INTEGER,
     ATTACHMENT_TYPE VARCHAR(40));

CREATE INDEX ATTACHMENT_INDEX1 ON ATTACHMENT(MESSAGE_ID);

CREATE TABLE MESSAGE
 (SEQUENCE_ID INTEGER DEFAULT NEXTVAL('MESSAGE_SEQUENCE') NOT NULL PRIMARY KEY,
 ID CHAR(36) NOT NULL,
 SERVER_ID CHAR(36) NOT NULL,
 CHANNEL_ID CHAR(36) NOT NULL REFERENCES CHANNEL(ID) ON DELETE CASCADE,
 SOURCE VARCHAR(255),
 TYPE VARCHAR(255),
 DATE_CREATED TIMESTAMP NOT NULL,
 VERSION VARCHAR(40),
 IS_ENCRYPTED BOOLEAN NOT NULL,
 STATUS VARCHAR(40),
 RAW_DATA TEXT,
 RAW_DATA_PROTOCOL VARCHAR(40),
 TRANSFORMED_DATA TEXT,
 TRANSFORMED_DATA_PROTOCOL VARCHAR(40),
 ENCODED_DATA TEXT,
 ENCODED_DATA_PROTOCOL VARCHAR(40),
 CONNECTOR_MAP TEXT,
 CHANNEL_MAP TEXT,
 RESPONSE_MAP TEXT,
 CONNECTOR_NAME VARCHAR(255),
 ERRORS TEXT,
 CORRELATION_ID VARCHAR(255),
 ATTACHMENT BOOLEAN, 
 UNIQUE (ID));

CREATE INDEX MESSAGE_INDEX1 ON MESSAGE(CHANNEL_ID, DATE_CREATED);

CREATE INDEX MESSAGE_INDEX2 ON MESSAGE(CHANNEL_ID, DATE_CREATED, CONNECTOR_NAME);

CREATE INDEX MESSAGE_INDEX3 ON MESSAGE(CHANNEL_ID, DATE_CREATED, RAW_DATA_PROTOCOL);

CREATE INDEX MESSAGE_INDEX4 ON MESSAGE(CHANNEL_ID, DATE_CREATED, SOURCE);

CREATE INDEX MESSAGE_INDEX5 ON MESSAGE(CHANNEL_ID, DATE_CREATED, STATUS);

CREATE INDEX MESSAGE_INDEX6 ON MESSAGE(CHANNEL_ID, DATE_CREATED, TYPE);

CREATE INDEX MESSAGE_INDEX7 ON MESSAGE(CORRELATION_ID, CONNECTOR_NAME);

CREATE INDEX MESSAGE_INDEX8 ON MESSAGE(ATTACHMENT) WHERE (ATTACHMENT=TRUE);
 
CREATE TABLE SCRIPT
 (GROUP_ID VARCHAR(40) NOT NULL,
 ID VARCHAR(40) NOT NULL,
 SCRIPT TEXT,
 PRIMARY KEY(GROUP_ID, ID));

CREATE TABLE TEMPLATE
 (GROUP_ID VARCHAR(255) NOT NULL,
 ID VARCHAR(255) NOT NULL,
 TEMPLATE TEXT,
 PRIMARY KEY(GROUP_ID, ID)); 

CREATE SEQUENCE PERSON_SEQUENCE START WITH 1;

CREATE TABLE PERSON
 (ID INTEGER DEFAULT nextval('PERSON_SEQUENCE') NOT NULL PRIMARY KEY,
 USERNAME VARCHAR(40) NOT NULL,
 FIRSTNAME VARCHAR(40),
 LASTNAME VARCHAR(40),
 ORGANIZATION VARCHAR(255),
 EMAIL VARCHAR(255),
 PHONENUMBER VARCHAR(40),
 DESCRIPTION VARCHAR(255),
 LAST_LOGIN TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
 GRACE_PERIOD_START TIMESTAMP DEFAULT NULL,
 LOGGED_IN BOOLEAN NOT NULL);

CREATE TABLE PERSON_PASSWORD
 (PERSON_ID INTEGER NOT NULL REFERENCES PERSON(ID) ON DELETE CASCADE,
 PASSWORD VARCHAR(256) NOT NULL,
 PASSWORD_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP);

CREATE TABLE ALERT
 (ID CHAR(36) NOT NULL PRIMARY KEY,
 NAME VARCHAR(40) NOT NULL,
 IS_ENABLED BOOLEAN NOT NULL,
 EXPRESSION TEXT,
 TEMPLATE TEXT,
 SUBJECT VARCHAR(998));
 
CREATE TABLE CODE_TEMPLATE
 (ID VARCHAR(255) NOT NULL PRIMARY KEY,
 NAME VARCHAR(40) NOT NULL,
 CODE_SCOPE VARCHAR(40) NOT NULL,
 CODE_TYPE VARCHAR(40) NOT NULL,
 TOOLTIP VARCHAR(255),
 CODE TEXT);  
 
CREATE TABLE CHANNEL_ALERT
 (CHANNEL_ID CHAR(36) NOT NULL,
 ALERT_ID CHAR(36) NOT NULL REFERENCES ALERT(ID) ON DELETE CASCADE);

CREATE TABLE ALERT_EMAIL
 (ALERT_ID CHAR(36) NOT NULL REFERENCES ALERT(ID) ON DELETE CASCADE,
 EMAIL VARCHAR(255) NOT NULL);

CREATE SEQUENCE CONFIGURATION_SEQUENCE START WITH 1;

CREATE TABLE CONFIGURATION
 (CATEGORY VARCHAR(255) NOT NULL,
 NAME VARCHAR(255) NOT NULL,
 VALUE TEXT);
 
INSERT INTO PERSON (USERNAME, LOGGED_IN) VALUES('admin', FALSE);

INSERT INTO PERSON_PASSWORD (PERSON_ID, PASSWORD) VALUES(1, 'YzKZIAnbQ5m+3llggrZvNtf5fg69yX7pAplfYg0Dngn/fESH93OktQ==');

INSERT INTO SCHEMA_INFO (VERSION) VALUES ('9');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'update.url', 'http://updates.mirthcorp.com');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'update.enabled', '1');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'stats.enabled', '1');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'firstlogin', '1');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'server.resetglobalvariables', '1');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'smtp.timeout', '5000');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'smtp.auth', '0');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'smtp.secure', '0');

INSERT INTO CONFIGURATION (CATEGORY, NAME, VALUE) VALUES ('core', 'server.maxqueuesize', '0');

Open XDS make WAR steps



Use Internet Explorer for better solution.

1)     Extract the openxds-web.war file and create a folder [if u want to change] like openxds-web.war

2)    Go to D:\jboss-4.2.3.GA\server\default\deploy\openxds-web.war\WEB-INF\classes folder.


3)   Change your [database] settings in omar.properties, openxds.properties, repository.jdbc.cfg.xml

4)    Find the openxds.properties under the classes folder. Make sure the ihe.actors.dir property uses /conf/axis2repository instead of ./conf/axis2repository . You need to modify the same for the other two properties (axis2 .repo.dir and xds.schema.dir) as well.


5)    Run the server->

Load your actor config files
Give the full path in the file text field instead of selecting browse button.

Ex: D:\jboss-4.2.3.GA\server\default\deploy\openxds-web.war\WEB-INF\classes\conf\actors\IheActors.xml
           
5.1 See below the page [scroll down].
Select all the check box and click start
Takes few min to start…

6)    Open application-context.xml change if u want
update
true

7)    http://localhost:8010/axis2/services/ after you can see the services

8)    Copy the *.jar ‘s file from your openxds-web\web-inf\lib folder to axis\lib [D:\jboss-4.2.3.GA\server\default\deploy\axis2.war\WEB-INF\lib].

Note: Go to the code download and make jar file for common-ws, common-util packages from eclipse and copied into lib folder.


9)   Copy your *.aar file from D:\jboss-4.2.3.GA\server\default\deploy\openxds-web.war\WEB-INF\classes\conf\axis2repository\services
to
D:\jboss-4.2.3.GA\server\default\deploy\axis2.war\WEB-INF\services

10)  



Open XDS - Compile Steps

1) Goto D:\trunk\openxds\openxds-web

type
 mvn install -DskipTests



2)type mvn package
    NOTE: if you found any artifacts missing, copy the command from the console and change the file path. check those jar is in D:\repo or in internet.

3) type the below lines one by one


    mvn install:install-file -DgroupId=org.openhealthexchange.openpixpdq -DartifactId=openpixpdq -Dversion=1.0 -Dpackaging=jar -Dfile=D:\repo\org\openhealthexchange\openpixpdq\openpixpdq\1.0\openpixpdq-1.0.jar
    mvn install:install-file -DgroupId=com.misys.braid -DartifactId=braid-base -Dversion=1.2.2 -Dpackaging=jar -Dfile=D:\repo\com\misys\braid\braid-base\1.2.2\braid-base-1.2.2.jar
    mvn install:install-file -DgroupId=org.openhealthtools.openxds -DartifactId=openxds-core -Dversion=1.0.1 -Dpackaging=jar -Dfile=D:\repo\org\openhealthtools\openxds\openxds-core\1.0.1-SNAPSHOT\openxds-core-1.0.1-SNAPSHOT.jar
    mvn install:install-file -DgroupId=org.openhealthtools.openxds -DartifactId=iheos -Dversion=1.0.1 -Dpackaging=jar -Dfile=D:\repo\org\openhealthtools\openxds\iheos\1.0.1-SNAPSHOT\iheos-1.0.1-SNAPSHOT.jar
        mvn install:install-file -DgroupId=org.openhealthtools.openexchange -DartifactId=openexchange-audit -Dversion=1.0 -Dpackaging=jar -Dfile=D:\repo\org\openhealthtools\openexchange\openexchange-audit\1.0-SNAPSHOT\openexchange-audit-1.0-SNAPSHOT.jar
    mvn install:install-file -DgroupId=org.openhealthtools.openexchange -DartifactId=openexchange-actorconfig -Dversion=1.0 -Dpackaging=jar -Dfile=D:\repo\org\openhealthtools\openexchange\openexchange-actorconfig\1.0-SNAPSHOT\openexchange-actorconfig-1.0-SNAPSHOT.jar

mvn install:install-file -DgroupId=org.openhealthtools.openexchange -DartifactId=openexchange-config -Dversion=1.0 -Dpackaging=jar -Dfile=D:\repo\org\openhealthtools\openexchange\openexchange-config\1.0-SNAPSHOT\openexchange-config-1.0-SNAPSHOT.jar

4) type mvn package


5) Copied the jars from D:\repo into c:\users\\.m2\repository [ if u needed ] or you can point as local repository



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





















Hit Counter


View My Stats