Trying to get dbiproxy to accept multiple simultaneous connections in threaded mode on Win32 under ActiveState Perl 5.8 build 804.
Using the following .ppd's from Randy Kobes' site at http://theoryx5.uwinnipeg.ca/ppms/ DBI 1.32 Storable 2.06 Net-Daemon 0.37 PlRPC 0.2016 Running dbiproxy with --mode=threads produces following result: 1. First client connects successfully. 2. Second client connection results in server process crash after producing following message: Bizarre SvTYPE [84] at C:/Perl58/site/lib/Net/Daemon.pm line 464. I was able to get multiple connections working by patching DBI/ProxyServer.pm to move the "require DBI" and "DBI::ProxyServer->init_rootclass()" calls out of the module initialization and into the AcceptVersion method. In this way, DBI is not loaded until after the thread is started. I really don't understand very much about threads or what's going on under the hood, but this information may be of some use to the gurus. Is there some way I should be reporting this other than posting it here? Here is the hack to DBI/ProxyServer.pm that got things working: *** ProxyServer.pm Thu Feb 20 10:45:07 2003 --- ProxyServer.pm.new Thu Feb 20 10:44:48 2003 *************** *** 26,32 **** use strict; use RPC::PlServer 0.2001; ! require DBI; require Config; --- 26,32 ---- use strict; use RPC::PlServer 0.2001; ! #require DBI; require Config; *************** *** 165,170 **** --- 165,172 ---- sub AcceptVersion { my $self = shift; my $version = shift; + require DBI; + DBI::ProxyServer->init_rootclass(); $DBI::VERSION >= $version; } *************** *** 243,249 **** # ############################################################################ ! DBI::ProxyServer->init_rootclass(); package DBI::ProxyServer::dr; --- 245,251 ---- # ############################################################################ ! #DBI::ProxyServer->init_rootclass(); package DBI::ProxyServer::dr;
