471,319 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

problem with client activated object's lease time

Hi

I have a problem with my client activated objects. The service has
very short lease time. Client calls function add(2,3) which saves
total sum of 6. Then client performs Thread.Sleep(6) which is longer
than service lease time. When I call add again the total is 12. Why
the object is not leased? - if i use wellknown (Singleton ) the object
is propertly leased ( total sum is back 0 )

Also how can I get wsdl of the service? In wellknown it is simple - I
need it for SOAPSUDS

Here are server and client configuration files:
///SERVER
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="asd">
<lifetime leaseTime="1s" sponsorshipTimeout="1s"
renewOnCallTime="1s" />
<service>
<activated type="RemoteClass.Mathematica, RemoteClass"/>
</service>
<channels>
<channel ref="http" port="5000">
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
///CLIENT
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="RemoteClient">
<client url="http://localhost:5000">
<activated type="RemoteClass.Mathematica, RemoteClass"/>
</client>
<channels>
<channel ref="http" port="0">
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
RemotingConfiguration.Configure("RemoteClient.exe. config",
RemoteClass.Mathematica obj = new RemoteClass.Mathematica();
Console.WriteLine(obj.GetProduct(2, 3));
Console.WriteLine(obj.Total);

Thread.Sleep(6000);

Console.WriteLine(obj.GetProduct(2, 3));
Console.WriteLine(obj.Total);
Console.WriteLine(obj.GetHostLocation()); // obj is in the proper
AppDomain ( server app domain )
Console.ReadLine();

Best Regards
Piotr Kolodziej
Jun 27 '08 #1
0 1096

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by JJ | last post: by
4 posts views Thread by Martin Maat | last post: by
reply views Thread by Tomislav Bartolin | last post: by
12 posts views Thread by Steven Berkovitz | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.