Thursday, February 27, 2014

WSO2 ESB 4.8.1 - Remote debugging with IntelliJ IDEA

Apache Synapse is a light-weight ESB written in Java. It is commercially supported by WSO2 ESB which is based on Apache Synapse. In this post I'll describe how to configure IntelliJ IDEA to debug the Apache Synapse code base within WSO2 ESB.

First you need to checkout the code base from svn location by running the following command on terminal:

svn checkout http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/dependencies/synapse/2.1.2-wso2v4 

After completing the checkout operation it is required to build this code base and configure it to the IDE (IntelliJ IDEA). Before building the project make sure following things.
  1. You got a live internet connection throughout the process to download the dependencies.
  2. You got Apache Maven and JDK installed in the system.
  3. Set the environment variable as follows to avoid Maven OutOfMemory error.      MAVEN_OPTS="-Xms768m -Xmx3072m -XX:MaxPermSize=1200m
To build the repository, first navigate in to the 2.1.2-wso2v4 directory through command line and run the following :

mvn clean install

This will also run all the unit tests. Then run:

mvn idea:idea 

to set up the repository as an IntelliJ IDEA project.

Now you can open the IDE (IntelliJ IDEA) and select 'File -> open' and navigate to the directory location. Now the directory will display as an IDEA project. Go ahead and open it.


Now select 'Run -> Edit Configurations...' in IDEA. In the pop up window select 'Add New Configuration' (the plus sign at the top left corner) and select 'Remote' from the drop down menu. Now give a meaningful name and save with the default configurations.


Now download the latest WSO2 ESB release (WSO2 ESB 4.8.1) from WSO2 website:


Extract it to a preferred location. Navigate to {Extracted Location}/wso2esb-4.8.1/bin through command line and run the following command:

sh wso2esb-samples.sh -sn 150 --debug 5005

The ESB will start to listen to port 5005. Now go to IntelliJ IDEA and add a debug point to an appropriate location (I prefer to add the debug point to line 50 in the class ProxyServiceMessageReciever.java as it is the method relevant to catching the SOAP packet that will be sent by the service). Then select " Run -> Debug 'SynapseESBServeDebug' " (The name will differ according to the name you have given to the remote debug configuration).

And now follow the WSO2 ESB documentation to run " ESB Sample 150: Introduction to Proxy Services " to run a sample proxy service. 


After your invoking the Axis2Client you will be able to see that the process has been paused at the break point that you have added earlier. Now your can use IntelliJIdea in the usual way to debug the code.


11 comments:

  1. https://muzamilpc.com/ms-office-2013-crack/
    MS Office 2013 Crack is the most superior version. It has the features that are new as compared to the previous version. They solve all the difficulties and overcomes all the problems that the user is facing in the last version. It involves several suites: Excel file, word file, PowerPoint presentation. It is supportive of all the kind of operating system. And it has a friendly and straightforward interface which performs it simple to use to all the type of people.

    ReplyDelete
  2. maltego crack
    I am very thankful for the effort put on by you, to help us, Thank you so much for the post it is very helpful, keep posting such type of Article. Excellent piece of work, and I am in wonder how you manage all of this content and his entry. I would like to say you have superb capabilities related to your work, and lastly, please keep it up because I am looking for the more

    ReplyDelete
  3. how long does methadone stay in your blood
    This is a hallucinogenic drug. This means that when consumed, it causes the user to have unusual experiences such as hearing sounds, seeing illusions, and feeling things that are not actually there. A drug with an extensive history of both medicinal and recreational use, LSD use does not come without risks. An acid trip can last 12 hours or more, and when it goes wrong it can go terribly wrong. This substance is common at raves, parties, and music festivals, so knowing what acid looks like and understanding the risks is imperative, especially for young adults and teenagers.

    ReplyDelete
  4. The We Level Up FL inpatient depression treatment florida emotional wellness community is an exceptionally particular, present day, forward-thinking office giving imaginative conduct recuperation treatment programs. Treatments happen in a serene manicured setting with open air unwinding regions offering restoration spaces. Giving science-based psychological wellness medicines intended for every customer and conveyed through profoundly customized individual consideration.

    ReplyDelete
  5. The alcohol related hepatitis stage is the initial phase in treating liquor addiction. Withdrawal indications normally die down inside around one to about fourteen days subsequent to beginning detox; be that as it may, this could take longer relying upon the seriousness of your Alcohol Use Disorder (AUD). From that point, you will actually want to zero in on different parts of the recuperation cycle, like various exercises, treatments, advising meetings, and backing choices.

    ReplyDelete
  6. Dweeb'S Lair >>>>> Download Now

    >>>>> Download Full

    Dweeb'S Lair >>>>> Download LINK

    >>>>> Download Now

    Dweeb'S Lair >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  7. Dweeb'S Lair >>>>> Download Now

    >>>>> Download Full

    Dweeb'S Lair >>>>> Download LINK

    >>>>> Download Now

    Dweeb'S Lair >>>>> Download Full

    >>>>> Download LINK AE

    ReplyDelete
  8. Dweeb'S Lair >>>>> Download Now

    >>>>> Download Full

    Dweeb'S Lair >>>>> Download LINK

    >>>>> Download Now

    Dweeb'S Lair >>>>> Download Full

    >>>>> Download LINK oU

    ReplyDelete
  9. Dweeb'S Lair >>>>> Download Now

    >>>>> Download Full

    Dweeb'S Lair >>>>> Download LINK

    >>>>> Download Now

    Dweeb'S Lair >>>>> Download Full

    >>>>> Download LINK Pk

    ReplyDelete