Bndtools

It seems to be very helpful when developing the OSGI bundle.
The easy, powerful and productive way to develop with OSGi. Based on bnd and Eclipse.
Type the following command at the OSGI console.
osgi> telnetd --port 1234 start telnetd is running on 127.0.0.1:1234 osgi>
|
Modularizing existing web applications with OSGi

The following site gives good explanation and examples to show how to modularize existing web applications with OSGI.
http://server.dzone.com/articles/modularizing-existing-web
To make examples to be run, the point is that you should make the new Target definition which loads bundles under [example]/rsp_repository/rsp_target_platform.
and don't forget to copy org.eclipse.pde.http.ui_1.0.0.jar file to the dropins folder under eclipse installed folder.
The following picture shows example.
Target definition can be added by
Windows > Preferences > Plug-in Development > Target Platform menu.
: Reload command is useful when you copied some bundle to plugin folder newly.
: In the case of locations, variables can be used as below
ex) ${project_loc}\lib
ex) ${eclipse_home}
If you specify import packages in the MANIFEST.MF file as below,
Import-Package:
javax.servlet.jsp.jstl.fmt
If no problem is, the specified jar will be added to the Plug-in Dependencies.
If not, check if the jar file including that package is in the target definition folder. This validation can be run at the "Run configuration" dialog as well.
help
: lists all available commands
ss | grep text
: lists services which matches with text
bundle [bundle id]
: prints detailed information like Id,Status, Data Root and etc.
b [build id]
: prints all meta data related to this bundle
update [bundle id]
: applies newest bundle
diag [bundle id]
: prints diagnose messages
packages [package name]
: lists all the bundles which use the given package. Wild card can be used at package name.
install file:[file path]
: install a bundle into running OSGI environment.
* [bundle symbolic name] also can be sued instead of [bundle id]
* And more useful console
Command | Description |
---|---|
start | Starts a bundle given an ID or symbolic name |
stop | Stops a bundle given an ID or symbolic name |
install | Adds a bundle given a URL for the current instance |
uninstall | Removes a bundle given a URL for the current instance |
update | Updates a bundle given a URL for the current instance |
active | Lists all active bundles in the current instance |
headers | List the headers for a bundle given an ID or symbolic name |
ss | Lists a short status of all the bundles registered in the current instance |
services <filter> | Lists services given the proper filter |
diag | Runs diagnostics on a bundle given an ID or symbolic name |
Refer :
http://www.ibm.com/developerworks/library/os-ecl-osgiconsole/
http://isurues.wordpress.com/2009/01/01/useful-equinox-osgi-commands/
WCF Routing with Failover and Load Balancing

The following sample shows how to support failover and load balancing using WCF Routing.
Sorry, but web.config has an error. Same service was specified as backup list so this causes to round robin routing to fail. Fix this problem by yourself.
References : http://www.codeproject.com/Articles/778575/WCF-Routing-Service-Part-III-Failover-Load-Balanci
After setting the URL Rewriter on IIS, I got the following error from WCF services which were set as polling duplex or net.tcp protocols.
The message with To 'http://localhost/WCFService.svc' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree. |
The reason is that by default, WCF ensures that the To of each Message matches the intended address.
It's simple to resolve this. Set the AddressFilterMode as Any!
[ServiceBehavior(AddressFilterMode=AddressFilterMode.Any)]
Here's sample code:
[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)] public class CalculatorService : ICalculator { public double Add(double n1, double n2) { return n1 + n2; } public double Subtract(double n1, double n2) { return n1 - n2; } public double Multiply(double n1, double n2) { return n1 * n2; } public double Divide(double n1, double n2) { return n1 / n2; } } |
References:
http://msdn.microsoft.com/en-us/library/system.servicemodel.addressfiltermode(v=vs.110).aspx
HTTP Redirect VS URL Rewrite
1. HTTP Redirect
Redirecting sends a HTTP 301 or 302 to the client,
telling the client that it should try to access the page using another URL.
The client knows that there is another URL that should be used.
2. URL Rewrite
Rewriting happens on the server, and simply is a translation of one URL to another,
that is used by your web application.
The client does not know that internally there is another URL,
it just sees the one it sent to the server.
(http://forums.iis.net/t/1174487.aspx?How+does+URL+Rewrite+differ+from+HTTP+Redirect+)
Installing ARR manually without WebPI (Web Platform Installer)
1. Stop IIS
2. Download and install the Web Farm Framework module.
2.1 Web Platform Installer
2.2 WebDeploy 2.0
2.3 http://www.iis.net/downloads/microsoft/web-farm-framework
3. Download and install the External cache
4. Download and install the URL Rewrite
http://www.iis.net/downloads/microsoft/url-rewrite
5. Download and install the Application Request Routing
http://www.iis.net/downloads/microsoft/application-request-routing
6. Restart IIS
Example
Assume that we want to forward the url ending with "/test" like http://localhost/test to http://localhost:81/.
The following example shows how to do this.
{R:2} means that the rest of url excepting 'http://host/test' address. You can check this from the test pattern.
☞ Tip
To check what the problem is when setting the URL rewrite rule, access it in the server that owns the rule. Then, the browser will give you more information. In addition, use fiddler to check the whole access URL.
References
- http://www.iis.net/learn/extensions/url-rewrite-module/modifying-http-response-headers
Refer following links:
Generating Load Tests for WCF Services with the WCF Load Test Tool
Create and run a load test
Tinyget - to test or to troubleshoot HTTP client-to-server communication

TinyGet version 5.2
TinyGet 5.2 (TinyGet.exe) is a command-line Hypertext Transfer Protocol (HTTP) client that supports multiple threads and looping. You can use TinyGet to test or to troubleshoot HTTP client-to-server communication. By using TinyGet, you can customize your test request by configuring many different factors, including the authentication method, the HTTP version, and the output format. You can also use scripts that specify looping and multithreading.
Reference : http://support.microsoft.com/kb/840671/en
Download Link: http://www.microsoft.com/en-us/download/details.aspx?id=17275