Index: trunk/src/oauth/signpost/AbstractOAuthConsumer.java
===================================================================
--- trunk/src/oauth/signpost/AbstractOAuthConsumer.java	(revision 4231)
+++ trunk/src/oauth/signpost/AbstractOAuthConsumer.java	(revision 6849)
@@ -34,5 +34,5 @@
  * ABC for consumer implementations. If you're developing a custom consumer you
  * will probably inherit from this class to save you a lot of work.
- * 
+ *
  * @author Matthias Kaeppler
  */
@@ -55,6 +55,8 @@
     // these are the params which will be passed to the message signer
     private HttpParameters requestParameters;
-
+    
     private boolean sendEmptyTokens;
+    
+    final private Random random = new Random(System.nanoTime());
 
     public AbstractOAuthConsumer(String consumerKey, String consumerSecret) {
@@ -78,5 +80,5 @@
     }
 
-    public HttpRequest sign(HttpRequest request) throws OAuthMessageSignerException,
+    public synchronized HttpRequest sign(HttpRequest request) throws OAuthMessageSignerException,
             OAuthExpectationFailedException, OAuthCommunicationException {
         if (consumerKey == null) {
@@ -109,5 +111,4 @@
 
         signingStrategy.writeSignature(signature, request, requestParameters);
-        OAuth.debugOut("Auth header", request.getHeader("Authorization"));
         OAuth.debugOut("Request URL", request.getRequestUrl());
 
@@ -115,10 +116,10 @@
     }
 
-    public HttpRequest sign(Object request) throws OAuthMessageSignerException,
+    public synchronized HttpRequest sign(Object request) throws OAuthMessageSignerException,
             OAuthExpectationFailedException, OAuthCommunicationException {
         return sign(wrap(request));
     }
 
-    public String sign(String url) throws OAuthMessageSignerException,
+    public synchronized String sign(String url) throws OAuthMessageSignerException,
             OAuthExpectationFailedException, OAuthCommunicationException {
         HttpRequest request = new UrlStringRequestAdapter(url);
@@ -139,5 +140,5 @@
      * Adapts the given request object to a Signpost {@link HttpRequest}. How
      * this is done depends on the consumer implementation.
-     * 
+     *
      * @param request
      *        the native HTTP request instance
@@ -179,5 +180,5 @@
      * {@link #generateNonce()} or {@link #generateTimestamp()} instead.
      * </p>
-     * 
+     *
      * @param out
      *        the request parameter which should be completed
@@ -257,5 +258,5 @@
 
     protected String generateNonce() {
-        return Long.toString(new Random().nextLong());
+        return Long.toString(random.nextLong());
     }
 }
