DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 15 Jun 2007 08:21:01 -0700,    posted on: microsoft.public.dotnet.distributed_apps        back       

Thread Index
  1    calderara


Windows service and Timers ???   
dear all,

I have build a windows service hosting a remote component object call 
through a client applciation using TCP.
The remote componenent is filling incoming data to a SQL buffer table.

then I have define on my service side a timer object which is executed evry 
5 seconds ad pool for new incoming data into this buffer. If it founds some 
then it call a function from  an other assemblies which is calling a 
parameterized store procedure.

Doing this process from a test application by starting the poling mnually 
with a button works greats.
But when running on timer based inside my service, it sounds that teh 
function is not completly executed, few lines in the calling function gets 
executed but not the others. I have log this to file to notify this.

I have used my timer event as follow :


 protected override void OnStart(string[] args)
        {
            // Configure remoting object attribute
            
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, true);

            // Configure current event history management
            m_tPool = new System.Timers.Timer(5000);
            m_tPool.Enabled = true;
            
            // Hook up the Elapsed event for the timer.
            m_tPool.Elapsed += new ElapsedEventHandler(OnTimedEvent);
                     
                        
            GetConnectionFromConfigFile();
            m_Hist = new 
Maillefer.EventManager.History.EventHistory(m_SqlConfig, m_SqlConRuntime);
            m_tPool.Start();
        }


// event called on timer tick
private  void OnTimedEvent(object sender, ElapsedEventArgs e)
        {
            sw.WriteLine("Timer ticket:" +DateTime.Now);
            sw.Flush(); 
            m_Hist.UpdateHistory();
            
        }

Is there any issue with timers inside a service ?
Why my store procedure is not executed when call as shoen above ?

Thnask for help
regards
serge
Date:Fri, 15 Jun 2007 08:21:01 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us