directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Horton <gary.hor...@comcast.net>
Subject Need to control what port is used with unit testing setup
Date Wed, 16 Sep 2009 21:31:33 GMT
Hi Apache DS team -

    As per your invitation to ask for help at the bottom of 
http://directory.apache.org/apacheds/1.5/42-using-apacheds-for-unit-tests.html, 
I do have a question for you.

    I've succeeded starting up and connecting to the standalone server, 
and in setting up the embedded server. Next I started looking at the 
unit testing instructions on your website, but have come to a dilemma. 
In the section "Creating a Blank Test", it is stated that "...let's 
declare the framework for a simple unit test, using a server which will 
be used through socket (the first free port above 1023 will be used)..." 
- and I see from looking at the LdapServerFactory source that indeed 
this is how it is done. I wonder however if there are any hidden hooks 
you might have that would allow us to control what port is used - or to 
at least find out at runtime what port has been selected.

    We'd need this information because we are using iBatis, connecting 
to a JDBC-LDAP bridge driver (http://myvd.sourceforge.net/bridge.html). 
To make the iBatis connection, we need a database URL, something like 
jdbc:ldap://localhost:10389/ou=system (which works out of the box with 
the standalone service for Apache DS). So one way or the other, we'd 
need to at a minimum know what port is in use, or better yet be able to 
set that port explicitly.

    Any ideas? Thanks mucho for any help here -

Best,
Gary Horton


Mime
View raw message