Class VersionedTomcatCommon
java.lang.Object
com.aoindustries.aoserv.daemon.httpd.tomcat.TomcatCommon
com.aoindustries.aoserv.daemon.httpd.tomcat.VersionedTomcatCommon
Some common code for all installations of Tomcat 8.5 and above.
- Author:
- AO Industries, Inc.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[]
generateProfileCatalinaSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateProfileJavaDisableUsageTrackingSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateProfileJavaHeadlessSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateProfileJavaHeapsizeSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateProfileJavaServerSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static String
generateProfileJdkShTarget
(String optSlash) protected static byte[]
generateProfileUmaskSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateShutdownSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) protected static byte[]
generateStartupSh
(String optSlash, String apacheTomcatDir, PosixFile installDir) static String
Gets the suffix to put after an existing file, but before the extension.getInstallFiles
(String optSlash, PosixFile installDir, int confMode) Gets the set of files that are installed during install and upgrade/downgrade.protected com.aoindustries.aoserv.daemon.httpd.tomcat.VersionedTomcatCommon.Version
getRpmVersion
(PackageManager.PackageName packageName, PackageManager.PackageName oldPackageName) Gets the version of the installed RPM.protected abstract boolean
upgradeTomcatDirectory
(String optSlash, PosixFile tomcatDirectory, int uid, int gid) Upgrades the Tomcat installed in the provided directory.void
writeHttpdTomcatDataSource
(ContextDataSource dataSource, ChainWriter out) Writes a single data source.Methods inherited from class com.aoindustries.aoserv.daemon.httpd.tomcat.TomcatCommon
getApacheTomcatDir, getRequiredPackages, writeHttpdTomcatParameter
-
Field Details
-
BACKUP_SEPARATOR
- See Also:
-
BACKUP_EXTENSION
- See Also:
-
KILL_DELAY_ATTEMPTS
public static final int KILL_DELAY_ATTEMPTS- See Also:
-
KILL_DELAY_INTERVAL
public static final float KILL_DELAY_INTERVAL- See Also:
-
-
Method Details
-
getBackupSuffix
Gets the suffix to put after an existing file, but before the extension. -
writeHttpdTomcatDataSource
public void writeHttpdTomcatDataSource(ContextDataSource dataSource, ChainWriter out) throws IOException, SQLException Writes a single data source.See:
- DBCP ? BasicDataSource Configuration
- Tomcat 8.5:
- Tomcat 9.0:
- Tomcat 10.0:
- Tomcat 10.1:
- Specified by:
writeHttpdTomcatDataSource
in classTomcatCommon
- Throws:
IOException
SQLException
-
generateProfileCatalinaSh
protected static byte[] generateProfileCatalinaSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateProfileJavaDisableUsageTrackingSh
protected static byte[] generateProfileJavaDisableUsageTrackingSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateProfileJavaHeadlessSh
protected static byte[] generateProfileJavaHeadlessSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateProfileJavaHeapsizeSh
protected static byte[] generateProfileJavaHeapsizeSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateProfileJavaServerSh
protected static byte[] generateProfileJavaServerSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateProfileJdkShTarget
protected static String generateProfileJdkShTarget(String optSlash) throws IOException, SQLException - Throws:
IOException
SQLException
-
generateProfileUmaskSh
-
generateShutdownSh
protected static byte[] generateShutdownSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
generateStartupSh
protected static byte[] generateStartupSh(String optSlash, String apacheTomcatDir, PosixFile installDir) throws IOException - Throws:
IOException
-
getInstallFiles
protected abstract List<Install> getInstallFiles(String optSlash, PosixFile installDir, int confMode) throws IOException, SQLException Gets the set of files that are installed during install and upgrade/downgrade. Each path is relative to CATALINA_HOME/CATALINA_BASE.- Throws:
IOException
SQLException
-
getRpmVersion
protected com.aoindustries.aoserv.daemon.httpd.tomcat.VersionedTomcatCommon.Version getRpmVersion(PackageManager.PackageName packageName, PackageManager.PackageName oldPackageName) throws IOException Gets the version of the installed RPM.- Parameters:
oldPackageName
- (Optional) the old name for the package before changing to aorepo.org.- Throws:
IOException
-
upgradeTomcatDirectory
protected abstract boolean upgradeTomcatDirectory(String optSlash, PosixFile tomcatDirectory, int uid, int gid) throws IOException, SQLException Upgrades the Tomcat installed in the provided directory.- Parameters:
optSlash
- Relative path from the CATALINA_HOME to /opt/, including trailing slash, such as../../opt/
.- Throws:
IOException
SQLException
-