[Mono-devel-list] xsp webservice initialization on startup

Ulrich Staudinger chicago5 at gmx.de
Sun Nov 7 07:55:18 EST 2004


Hi,

i'll propably do a small workaround: invoking the service through a shell
script: 

---
ps xww | grep "xsp" | cut -c1-5 | xargs kill 2>/dev/null
echo "Server processes killed. Settling. "
sleep 1
xsp --nonstop &
sleep 5
wget http://localhost:8080/ServerGate.asmx -O wget.tmp
echo "Cleaning."
rm wget.tmp
---

Does a simple call to my service, where my service will initialize. Not very
nice, but for now sufficient. 

rgds
ulrich




> If you are talking about initialising your app as soon
> as you start xsp you will need to do some customising.
> 
> >From my understanding of the xsp code it behaves in
> the same way as IIS (and other web servers) in that
> you app is only going to get a chance to do anything
> when its first request is received.
> 
> Likewise global.asax only gets called when the first
> request is received. To get access to objects from
> global.asax you will need to use singletons, as you
> suggest, or pass  them around in the Application
> object.
> 
> hth.
> aaron
> 
> 
> >chicago5 at gmx.de
> Message: 7
> Date: Sun, 7 Nov 2004 10:33:18 +0100 (MET)
> From: "Ulrich Staudinger" <chicago5 at gmx.de>
> To: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-devel-list] xsp webservice
> initialization on startup
> 
> Hmm.... i experimented a bit and found out that the
> global.asax is 
> called
> after the first call to the server on any url. And
> iiuyc the 
> global.asax is
> in fact global and i can't work on my webservice
> applications in the
> global.asax. Or do all applications inside the xsp
> container share the 
> same
> memory, thus a static object initialized in
> global.asax can be accessed 
> +
> used in a webservice, i.e. service.asmx?
> 
> Well, that's not what i was looking for - i was
> looking for a way to
> initialize my WebService on server startup. 
> 
> Can you help a little more?
> 
> many thanks,
> best regards,
> ulrich
> 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Check out the new Yahoo! Front Page. 
> www.yahoo.com 
>  
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 






More information about the Mono-devel-list mailing list