Skip to content

Commit ae0eabb

Browse files
committed
merge remove of JMS code from local branch rmJMScode
1 parent 8dda36a commit ae0eabb

File tree

6 files changed

+5
-118
lines changed

6 files changed

+5
-118
lines changed

pom.xml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<name>WebServiceShell</name>
88
<groupId>edu.iris</groupId>
99
<artifactId>webserviceshell</artifactId>
10-
<version>2.4.11</version>
10+
<version>2.4.12-SNAPSHOT</version>
1111
<packaging>jar</packaging>
1212

1313
<url>http://iris.edu</url>
@@ -120,7 +120,6 @@
120120
<jersey.version.2x>2.21</jersey.version.2x>
121121
<servlet.version>3.0.1</servlet.version>
122122
<sc.seis.seisFile>2.0.0</sc.seis.seisFile>
123-
<dmc.usage.log.version>1.0.2</dmc.usage.log.version>
124123
<dmc_logging.version>1.1.14</dmc_logging.version>
125124
<hk2.version>2.4.0-b31</hk2.version>
126125
</properties>
@@ -140,12 +139,6 @@
140139
<version>${sc.seis.seisFile}</version>
141140
</dependency>
142141

143-
<dependency>
144-
<groupId>edu.iris.dmc</groupId>
145-
<artifactId>dmc-usage-log</artifactId>
146-
<version>${dmc.usage.log.version}</version>
147-
</dependency>
148-
149142
<dependency>
150143
<groupId>edu.iris</groupId>
151144
<artifactId>dmc_logging</artifactId>
@@ -199,13 +192,6 @@
199192
</dependency>
200193
</dependencies>
201194

202-
<!-- Repositories -->
203-
<repositories>
204-
</repositories>
205-
206-
<pluginRepositories>
207-
</pluginRepositories>
208-
209195
<profiles>
210196
<profile>
211197
<id>metrics</id>
@@ -262,22 +248,4 @@
262248
</profile>
263249
</profiles>
264250

265-
<!-- Distribution Management -->
266-
<distributionManagement>
267-
<repository>
268-
<uniqueVersion>false</uniqueVersion>
269-
<id>nexus-releases</id>
270-
<name>Internal Releases</name>
271-
<url>http://marvin2:8080/nexus/content/repositories/releases</url>
272-
<layout>default</layout>
273-
</repository>
274-
<snapshotRepository>
275-
<uniqueVersion>true</uniqueVersion>
276-
<id>nexus-snapshots</id>
277-
<name>Internal Snapshots</name>
278-
<url>http://marvin2:8080/nexus/content/repositories/snapshots</url>
279-
<layout>default</layout>
280-
</snapshotRepository>
281-
</distributionManagement>
282-
283251
</project>

