1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.jes.jobscheduler.dispatcher.inprocess;
12
13 import org.astrogrid.applications.component.EmptyCEAComponentManager;
14 import org.astrogrid.applications.description.base.ApplicationDescriptionEnvironment;
15 import org.astrogrid.applications.manager.CeaThreadPool;
16 import org.astrogrid.applications.manager.DefaultMetadataService;
17 import org.astrogrid.applications.manager.ExecutionController;
18 import org.astrogrid.applications.manager.MetadataService;
19 import org.astrogrid.applications.manager.QueryService;
20 import org.astrogrid.applications.manager.ThreadPoolExecutionController;
21 import org.astrogrid.component.descriptor.ComponentDescriptor;
22 import org.astrogrid.config.Config;
23
24 import org.picocontainer.MutablePicoContainer;
25
26 import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;
27 import junit.framework.Test;
28
29 /*** Set up a cea server for execution of in-process applications.
30 * Difference between this and the usual vanilla server is that the QueryService in am {@link org.astrogrid.jes.jobscheduler.dispatcher.inprocess.InProcessQueryService}
31 * which will callback notifications directly to the job monitor and results listener interfaces.
32 * @todo currently configured, but empty. needs to be populated with proxy applicaitons.
33 * @author Noel Winstanley nw@jb.man.ac.uk 07-Feb-2005
34 *
35 */
36 public class InProcessCeaComponentManager extends EmptyCEAComponentManager implements ComponentDescriptor{
37
38
39 /*** Construct a new InProcessCeaServer
40 *
41 */
42 public InProcessCeaComponentManager(MutablePicoContainer parent, Config config) {
43 super();
44 pico = parent.makeChildContainer();
45
46 pico.registerComponentImplementation(ApplicationDescriptionEnvironment.class,ApplicationDescriptionEnvironment.class);
47 pico.registerComponentImplementation(ExecutionController.class,ThreadPoolExecutionController.class);
48 pico.registerComponentImplementation(PooledExecutor.class,CeaThreadPool.class);
49 pico.registerComponentImplementation(QueryService.class,InProcessQueryService.class);
50 EmptyCEAComponentManager.registerCompositeApplicationDescriptionLibrary(pico);
51 EmptyCEAComponentManager.registerContainerApplicationDescriptionLibrary(pico);
52
53 EmptyCEAComponentManager.registerDefaultPersistence(pico,config);
54
55 EmptyCEAComponentManager.registerDefaultVOProvider(pico);
56
57 EmptyCEAComponentManager.registerProtocolLibrary(pico);
58 EmptyCEAComponentManager.registerStandardIndirectionProtocols(pico);
59 EmptyCEAComponentManager.registerAstrogridIndirectionProtocols(pico);
60
61
62
63
64 }
65
66 /***
67 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getName()
68 */
69 public String getName() {
70 return "In-Process Cea Server";
71 }
72
73 /***
74 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getDescription()
75 */
76 public String getDescription() {
77 return "Contains Components:\n----------------------------------------------\n" + super.information() + "\n-----------------------------------------------";
78 }
79
80 /***
81 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getInstallationTest()
82 */
83 public Test getInstallationTest() {
84 return null;
85 }
86
87
88 }
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120