... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)



I had trouble getting the CruiseControl JSP page that displays build results to work.  It kept getting a 'file not found' error for the log files.  The problem turned out to be caused by spaces in the pathname.  The spaces were being URL-escaped (to %20), but the file was being referenced directly, not as an URL.  This appears to be a bug in CruiseControl.

I have set up a skeletal data directory for a CruiseControl build server.  Since the CruiseControl config.xml does not support variables and is quite repetitive in structure, this skeleton uses Ant to generate the configuration from a simpler configuration file.



Apache's JMeter has sure come a long way since I last looked at it.  It seems to be capable of quite sophisticated web load testing.


SQL Server

In the absence of Enterprise Manager, here is how to create and configure a login using OSQL:

  1. sp_addlogin 'userid','password','defaultdb'
  2. sp_adduser 'userid'
  3. sp_addrolemember 'db_owner','userid'

To switch MSDE to use 'mixed mode' authentication, set the registry key:


to '2' ('1' is Windows authentication mode only, the default).


The key() function is sensitive to the current context node in that it will only find nodes that are in the current document.  This is surprising behaviour.  The XSLT specification actually notes this "feature" (read: bug) at the end of section 12.2.  It suggests using <xsl:for-each select="$document"> construct to switch the context prior to using the key function.  That wouldn't work for me in a stylesheet that I was working on because I needed an XPath expression.  This worked:  $root[key('...', ...)]



To configure a JDBC data source for a web application in JBOSS, perform the following steps:

  1. Add a reference to the data source in web.xml:
      <description>My Data Source</description>
  2. Map the reference name to a JBOSS-style JNDI name in the vendor-specific data source, jboss-web.xml:
  3. Create a data source for the JBOSS-style JNDI name by creating a data source file named my-data-source-ds.xml in the JBOSS deploy directory, containing:
        <connection-url>jdbc:some url</connection-url>
        <check-valid-connection-sql>select 1</check-valid-connection-sql>



Here is how to perform an XSLT transformation and write the result to a file:

var outputStream = new ActiveXObject("ADODB.Stream");
outputStream.Type = 1; // adTypeBinary
xmlDoc.transformNodeToObject(xslDoc, outputStream);
outputStream.SaveToFile("output.html", 2); // adSaveCreateOverWrite

Blog Archive