|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| Resin3xContainer.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* ========================================================================
|
|
| 3 |
*
|
|
| 4 |
* Copyright 2004 The Apache Software Foundation.
|
|
| 5 |
*
|
|
| 6 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
| 7 |
* you may not use this file except in compliance with the License.
|
|
| 8 |
* You may obtain a copy of the License at
|
|
| 9 |
*
|
|
| 10 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
| 11 |
*
|
|
| 12 |
* Unless required by applicable law or agreed to in writing, software
|
|
| 13 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
| 14 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
| 15 |
* See the License for the specific language governing permissions and
|
|
| 16 |
* limitations under the License.
|
|
| 17 |
*
|
|
| 18 |
* ========================================================================
|
|
| 19 |
*/
|
|
| 20 |
package org.apache.cactus.integration.ant.container.resin;
|
|
| 21 |
|
|
| 22 |
import java.io.File;
|
|
| 23 |
import java.io.IOException;
|
|
| 24 |
|
|
| 25 |
import org.apache.cactus.integration.ant.util.ResourceUtils;
|
|
| 26 |
import org.apache.tools.ant.taskdefs.Java;
|
|
| 27 |
import org.apache.tools.ant.types.FilterChain;
|
|
| 28 |
import org.apache.tools.ant.types.Path;
|
|
| 29 |
|
|
| 30 |
/**
|
|
| 31 |
* Special container support for the Caucho Resin 3.x servlet container.
|
|
| 32 |
*
|
|
| 33 |
* @version $Id: Resin3xContainer.java 239003 2004-05-31 20:05:27Z vmassol $
|
|
| 34 |
*/
|
|
| 35 |
public class Resin3xContainer extends AbstractResinContainer |
|
| 36 |
{
|
|
| 37 |
// AbstractContainer Implementation ----------------------------------------
|
|
| 38 |
|
|
| 39 |
/**
|
|
| 40 |
* @see org.apache.cactus.integration.ant.container.Container#getName
|
|
| 41 |
*/
|
|
| 42 | 0 |
public final String getName()
|
| 43 |
{
|
|
| 44 | 0 |
return "Resin 3.x"; |
| 45 |
} |
|
| 46 |
|
|
| 47 |
// AbstractResinContainer Implementation -----------------------------------
|
|
| 48 |
|
|
| 49 |
/**
|
|
| 50 |
* @see AbstractResinContainer#getContainerDirName
|
|
| 51 |
*/
|
|
| 52 | 0 |
protected final String getContainerDirName()
|
| 53 |
{
|
|
| 54 | 0 |
return "resin3x"; |
| 55 |
} |
|
| 56 |
|
|
| 57 |
/**
|
|
| 58 |
* @see AbstractResinContainer#startUpAdditions(Java)
|
|
| 59 |
*/
|
|
| 60 | 0 |
protected void startUpAdditions(Java theJavaContainer, Path theClasspath) |
| 61 |
{
|
|
| 62 |
// It seems Resin 3.x requires the following property to be
|
|
| 63 |
// set in order to start...
|
|
| 64 | 0 |
theJavaContainer.addSysproperty(createSysProperty( |
| 65 |
"java.util.logging.manager", "com.caucho.log.LogManagerImpl")); |
|
| 66 |
|
|
| 67 |
// Add the resin_home/bin directory to the library path so that the
|
|
| 68 |
// resin dll/so can be loaded.
|
|
| 69 | 0 |
theJavaContainer.addSysproperty(createSysProperty( |
| 70 |
"java.library.path", new File(getDir(), "bin"))); |
|
| 71 |
|
|
| 72 |
// Add the tools.jar to the classpath. This is not required for
|
|
| 73 |
// Resin 2.x but it is for Resin 3.x
|
|
| 74 | 0 |
addToolsJarToClasspath(theClasspath); |
| 75 |
} |
|
| 76 |
|
|
| 77 |
/**
|
|
| 78 |
* @see AbstractResinContainer#prepareAdditions(File, FilterChain)
|
|
| 79 |
*/
|
|
| 80 | 0 |
protected void prepareAdditions(File theInstallDir, |
| 81 |
FilterChain theFilterChain) throws IOException
|
|
| 82 |
{
|
|
| 83 | 0 |
ResourceUtils.copyResource(getProject(), |
| 84 |
RESOURCE_PATH + getContainerDirName() + "/app-default.xml",
|
|
| 85 |
new File(theInstallDir, "app-default.xml"), theFilterChain); |
|
| 86 |
} |
|
| 87 |
} |
|
| 88 |
|
|
||||||||||