src/main/java/edu/iris/wss/framework/AppConfigurator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
public class AppConfigurator {
5555
public static final Logger logger = Logger.getLogger(AppConfigurator.class);
5656

57-
public static final String wssVersion = "2.4.11";
57+
public static final String wssVersion = "2.4.12-SNAPSHOT";
5858

5959
public static final String wssDigestRealmnameSignature = "wss.digest.realmname";
6060

@@ -165,7 +165,7 @@ private class Endpoint {
165165
private final Endpoint ep_defaults = new Endpoint();
166166

167167
public static enum LoggingMethod {
168-
LOG4J, JMS, RABBIT_ASYNC
168+
LOG4J, RABBIT_ASYNC
169169
};
170170

171171
/**
@@ -851,7 +851,7 @@ public void loadGlobalParameter(Properties input, Map cfgs, GL_CFGS eKey)
851851
throw new Exception("Unrecognized value for paramater: " + key
852852
+ " value found: " + newVal
853853
+ " should be one of " + LoggingMethod.LOG4J.toString()
854-
+ " or " + LoggingMethod.JMS.toString(), ex);
854+
+ " or " + LoggingMethod.RABBIT_ASYNC.toString(), ex);
855855
}
856856
} else if(currentVal instanceof URL) {
857857
try {

src/main/java/edu/iris/wss/framework/AppContextListener.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,5 @@ public void contextInitialized(ServletContextEvent arg0) {
6868
public void contextDestroyed(ServletContextEvent arg0) {
6969
logger.info("contextDestroyed called, context: "
7070
+ arg0.getServletContext().getContextPath());
71-
if (WssSingleton.webLogService != null) {
72-
try {
73-
// for JMS
74-
WssSingleton.webLogService.cleanUp();
75-
logger.info("contextDestroyed called, JMS cleanUp finished");
76-
} catch (Exception ex) {
77-
System.out.println("*** AppContextListener, webLogService"
78-
+ " cleanup exception: " + ex
79-
+ " msg: " + ex.getMessage());
80-
logger.info("*** AppContextListener, webLogService cleanup"
81-
+ " exception: ", ex);
82-
}
83-
}
8471
}
8572
}

src/main/java/edu/iris/wss/framework/WssSingleton.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
package edu.iris.wss.framework;
2121

22-
// Reference to support JMS logging option.
23-
import edu.iris.dmc.jms.service.WebLogService;
2422
import edu.iris.dmc.logging.rabbitmq.IrisRabbitAsyncPublisher;
2523
import edu.iris.dmc.logging.rabbitmq.IrisRabbitPublisherFactory;
2624

@@ -53,7 +51,6 @@ public class WssSingleton {
5351
public StatsKeeper statsKeeper = new StatsKeeper();
5452
public IrisSingleton singleton = null;
5553

56-
public static WebLogService webLogService = null;
5754
public static IrisRabbitAsyncPublisher rabbitAsyncPublisher = null;
5855

5956
public static final String HEADER_START_IDENTIFIER = "HTTP_HEADERS_START";
@@ -176,9 +173,6 @@ public void configure(String configFileBase) throws Exception {
176173
AppConfigurator.LoggingMethod.RABBIT_ASYNC)) {
177174
String fileName = appConfig.getLoggingConfig().toString();
178175
setupRabbitLogging(fileName);
179-
} else if (appConfig.getLoggingType().equals(
180-
AppConfigurator.LoggingMethod.JMS)) {
181-
setupJMSLogging();
182176
}
183177
}
184178

@@ -247,28 +241,4 @@ private void setupRabbitLogging(String rabbitCfgFile) {
247241
}
248242
}
249243
}
250-
251-
private void setupJMSLogging() {
252-
if (webLogService != null) {
253-
// should always be null if webLogService is held as a static,
254-
// this implies that more than one WssSingleton object is seeing
255-
// this class variable. It should be refactored or there should
256-
// be different classloaders used to isolate this class from another
257-
String msg = "POSSIBLE ERROR, JMS object already exists, null was"
258-
+ " expected for webLogService, webLogService: "
259-
+ webLogService;
260-
System.out.println(msg);
261-
logger.error(msg);
262-
}
263-
264-
webLogService = new WebLogService();
265-
try {
266-
webLogService.init();
267-
logger.info("JMS webLogService init finished");
268-
} catch (Exception ex) {
269-
String msg = "JMS webLogService init ex: ";
270-
System.out.println(msg + ex);
271-
logger.error(msg, ex);
272-
}
273-
}
274244
}

src/main/java/edu/iris/wss/utils/LoggerUtils.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package edu.iris.wss.utils;
2121

22-
import edu.iris.dmc.jms.WebUsageItem;
2322
import edu.iris.dmc.logging.usage.WSUsageItem;
2423
import edu.iris.wss.framework.AppConfigurator;
2524
import java.text.SimpleDateFormat;
@@ -156,43 +155,6 @@ private static void logWssUsageMessage(Level level, WSUsageItem wsuRabbit,
156155
break;
157156
}
158157

159-
} else if (loggingType == LoggingMethod.JMS) {
160-
161-
WebUsageItem wui = new WebUsageItem();
162-
163-
wui.setApplication( olderJMSApplciationName);
164-
wui.setHost( wsuRabbit.getHost());
165-
wui.setAccessDate( wsuRabbit.getAccessDate());
166-
wui.setClientName( wsuRabbit.getClientName());
167-
wui.setClientIP( wsuRabbit.getClientIp());
168-
wui.setDataSize( wsuRabbit.getDataSize());
169-
wui.setProcessTime( wsuRabbit.getProcessTimeMsec());
170-
wui.setNetwork( wsuRabbit.getNetwork());
171-
wui.setStation( wsuRabbit.getStation());
172-
wui.setChannel( wsuRabbit.getChannel());
173-
wui.setLocation( wsuRabbit.getLocation());
174-
wui.setQuality( wsuRabbit.getQuality());
175-
wui.setStartTime( wsuRabbit.getStartTime());
176-
wui.setEndTime( wsuRabbit.getEndTime());
177-
wui.setErrorType( wsuRabbit.getErrorType());
178-
wui.setUserAgent( wsuRabbit.getUserAgent());
179-
wui.setHttpStatus( wsuRabbit.getHttpCode());
180-
wui.setUserName( wsuRabbit.getUserName());
181-
wui.setExtra( wsuRabbit.getExtra());
182-
183-
try {
184-
WssSingleton.webLogService.send(wui);
185-
} catch (Exception ex) {
186-
logger.error("Error while publishing via JMS ex: " + ex
187-
+ " webLogService: " + WssSingleton.webLogService
188-
+ " ex msg: " + ex.getMessage()
189-
+ " application: " + wui.getApplication()
190-
+ " host: " + wui.getHost()
191-
+ " client IP: " + wui.getClientIP()
192-
+ " ErrorType: " + wui.getErrorType());
193-
194-
// logger.error("Error while publishing via JMS stack:", ex);
195-
}
196158

197159
} else if (loggingType == LoggingMethod.RABBIT_ASYNC) {
198160
try {

src/test/resources/StreamEater2Test/tstStreamEat2-service.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version=0.0.0
66
# CORS is enabled by default, set to false to disable CORS processing
77
##corsEnabled=true
88

9-
# LOG4J or JMS
9+
# LOG4J
1010
loggingMethod=LOG4J
1111

1212
# time is seconds

0 commit comments

Comments
 (0)