/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/**
* Information about a running application. Applications are composed of modules.
* Modules run in an individual container.
*
* @author Jerome Dochez
*/
// The reversed modules contain the same elements as modules but just in
private boolean isJavaEEApp = false;
private boolean isLoaded = false;
/**
* Creates a new instance of an ApplicationInfo
*
* @param events
* @param source the archive for this application
* @param name name of the application
*/
}
}
if (metaDataValue != null) {
}
}
if (metaDataValue != null) {
}
return null;
}
/**
* Returns the registration name for this application
* @return the application registration name
*/
return name;
}
/**
* Returns the deployment time libraries for this application
* @return the libraries
*/
return libraries;
}
/**
* Sets the deployment time libraries for this application
* @param libraries the libraries
*/
}
/**
* Sets the application classloader for this application
* @param cLoader application classloader
*/
}
/**
* Returns whether this application is a JavaEE application
* @return the isJavaEEApp flag
*/
public boolean isJavaEEApp() {
return isJavaEEApp;
}
/**
* Sets whether this application is a JavaEE application
* @param engineInfos the engine info list
*/
isJavaEEApp = true;
break;
}
}
}
/**
* Returns the directory where the application bits are located
* @return the application bits directory
* */
return source;
}
/**
* Returns the modules of this application
* @return the modules of this application
*/
return modules;
}
/**
* Returns the list of sniffers that participated in loaded this
* application
*
* @return array of sniffer that loaded the application's module
*/
}
}
return sniffers;
}
/*
* Returns the EngineRef for a particular container type
* @param type the container type
* @return the module info is this application as a module implemented with
* the passed container type
*/
try {
} catch (Exception e) {
// ignore, wrong container
}
}
}
return refs;
}
protected ExtendedDeploymentContext getSubContext(ModuleInfo info, ExtendedDeploymentContext context) {
return context;
}
throws Exception {
if (isLoaded) {
return;
}
}
}
}
}
isLoaded = true;
}
}
}
}
public void start(
}
// registers all deployed items.
}
}
}
}
}
}
}
try {
}
}
} finally {
}
}
if (!isLoaded) {
return;
}
try {
}
isLoaded = false;
}
} finally {
}
}
isSuccess = false;
}
}
return isSuccess;
}
isSuccess=false;
}
}
return isSuccess;
}
}
// clean up the app level classloader
if (appClassLoader != null) {
try {
} catch (Exception e) {
// ignore, the class loader does not need to be
// explicitely stopped or already stopped
}
}
// clean the module class loaders if they are not already
// been cleaned
try {
} catch (Exception e) {
// ignore, the class loader does not need to be
// explicitely stopped or already stopped
}
}
}
}
events.send(new EventListener.Event<DeploymentContext>(Deployment.APPLICATION_CLEANED, context), false);
}
}
/**
* Saves its state to the configuration. this method must be called within a transaction
* to the configured Application instance.
*
* @param app the application being persisted
*/
}
// not a JavaEE module, create it here
}
}
}
}
public boolean isLoaded() {
return isLoaded;
}
}