Archive for the ‘coding’ Category

Mobile StadtPlan Resurrection

Tuesday, May 1st, 2007

I resurrected the Mobile StadtPlan application. I died due to account lose on a powerful server and the the replacement of iceberry...

It's not back online based on Java 6.0, MySql, AutoTrace and Spring.

If anybody wants to continue working on it, please feel free to contact me. Most important: get a SourceForge project for it and start talking to Stadt Wien again to obtain vector graphics instead of the images.

Database setup before UnitTests for each configuration with Team Foundation/MSBuild

Friday, April 20th, 2007

environment .Net Project, Team Foundation Server, MSBuild

problem Nightly Build containing multiple configurations (e.g. debug, release,...) and the requirement to install a database before the testcases are executed. It is not enough to install the database once for all configurations.

Initial we overwrote the BeforeTest target, but this is getting called only once for all configurations.

solution

Edit TFSBuild.proj

<!-- copied from C:\\Program Files\\MSBuild\\Microsoft\\VisualStudio\\v8.0\\TeamBuild\\Microsoft.TeamFoundation.Build.targets -->
<Target Name="CoreTest"
        DependsOnTargets="$(CoreTestDependsOn)" >

  <MakeDir
        Directories="$(TestResultsRoot)"
        Condition="!Exists('$(TestResultsRoot)')" />

  <MSBuild
        Projects="$(MSBuildProjectFile)"
        Targets="RunTestWithConfigurationWithDB"
        Properties="BuildNumber=$(BuildNumber);Platform=%(ConfigurationToBuild.PlatformToBuild);Flavor=%(ConfigurationToBuild.FlavorToBuild);IsDesktopBuild=$(IsDesktopBuild)" />
</Target>

<Target Name="RunTestWithConfigurationWithDB" >
  <!-- Make sure the Database is freshly setup for each FlavorToBuild -->

  <!-- Database Setup -->
  <Message Text="Creating fresh database. Flavor: $(Flavor) Platform: $(Platform) IsDesktopBuild: $(IsDesktopBuild)"/>

  <Exec Command="db.init.cmd" Timeout="1200000" WorkingDirectory="somedir)"/>

  <MSBuild
        Projects="$(MSBuildProjectFile)"
        Targets="RunTestWithConfiguration"
        Properties="BuildNumber=$(BuildNumber);Platform=$(Platform);Flavor=$(Flavor);IsDesktopBuild=$(IsDesktopBuild)" />
</Target>

references Search for 'How To: Batch Tasks with Item Metadata' in MSDN. This gave me a good idea when targets are called multiple times and when not.

WCF invoking Java/JBoss using SOAP: Bad Performance

Thursday, April 19th, 2007

environment .Net calling a SOAP service exposed by Java/JBoss via a svcutil generated proxy using HttpBasicBinding

problem bad performance

solution Make sure you don't create the proxy everytime you invoke the service. Caching in a static member seems appropriate, but I'm unsure if you need recreate the proxy object in case of an error

comparision if you invoke a WCF with a similar wsdl, at least for us, it didn't make any difference in performance