All These Things That I've Done

Apply the programming model to everyday programming problems...
posts - 78, comments - 71, trackbacks - 28

remoting

There are 1 entries for the tag remoting
Testare classi che utilizzano Remoting

Problema: dobbiamo scrivere una serie di unit test che testano le funzionalità di un singleton pubblicato con Remoting. Perchè è un problema? Perchè se specifico la porta usata dall'HttpChannel ed eseguo due test consecuitivi che registrano il nostro oggetto mediante l'httpchannel, il secondo test fallirà sempre. Il problema è dovuto al fatto che il socket del canale viene chiuso in maniera non determinstica (quando ne ha voglia il GC), quindi, quando viene eseguita (indirettamente dall'httpchannel) la bind per la seconda volta, viene lanciata un'eccezione che ci avverte che la porta tcp è già in uso ("only one usage of each socket address (protocol/IP address/port)...

posted @ martedì 20 dicembre 2005 15.24 | Feedback (4) | Filed Under [ C# ]

Powered by: