title: how to do selfhosting web service in java application
body: <p>I have a <code>Java Application</code>. I use <code>Netbeans 7.4</code> IDE. I want to host some <code>web service methods</code> within this application so that other clients can get data provided by this application using web service.<br>
  I don't want to host this web servis on any web server, i want to host this only within the application itself <code>like WCF selfhosting in .NET</code>.<br>
  I have been developing C# applications and i have knowladge about WCF but i am just a starter of Java world. Is it possible to host web service endpoints within the application itself like happens in .NET?</p>