I'm using java.util.Timer to schedule a periodic task. At one point, I'd like to shut it down, and wait for it to finish.
Timer.cancel() will prevent any future tasks from running. How do I make sure any tasks are not running at the moment (or wait for them if they are?)
I can introduce external synchronization mechanisms, but I don't ...
We are building a large SharePoint 2007 installation with several hundred site collections over four regionally hosted Web applications. We have approximately 12,000 users, spread out more or less evenly around the globe, and each user may visit many site collections - both on their "home" regional server and on other regional servers....
I am required to implement SSO between Liferay and a number of PHP-based systems. Database used is MySQL.
CAS will authenticate through Liferay user database, as well as through user database from System A and System B. The reason why each system use different user database is because they were developed by different teams, perhaps diff...
Hi guys. I am running some thread safe code here. I am using a mutex to protect the section of code that needs to be run only by only 1 thread at a time. The problem I have is using this code sometimes I end up with 2 Mutex objects. This is a static function by the way. How do I make sure only 1 mutex object gets created??
/*static*/ My...
I have a simple c++ application that generates reports on the back end of my web app (simple LAMP setup). The problem is the back end loads a data file that takes about 1.5GB in memory. This won't scale very well if multiple users are running it simultaneously, so my thought is to split into several programs :
Program A is the main exec...
Hello,
I'm using Microsoft Sync framework 1.0 (without ADO.NET services)
I have created 2 custom providers: Xml provider and database provider.
The code of both providers can be seen at:
http://dl.getdropbox.com/u/204110/MyBaseSyncProvider.cs
http://dl.getdropbox.com/u/204110/MyDbSyncProvider.cs
http://dl.getdropbox.com/u/204110/My...
I'll be using a multi-threaded Java program to insert new records to a table in MySQL. Is it necessary to synchronize for this? Or is it OK since each insert is a different record in my case?
...
When i hit a link a window popup is opened.I am having a session managed bean that loads a java.util.List.It is taking few seconds to load that list.
when i click the link twice i am getting concurrent modification exception. because the page is in session mode and first request is still loading the List, before it ends the second reque...
I need a fully-recursive multiple-reader/single-writer lock (shared mutex) for my project - I don't agree with the notion that if you have complete const-correctness you shouldn't need them (there was some discussion about that on the boost mailing list), in my case the lock should protect a completely transparent cache which would be mu...
Hi,
I would like to write a litte data-entry app for mobile phones using JavaME (MIDP/CLDC). How do I best synchronize the data with a local application on my PC (resp. just transfer the data to the PC)? Is there any standard way to connect to the PC if the mobile is plugged in via an USB cable?
I know that I could just connect to some...
I have replication set up between a sql-server 2005 instance and multiple sql-server 2000 instances. The replication will successfully for a while before I get the following error message:
Violation of UNIQUE KEY constraint 'unique_pubsrvdb'. Cannot insert duplicate key in object 'dbo.sysmergesubscriptions'. (Source: MSSQLSERVER, Erro...
I am enhancing an existing algorithm that consists of multiple independent steps to use concurrent tasks. Each of the tasks will create multiple objects to hold its results. In the end, I would like to have a list of all the results to return from the controlling method. At the moment, my code looks something like that
private final Exe...
Across the course of my programs execution a number of threads are started, the amount varies depending on user defined settings but they are all running the same method with different variables.
In some situations, a clean up is required mid execution, part of this is stopping all the threads, I don't want them stop immediately though,...
What are the disadvantages of making a large Java non-static method synchronized? Large method in the sense it will take 1 to 2 mins to complete the execution.
...
Does managed C++ have an equivalent to C#'s lock() and VB's SyncLock? If so, how do I use it?
...
I'm currently designing a smart client app (WPF) which needs to operate in an "occasionally disconnected" mode. For the offline scenario, I'm looking at using:
Disconnected Service Agent Application Block (from the Smart Client Software Factory)
Microsoft Sync Framework
I should mention that I want my smart client app to be XCOPY-de...
I'm trying to find a way to synchronize game state in a browser based game. I've been using Google Web Toolkit, but I think my question pertains to any AJAX or RPC framework.
As for my "game": think chess, but where you need to move the chess pieces in real time; if player 1 moves (drags and drops) a piece to a new location and player 2...
I wrote a multithreaded application for .NET and in a very important portion of code I have the following:
public class ContainerClass {
private object list_lock;
private ArrayList list;
private object init_lock = new object();
private ThreadClass thread;
public void Start() {
lock(init_lock) {
i...
I'm working on a Outlook 2007 AddIn using VSTO and one of the things my addin is supposed to do is to import contacts using web service.
The algorithm for that is very simple: it asks web service for a list of identifiers of items that needs to be synchronized and then it fetches them and saves in Outlook.
The problem happens when I ha...
Can someone explain why examples on threading will always make an object (specifically a member variable) static if it is to be accessed by multiple threads?
My issue is that making the member variable static means that it will be shared among all other instantiations of the class. Sometimes I find that I would like multiple threads wit...