Kaynağa Gözat

CommEngine temp changes and maven repo

tags/CommEngine-0.0.1
yiu 6 yıl önce
ebeveyn
işleme
e0e56ddf97
2 değiştirilmiş dosya ile 37 ekleme ve 20 silme
  1. +14
    -1
      pom.xml
  2. +23
    -19
      src/main/java/altk/comm/engine/CommEngine.java

+ 14
- 1
pom.xml Dosyayı Görüntüle

@@ -19,6 +19,18 @@
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency><!-- add support for ssh/scp -->
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

@@ -55,7 +67,8 @@
<uniqueVersion>false</uniqueVersion>
<id>alertek_repo</id>
<name>Alertek Repository</name>
<url>scp://supernova/home/vpxdev/repository</url>
<url>scp://dev1.link2tek.net/home/alerttekdev/maven_repo</url>
<layout>default</layout>
</repository>
</distributionManagement>


+ 23
- 19
src/main/java/altk/comm/engine/CommEngine.java Dosyayı Görüntüle

@@ -102,31 +102,35 @@ public abstract class CommEngine extends HttpServlet
ServletContext servletContext = getServletContext();
String propertiesFilePath;
propertiesFilePath = servletContext.getInitParameter(getPropertiesContextName());
File propertiesFile = new File(propertiesFilePath);
// Configure log4j using log4j.properties file, \
// sibling to the engine properties file.
// This change is backward compatible with placing the log4j.properties file in
// the class path.
String log4j_properties = propertiesFile.getParent() + "/log4j.properties";
try
{
PropertyConfigurator.configure(log4j_properties);
}
catch (Exception e)
{
// Do nothing, assuming the exception is FileNotFoundException.
// Remaining log4j initialization will look for log4j.properties
// file in the class path.
}
// propertiesFilePath = servletContext.getInitParameter(getPropertiesContextName());
// File propertiesFile = new File(propertiesFilePath);
//
// // Configure log4j using log4j.properties file, \
// // sibling to the engine properties file.
// // This change is backward compatible with placing the log4j.properties file in
// // the class path.
// String log4j_properties = propertiesFile.getParent() + "/log4j.properties";
// try
// {
// PropertyConfigurator.configure(log4j_properties);
// }
// catch (Exception e)
// {
// // Do nothing, assuming the exception is FileNotFoundException.
// // Remaining log4j initialization will look for log4j.properties
// // file in the class path.
// }
// This activates Logger class instantiation. At this point, if lo4j
// is not yet configured,
// it will look for the log4j.properties file in the class path.
myLogger = Logger.getLogger(CommEngine.class);
myLogger.info("init() invoked");
CommonLogger.startup.info("Using lo4j properites file " + log4j_properties);
File propertiesFile = new File(
getClass().getClassLoader().getResource("properties").getFile()
);

// CommonLogger.startup.info("Using lo4j properites file " + log4j_properties);
CommonLogger.startup.info("Using configuration file " + propertiesFile.getAbsolutePath());
config = new Properties();
try


Yükleniyor…
İptal
Kaydet