Pedro Gago
11/5/2004 2:36:00 PM
Hi everybody,
I'm doing tests with the server activation methods: singlecall and
singleton.
My test is (from the client point of view): I open the channel (TCP), I do
10 calls to a server component function and I close the channel. But here
there are the problems:
1) I have writen code in the server component constructor (Sub New). This
code only writes something in the console. The question is that for each
client call the constructor funtion is executed, so I can see 10 times the
text in the console. In my opinion I have only to see once this text.
(Obviously, I don't create a new instance of the server component in the
client each time)
2) The result with one client is that the first call need more time that the
rest. That's ok because I've read that is in the first call that the
instance in the server is created. But what happens when two clients,
executing them at the same time, use the same server component with
Singleton? My result is that in both clients there are a large time for the
first call. In my oponion (reading the documentation) only one instance is
created when we use Singleton, so I don't understand why both clients return
more or less the same time in its first call.
Thanks
Pedro Gago