KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > j2ee > deployment > EJBModule


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.j2ee.deployment;
18
19 import java.io.IOException JavaDoc;
20 import java.net.URI JavaDoc;
21 import java.net.URISyntaxException JavaDoc;
22 import java.util.jar.JarFile JavaDoc;
23 import java.util.Map JavaDoc;
24
25 import org.apache.geronimo.deployment.DeploymentContext;
26 import org.apache.geronimo.gbean.AbstractName;
27 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
28 import org.apache.geronimo.kernel.repository.Environment;
29 import org.apache.xmlbeans.XmlObject;
30
31 /**
32  * @version $Rev: 479496 $ $Date: 2006-11-26 20:57:00 -0500 (Sun, 26 Nov 2006) $
33  */

34 public class EJBModule extends Module {
35     private AbstractName moduleCmpEngineName;
36     private final Map JavaDoc sharedContext;
37
38     public EJBModule(boolean standAlone, AbstractName moduleName, Environment environment, JarFile JavaDoc moduleFile, String JavaDoc targetPath, XmlObject specDD, XmlObject vendorDD, String JavaDoc originalSpecDD, Map JavaDoc sharedContext) {
39         super(standAlone, moduleName, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
40         this.sharedContext = sharedContext;
41     }
42
43     public ConfigurationModuleType getType() {
44         return ConfigurationModuleType.EJB;
45     }
46
47     public void addClass(URI JavaDoc location, String JavaDoc fqcn, byte[] bytes, DeploymentContext context) throws IOException JavaDoc, URISyntaxException JavaDoc {
48         context.addClass(location, fqcn, bytes);
49     }
50
51     public AbstractName getModuleCmpEngineName() {
52         return moduleCmpEngineName;
53     }
54
55     public void setModuleCmpEngineName(AbstractName moduleCmpEngineName) {
56         this.moduleCmpEngineName = moduleCmpEngineName;
57     }
58
59     public Map JavaDoc getSharedContext() {
60         return sharedContext;
61     }
62 }
63
64
Popular Tags