Changeset 2534
- Timestamp:
- Jun 30, 2014, 9:07:21 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/OpenGridService.java
r2359 r2534 15 15 import org.slf4j.LoggerFactory; 16 16 17 import net.sf.basedb.clients.web.extensions.service.Services; 17 18 import net.sf.basedb.core.Application; 18 19 import net.sf.basedb.core.ConfigurationException; … … 22 23 import net.sf.basedb.core.User; 23 24 import net.sf.basedb.util.XMLUtil; 25 import net.sf.basedb.util.extensions.Extension; 24 26 25 27 /** … … 65 67 } 66 68 67 static final OpenGridService getInstance(SessionControl sc )69 static final OpenGridService getInstance(SessionControl sc, Extension ext) 68 70 { 69 71 OpenGridService srv = getInstance(); 70 72 srv.sc = sc; 73 srv.ext = ext; 71 74 return srv; 72 75 } … … 74 77 private volatile boolean isRunning; 75 78 private SessionControl sc; 79 private Extension ext; 76 80 private Map<String, OpenGridCluster> clusters; 77 81 private TimerTask jobStatusTimer; … … 137 141 public synchronized void restart() 138 142 { 139 stop(); 140 start(); 143 Services.restart(ext); 141 144 } 142 145 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/OpenGridServiceFactory.java
r2309 r2534 4 4 import net.sf.basedb.core.SessionControl; 5 5 import net.sf.basedb.util.extensions.ActionFactory; 6 import net.sf.basedb.util.extensions.Extension; 6 7 import net.sf.basedb.util.extensions.InvokationContext; 7 8 … … 36 37 { 37 38 SessionControl sc = context.getClientContext().getSessionControl(); 38 return new ServiceControllerAction[] { new OpenGridServiceControllerAction(sc ) };39 return new ServiceControllerAction[] { new OpenGridServiceControllerAction(sc, context.getExtension()) }; 39 40 } 40 41 // --------------------------------------------- … … 44 45 { 45 46 private final SessionControl sc; 47 private final Extension ext; 46 48 47 OpenGridServiceControllerAction(SessionControl sc )49 OpenGridServiceControllerAction(SessionControl sc, Extension ext) 48 50 { 49 51 this.sc = sc; 52 this.ext = ext; 50 53 } 51 54 … … 63 66 public void start() 64 67 { 65 OpenGridService.getInstance(sc ).start();68 OpenGridService.getInstance(sc, ext).start(); 66 69 } 67 70
Note: See TracChangeset
for help on using the changeset viewer.