Merged fixes form branch. Upgraded version to 1.6
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@144713 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4466af6ef5
commit
eadc152dd8
4
pom.xml
4
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.vremanagement</groupId>
|
||||
<artifactId>smart-executor</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<name>SmartExecutor</name>
|
||||
<description>Smart Executor Service</description>
|
||||
<packaging>war</packaging>
|
||||
|
@ -146,7 +146,7 @@
|
|||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-rt</artifactId>
|
||||
<version>2.1.7</version>
|
||||
<version>2.2.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
|
|
@ -122,28 +122,30 @@ public class SmartExecutorTask implements InterruptableJob {
|
|||
}
|
||||
|
||||
Map<String, Map<String, String>> pluginStateNotificationWithInputs = launchParameter.getPluginStateNotifications();
|
||||
for(String pluginStateNotificationsClassName : pluginStateNotificationWithInputs.keySet()){
|
||||
if(pluginStateNotificationsClassName.compareTo(SmartExecutorPersistenceConnector.class.getName())==0) {
|
||||
logger.warn("{} is for internal use only. It will be skypped", pluginStateNotificationsClassName);
|
||||
continue;
|
||||
if(pluginStateNotificationWithInputs!=null){
|
||||
for(String pluginStateNotificationsClassName : pluginStateNotificationWithInputs.keySet()){
|
||||
if(pluginStateNotificationsClassName.compareTo(SmartExecutorPersistenceConnector.class.getName())==0) {
|
||||
logger.warn("{} is for internal use only. It will be skypped", pluginStateNotificationsClassName);
|
||||
continue;
|
||||
}
|
||||
if(pluginStateNotificationsClassName.compareTo(JobCompletedNotification.class.getName())==0){
|
||||
logger.warn("{} is for internal use only. It will be skypped", pluginStateNotificationsClassName);
|
||||
continue;
|
||||
}
|
||||
Class<? extends PluginStateNotification> clazz;
|
||||
try {
|
||||
logger.trace("Trying to instantiate {}", pluginStateNotificationsClassName);
|
||||
clazz = (Class<? extends PluginStateNotification>) Class.forName(pluginStateNotificationsClassName);
|
||||
Constructor<?> constructor = clazz.getConstructor(Map.class);
|
||||
Map<String,String> notificationInputs = pluginStateNotificationWithInputs.get(pluginStateNotificationsClassName);
|
||||
PluginStateNotification pluginStateNotification = (PluginStateNotification) constructor.newInstance(notificationInputs);
|
||||
logger.trace("{} succesfully instantiated : {}", pluginStateNotificationsClassName, pluginStateNotification);
|
||||
pluginStateNotifications.add(pluginStateNotification);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error instantiating {} : {}. It will be ignored", pluginStateNotificationsClassName, e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
if(pluginStateNotificationsClassName.compareTo(JobCompletedNotification.class.getName())==0){
|
||||
logger.warn("{} is for internal use only. It will be skypped", pluginStateNotificationsClassName);
|
||||
continue;
|
||||
}
|
||||
Class<? extends PluginStateNotification> clazz;
|
||||
try {
|
||||
logger.trace("Trying to instantiate {}", pluginStateNotificationsClassName);
|
||||
clazz = (Class<? extends PluginStateNotification>) Class.forName(pluginStateNotificationsClassName);
|
||||
Constructor<?> constructor = clazz.getConstructor(Map.class);
|
||||
Map<String,String> notificationInputs = pluginStateNotificationWithInputs.get(pluginStateNotificationsClassName);
|
||||
PluginStateNotification pluginStateNotification = (PluginStateNotification) constructor.newInstance(notificationInputs);
|
||||
logger.trace("{} succesfully instantiated : {}", pluginStateNotificationsClassName, pluginStateNotification);
|
||||
pluginStateNotifications.add(pluginStateNotification);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error instantiating {} : {}. It will be ignored", pluginStateNotificationsClassName, e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
|
|
Loading…
Reference in New Issue