using System;
using System.Collections.Generic;
using System.Text;
using System.EnterpriseServices;

namespace ComPlusHelloWorld
{
   [JustInTimeActivation]
   [ObjectPooling(MinPoolSize = 1, MaxPoolSize = 30, CreationTimeout = 1000)]
   public class PooledObject : ServicedComponent
   {
      public PooledObject() { }

      protected override void Activate()
      {
         // obiekt jest pobierany z puli do obsługi żądania klienta
      }

      protected override void Deactivate()
      {
         // obiekt jest zwracany do puli
      }
   }


   class Program
   {
      static void Main(string[] args)
      {
         HelloLib.HelloWorldComponent hello = new HelloLib.HelloWorldComponent();
         hello.HelloWorld();

         Console.ReadLine();
      }
   }
}
