[Mono-bugs] [Bug 674659] New: LeaseLifeTimeService Property doesn't supported in Mono 2.8

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 24 05:43:00 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=674659

https://bugzilla.novell.com/show_bug.cgi?id=674659#c0


           Summary: LeaseLifeTimeService Property doesn't supported in
                    Mono 2.8
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.8.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: leonadavinci at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
Consider the following code:
using System;
using System.Runtime.Remoting.Contexts;
using System.Threading;

namespace ObjectContextApp
{
    class SportsCar
    {
        public SportsCar(){
            Context ctx = Thread.CurrentContext;
            Console.WriteLine("{0} object in context
{1}",this.ToString(),ctx.ContextID);
            foreach (IContextProperty itfCtxProp in ctx.ContextProperties) {
                Console.WriteLine("-> Ctx Prop: {0} ",itfCtxProp.Name);
            }
        }
    }
    [Synchronization]
    class SportsCarTS:ContextBoundObject{
        public SportsCarTS(){
            Context ctx = Thread.CurrentContext;
            Console.WriteLine("{0} object in context
{1}",this.ToString(),ctx.ContextID);
            foreach (var item in ctx.ContextProperties) {
                Console.WriteLine("-> Ctx Prop: {0}",item.Name);
            }
        }
    }

    class MainClass
    {
        public static void Main (string[] args)
        {
            Console.WriteLine("*** Fun with Object Context ****\n");
            SportsCar sport = new SportsCar();
            Console.WriteLine();
            SportsCar sport2 = new SportsCar();
            Console.WriteLine();
            SportsCarTS synchroSport = new SportsCarTS();

        }
    }
}



Steps to reproduce the problem:
1. Compile the above code using Mono 2.8
2. Run the code in GNU/Linux using Mono ObjectContextApp



Actual Results:
*** Fun with Object Context ****

ObjectContextApp.SportsCar object in context 0

ObjectContextApp.SportsCar object in context 0

ObjectContextApp.SportsCarTS object in context 1



Expected Results:
***** Fun with Object Context *****
ObjectContextApp.SportsCar object in context 0
-> Ctx Prop: LeaseLifeTimeServiceProperty
ObjectContextApp.SportsCar object in context 0
-> Ctx Prop: LeaseLifeTimeServiceProperty
ObjectContextApp.SportsCarTS object in context 1
-> Ctx Prop: LeaseLifeTimeServiceProperty
-> Ctx Prop: Synchronization


How often does this happen? 
Every time.

Additional Information:

If you run the executable ObjectContextApp in Windows 7 using .NET 4 you have
the expected results without recompilation!

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list