Threading.java
01 package org.apache.qpid.thread;
02 
03 public final class Threading
04 {
05     private static ThreadFactory threadFactory;
06     
07     static {
08         try
09         {
10             Class threadFactoryClass = 
11                 Class.forName(System.getProperty("qpid.thread_factory"
12                                                  "org.apache.qpid.thread.DefaultThreadFactory"));
13             
14             threadFactory = (ThreadFactory)threadFactoryClass.newInstance();
15         }
16         catch(Exception e)
17         {
18             throw new Error("Error occured while loading thread factory",e);
19         }
20     }
21     
22     public static ThreadFactory getThreadFactory()
23     {
24         return threadFactory;
25     }
26 }