Hi
I have a problem with my client activated objects. The service has
very short lease time. Client calls function GetProdct(2,3) which
saves
total product of 6. Then client performs Thread.Sleep(6) which is
longer
than service lease time. When I call GetProdct again the total is 12
(6+6). 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
can clearly specify path - I
need it for SOAPSUDS
Here are server and client configuration files:
///SERVER
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.runtime .remoting>
<application name="asd">
<lifetime leaseTime="1s" sponsorshipTime out="1s"
renewOnCallTime ="1s" />
<service>
<activated type="RemoteCla ss.Mathematica, RemoteClass"/>
</service>
<channels>
<channel ref="http" port="5000">
</channel>
</channels>
</application>
</system.runtime. remoting>
</configuration>
///CLIENT
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.runtime .remoting>
<application name="RemoteCli ent">
<client url="http://localhost:5000" >
<activated type="RemoteCla ss.Mathematica, RemoteClass"/>
</client>
<channels>
<channel ref="http" port="0">
</channel>
</channels>
</application>
</system.runtime. remoting>
</configuration>
RemotingConfigu ration.Configur e("RemoteClient .exe.config",fa lse)
RemoteClass.Mat hematica obj = new RemoteClass.Mat hematica();
Console.WriteLi ne(obj.GetProdu ct(2, 3));
Console.WriteLi ne(obj.Total);
Thread.Sleep(60 00);
Console.WriteLi ne(obj.GetProdu ct(2, 3));
Console.WriteLi ne(obj.Total);
Console.WriteLi ne(obj.GetHostL ocation()); // obj is in the proper
//AppDomain ( server app domain )
Console.ReadLin e();
Best Regards
Piotr Kolodziej
I have a problem with my client activated objects. The service has
very short lease time. Client calls function GetProdct(2,3) which
saves
total product of 6. Then client performs Thread.Sleep(6) which is
longer
than service lease time. When I call GetProdct again the total is 12
(6+6). 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
can clearly specify path - I
need it for SOAPSUDS
Here are server and client configuration files:
///SERVER
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.runtime .remoting>
<application name="asd">
<lifetime leaseTime="1s" sponsorshipTime out="1s"
renewOnCallTime ="1s" />
<service>
<activated type="RemoteCla ss.Mathematica, RemoteClass"/>
</service>
<channels>
<channel ref="http" port="5000">
</channel>
</channels>
</application>
</system.runtime. remoting>
</configuration>
///CLIENT
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.runtime .remoting>
<application name="RemoteCli ent">
<client url="http://localhost:5000" >
<activated type="RemoteCla ss.Mathematica, RemoteClass"/>
</client>
<channels>
<channel ref="http" port="0">
</channel>
</channels>
</application>
</system.runtime. remoting>
</configuration>
RemotingConfigu ration.Configur e("RemoteClient .exe.config",fa lse)
RemoteClass.Mat hematica obj = new RemoteClass.Mat hematica();
Console.WriteLi ne(obj.GetProdu ct(2, 3));
Console.WriteLi ne(obj.Total);
Thread.Sleep(60 00);
Console.WriteLi ne(obj.GetProdu ct(2, 3));
Console.WriteLi ne(obj.Total);
Console.WriteLi ne(obj.GetHostL ocation()); // obj is in the proper
//AppDomain ( server app domain )
Console.ReadLin e();
Best Regards
Piotr Kolodziej