Wednesday, May 2, 2012

How to connect Jprofiler with WSO2 Governance Registry

What is JProfiler?
       JProfiler is GUI enabled tool that used to measure performance based measurements such as CPU usage, memory bottlenecks and thread information etc, java based applications. more info

This article will demonstrate how JProfiler used to measure performance statistics in WSO2 Governance Registry. Same time this article applies to all carbon based products in WSO2.
     You can download any carbon based servers from wso2.org to execute this article. In here i am using WSO2 Governance Registry.

1. Download WSO2 Governance Registry
2. Download JProfiler from here.
3. Extract Jprofiler zip and if you are windows run jprofiler.exe or if you are in Linux environment run jprofiler.sh in /bin directory.

Now we need to create new jprofiler project to connect with the governance registry server. Below steps will guide you to create new JProfiler project.

4. Open JProfiler start center window by clicking on the start center button.


5. Click "New Remote Integration" button.

6 . Now profiled application need to locate. If you are locating application runs in same machine, you have to select "On this computer" option. If you are profiling remotely started application in other machine, you have to select "On a remote computer" option. In this article i will use first option.























7.  Now insert your JVM information.
 






















8. Then select profile setting transmission option.



9. Click next button in  JProfiler port setting window.



10.  Copy option text listed in "perform required modification" window and that need to be copy in your CARBON_HOME/bin/wso2server.sh or .bat file like below.





















11. Now start your governance registry and Jprofiler will connect with it.


Tuesday, January 31, 2012

Linux command of removing all .svn sub directories

Following steps will be help to remove all .svn directories

1. Open Linux terminal
2. Change the directory path to project folder.
3. Type below command.
  • find ./ -name ".svn" | xargs rm -rf

Friday, September 2, 2011

How to view check-sum values in JAR file

I had couple of jar files  and i need to check bot files are same or not. Hence those are signed jars i checked check sum values both of that jars. Following are the commands i have used.

1. Open terminal and traversed to the jar file location.
    Ex :  cd /wso2/project/support

2. Do checksum as follows.
    Ex :  md5sum axis2-1.6.1.wso2v1.jar

3. You will see this output
     "18da73bd555fc231ad0ee7c93291549d  axiom-1.2.11.wso2v1.jar"




Monday, August 29, 2011

How to create user in oracle database

Following are the commands to create new user in Oracle database.

1. You have to log in to the oracle command window. In command prompt enter below command.
Syntax : sqlplus sys/DB_password@Database as sysdba;
Ex : sqlplus sys/password@orcl as sysdba;

2. Create user New_User_Name identified by password account unlock;

3. grant connect to New_User_Name;

4. grant create session, dba to New_User_Name;

5. commit;

Thursday, August 18, 2011

How to restore oracle dmp file to the database.

Here are the easiest steps to restore oracle dmp file to your database.

1. First you need to login to the sql command line terminal. Open command prompt if you are using windows and if you are using Linux environment open terminal.

2. Then you have to login to the SQL-PLUS as a system administrator. To do that use following command.
"sqlplus sys/admin@ORADB as sysdba"
Eg: D:\Documents and Settings\Administrator>sqlplus sys/admin@ORADB as sysdba

3. Then you have to create a new database user.
3.1 "create user username identified by password account unlock;"
Eg : create user chamara identified by chamara account unlock;
3.2 "grant connect to username;"
Eg : grant connect to chamara;
3.3 "grant create session, dba to chamara;"
Eg : grant create session, dba to chamara;


4. Now you have to exit from the SQL-PLUS and use "exit" command for that.

5. Finally restore your dmp file using this command.

"imp SYSTEM/test@ORADB fromuser=dbadmin touser=username IGNORE=Y FILE=file_path.dmp"

Eg : D:\Documents and Settings\Administrator>imp SYSTEM/test@ORADB fromuser=WSO2_RSCE touser=chamara IGNORE=Y FILE=D:\chamara\sample.dmp