60 req.execute();
61 } catch (Throwable t) {
62 // do nothing at the moment...maybe report an error
63 // in the future
64 }
65 } catch (InterruptedException e) {
66 // do nothing at the present time.
67 }
68 }
69 }
70
71
72 /**
73 * This method initiates the request processor thread. It is safe
74 * to call it after the thread has been started. It provides a way for
75 * clients to deliberately control the context in which the request
76 * processor thread is created
77 */
78 public static synchronized void startProcessing() {
79 if (dispatcher == null) {
80 dispatcher = new ManagedLocalsThread(new RequestProcessor(), "Request Processor");
81 dispatcher.setPriority(Thread.NORM_PRIORITY + 2);
82 dispatcher.start();
83 }
84 }
85
86
87 /**
88 * This method performs lazy initialization.
89 */
90 private static synchronized void lazyInitialize() {
91 if (requestQueue == null) {
92 requestQueue = new Queue<Request>();
93 }
94 }
95
96 }
|
60 req.execute();
61 } catch (Throwable t) {
62 // do nothing at the moment...maybe report an error
63 // in the future
64 }
65 } catch (InterruptedException e) {
66 // do nothing at the present time.
67 }
68 }
69 }
70
71
72 /**
73 * This method initiates the request processor thread. It is safe
74 * to call it after the thread has been started. It provides a way for
75 * clients to deliberately control the context in which the request
76 * processor thread is created
77 */
78 public static synchronized void startProcessing() {
79 if (dispatcher == null) {
80 dispatcher = new Thread(null, new RequestProcessor(), "Request Processor", 0, false);
81 dispatcher.setPriority(Thread.NORM_PRIORITY + 2);
82 dispatcher.start();
83 }
84 }
85
86
87 /**
88 * This method performs lazy initialization.
89 */
90 private static synchronized void lazyInitialize() {
91 if (requestQueue == null) {
92 requestQueue = new Queue<Request>();
93 }
94 }
95
96 }
|