1 23 24 28 29 34 35 package com.sun.ejb.containers.util; 36 37 import com.sun.corba.ee.spi.orbutil.threadpool.Work; 38 import com.sun.corba.ee.spi.orbutil.threadpool.ThreadPoolManager; 39 import com.sun.corba.ee.spi.orbutil.threadpool.ThreadPool; 40 import com.sun.enterprise.util.S1ASThreadPoolManager; 41 import com.sun.enterprise.util.ORBManager; 42 43 import com.sun.enterprise.util.threadpool.Servicable; 44 45 import java.util.logging.Logger ; 46 import java.util.logging.Level ; 47 import com.sun.logging.LogDomains; 48 49 54 55 public class ContainerWorkPool { 56 57 public static Logger _logger=LogDomains.getLogger(LogDomains.UTIL_LOGGER); 58 59 public static void addLast(Servicable ser) { 60 addLast(new WorkAdapter(ser)); 61 } 62 63 public static void addFirst(Servicable ser) { 64 addLast(new WorkAdapter(ser)); 65 } 66 67 public static void addFirst(Work work) { 68 addLast(work); 69 } 70 71 public static void addLast(Work work) { 72 ThreadPoolManager threadpoolMgr = 73 S1ASThreadPoolManager.getThreadPoolManager(); 74 ThreadPool threadpool = threadpoolMgr.getDefaultThreadPool(); 75 threadpool.getAnyWorkQueue().addWork(work); 76 } 77 78 } 79 80 | Popular Tags |