01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: CcslSuManager.java 11995 2008-02-18 08:39:52Z lzheng $
23: */
24: package com.bostechcorp.cbesb.runtime.ccsl.base;
25:
26: import java.util.HashMap;
27:
28: import javax.jbi.component.ServiceUnitManager;
29: import javax.jbi.management.DeploymentException;
30:
31: import com.bostechcorp.cbesb.common.util.ErrorUtil;
32: import com.bostechcorp.cbesb.runtime.ccsl.lib.CcslUtil;
33: import com.bostechcorp.cbesb.runtime.ccsl.lib.UpocInstance;
34:
35: public class CcslSuManager implements ServiceUnitManager {
36: ServiceUnitManager realSuManager;
37: CcslComponent ccslComponent;
38: private HashMap<String, String> suRootDirs = new HashMap<String, String>();
39:
40: CcslSuManager(CcslComponent comp, ServiceUnitManager realManager) {
41: realSuManager = realManager;
42: ccslComponent = comp;
43: }
44:
45: public String deploy(String arg0, String arg1)
46: throws DeploymentException {
47: return realSuManager.deploy(arg0, arg1);
48: }
49:
50: public void init(String arg0, String arg1)
51: throws DeploymentException {
52: suRootDirs.put(arg0, arg1);
53: ccslComponent.config.loadSuSettings(arg0, arg1);
54: realSuManager.init(arg0, arg1);
55: }
56:
57: public void shutDown(String arg0) throws DeploymentException {
58:
59: realSuManager.shutDown(arg0);
60:
61: }
62:
63: public void start(String arg0) throws DeploymentException {
64: realSuManager.start(arg0);
65: }
66:
67: public void stop(String arg0) throws DeploymentException {
68: ccslComponent.config.stopSuUpocs(arg0);
69: realSuManager.stop(arg0);
70: }
71:
72: public String undeploy(String arg0, String arg1)
73: throws DeploymentException {
74: return realSuManager.undeploy(arg0, arg1);
75: }
76:
77: }
|