http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
http://msdn.microsoft.com/en-us/library/ms228966.aspx
Source http://www.careerride.com/Spring-bean-lifecycle-in-spring-framework.aspx Question/response JAVA Spring What is Spring? Spring is a framework that resolves common problems in JEE architecture. (JDBC ,integration later, presentation layer …) Spring is managing business objects and encouraging practices POJO model (vs programming model) It’s highly recommended to use a architectural tiers (presentation,business,dao Layer) ; the inejection of the different beans
Le Grand collisionneur de hadrons (LHC) est un gigantesque instrument scientifique situé près de Genève, à cheval sur la frontière franco-suisse, à environ 100 mètres sous terre. C’est un accélérateur de particules, avec lequel les physiciens étudient les plus petites particules connues : les composants fondamentaux de la matière. Le LHC va révolutionner notre compréhension du monde,
Rendre un Jar executable en Spring Nous allons voir dans cet article comment packager un executable jar avec Maven 2 . Ayant rencontrer quelque problème dans le chargement des Beans Spring . Pour cela il faut inclure dans le packaging du jar les fichiers spring.handlers et spring.schemas. Nous utiliserons ici le plugin shade plutot
Samba permet de partager des dossiers sous Linux avec des ordinateurs locaux sous Windows, très pratique, donc ! De plus, il permet d’établir un réseau relativement sécurisé grâce à ses nombreuses fonctions. Commencez d’abord par l’installer : loguez vous en root puis tapez : apt-get install samba Il faut ensuite configurer quelques lignes du fichier
juil
01
Posted by : 1 juillet 2014
| On :http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
http://msdn.microsoft.com/en-us/library/ms228966.aspx
juil
01
Posted by : 1 juillet 2014
| On :docs
http://jaliyaudagedara.blogspot.fr/2013/03/asynchronous-operations-in-wcf.html
http://www.codeproject.com/Articles/646239/NET-Asynchronous-Patterns
resources
https://onedrive.live.com/?cid=5f84eceeec6f3f8e&id=5F84ECEEEC6F3F8E!237&authkey=!ADqvp2nWpn6QtSw
sample code illustration
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AsyncWcfClient { class Program { static wsService1.Service1Client client1 = new wsService1.Service1Client(); static wsService2.Service2Client client2 = new wsService2.Service2Client(); static wsService3.Service3Client client3 = new wsService3.Service3Client(); static void Main(string[] args) { client1.GetDataCompleted += client_GetDataCompleted; client1.GetDataAsync("event-based asynchronous pattern"); Console.WriteLine("Waiting for async operation..."); //client1.BeginGetData("IAsyncResult asynchronous pattern (Client-Side)", new AsyncCallback(GetDataCallBack), null); //Console.WriteLine("Waiting for async operation..."); //client2.BeginWorkerMethod("IAsyncResult asynchronous pattern (Server-Side)", new AsyncCallback(GetDataCallBack), null); //Console.WriteLine("Waiting for async operation..."); //InvokeAsyncMethod("task-based asynchronous pattern"); //Console.WriteLine("Waiting for async operation..."); Console.ReadLine(); } static void client_GetDataCompleted(object sender, wsService1.GetDataCompletedEventArgs e) { Console.WriteLine(e.Result.ToString()); } ////IAsyncResult asynchronous pattern (Client-Side) callback //static void GetDataCallBack(IAsyncResult result) //{ // Console.WriteLine(client1.EndGetData(result).ToString()); //} ////IAsyncResult asynchronous pattern (Server-Side) callback //static void GetDataCallBack(IAsyncResult result) //{ // Console.WriteLine(client2.EndWorkerMethod(result).ToString()); //} //static async void InvokeAsyncMethod(string message) //{ // Console.WriteLine(await client3.MyWorkerMethodAsync(message)); //} } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. [ServiceContract] public interface IService1 { //event-based asynchronous pattern [OperationContract] string GetData(string message); } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using System.Threading; using System.Threading.Tasks; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together. // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging. public class Service1 : IService1 { public string GetData(string message) { Thread.Sleep(5000); return message; } } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Threading.Tasks; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService2" in both code and config file together. [ServiceContract] public interface IService2 { //IAsyncResult asynchronous pattern [OperationContractAttribute(AsyncPattern = true)] IAsyncResult BeginWorkerMethod(string message, AsyncCallback callback, object asyncState); string EndWorkerMethod(IAsyncResult result); } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Threading; using System.Threading.Tasks; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service2" in code, svc and config file together. // NOTE: In order to launch WCF Test Client for testing this service, please select Service2.svc or Service2.svc.cs at the Solution Explorer and start debugging. public class Service2 : IService2 { public IAsyncResult BeginWorkerMethod(string message, AsyncCallback callback, object asyncState) { var task = Task<string>.Factory.StartNew((res) => MyMethod(asyncState,message), asyncState); return task.ContinueWith(res => callback(task)); } public string EndWorkerMethod(IAsyncResult result) { return ((Task<string>)result).Result; } private string MyMethod(object asyncState,string message) { Thread.Sleep(5000); return message; } } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Threading.Tasks; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService3" in both code and config file together. [ServiceContract] public interface IService3 { //task-based asynchronous pattern [OperationContract] Task<string> MyWorkerMethodAsync(string message); } } using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Threading; using System.Threading.Tasks; namespace AsyncWcfService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service3" in code, svc and config file together. // NOTE: In order to launch WCF Test Client for testing this service, please select Service3.svc or Service3.svc.cs at the Solution Explorer and start debugging. public class Service3 : IService3 { public async Task<string> MyWorkerMethodAsync(string message) { return await Task.Factory.StartNew(() => MyMethod(message)); } private string MyMethod(string message) { Thread.Sleep(5000); return message; } } }