cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r647151 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java
Date Fri, 11 Apr 2008 12:57:42 GMT
Author: aadamchik
Date: Fri Apr 11 05:57:37 2008
New Revision: 647151

URL: http://svn.apache.org/viewvc?rev=647151&view=rev
Log:
CAY-868 Deprecate EventManager.getDefaultManager() and stop using it

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java?rev=647151&r1=647150&r2=647151&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/event/EventManager.java
Fri Apr 11 05:57:37 2008
@@ -58,6 +58,8 @@
      * EventManager is propagated to DataDomains and DataContexts.
      * 
      * @return EventManager the shared EventManager instance
+     * @deprecated since 3.0 users should create their own instances of EventManager using
+     *             constructor and share them as appropriate for their target use.
      */
     public static EventManager getDefaultManager() {
         if (defaultManager == null) {
@@ -90,7 +92,7 @@
 
         if (!singleThread) {
             dispatchThreads = new ArrayList<DispatchThread>(dispatchThreadCount);
-            
+
             String prefix = "cayenne-edt-" + hashCode() + "-";
 
             // start dispatch threads
@@ -137,8 +139,8 @@
      */
     public void shutdown() {
         this.stopped = true;
-       
-        for(DispatchThread thread : dispatchThreads) {
+
+        for (DispatchThread thread : dispatchThreads) {
             thread.interrupt();
         }
     }



Mime
View raw message