Skip to content
Snippets Groups Projects
Commit 7edafa8e authored by anttil's avatar anttil
Browse files

BIS-139 / SP-229: Make hot deployment work not only on initialization of DSS.

SVN: 28325
parent f1c56a8d
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,10 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends ...@@ -42,6 +42,10 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends
private Class<? extends IJavaDataSetRegistrationDropboxV2> programClass; private Class<? extends IJavaDataSetRegistrationDropboxV2> programClass;
private String className;
private String dropboxName;
/** /**
* @param globalState * @param globalState
*/ */
...@@ -50,12 +54,14 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends ...@@ -50,12 +54,14 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends
{ {
super(globalState); super(globalState);
String className = className =
PropertyUtils.getMandatoryProperty(globalState.getThreadParameters() PropertyUtils.getMandatoryProperty(globalState.getThreadParameters()
.getThreadProperties(), PROGRAM_CLASS_KEY); .getThreadProperties(), PROGRAM_CLASS_KEY);
dropboxName = globalState.getThreadParameters().getThreadName();
PluginContainer container = PluginContainer container =
PluginContainer.tryGetInstance(globalState.getThreadParameters().getThreadName()); PluginContainer.tryGetInstance(dropboxName);
if (container != null) if (container != null)
{ {
...@@ -160,6 +166,22 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends ...@@ -160,6 +166,22 @@ public class JavaTopLevelDataSetHandlerV2<T extends DataSetInformation> extends
{ {
try try
{ {
PluginContainer container =
PluginContainer.tryGetInstance(dropboxName);
if (container != null)
{
@SuppressWarnings("unchecked")
Class<? extends IJavaDataSetRegistrationDropboxV2> clazz =
(Class<? extends IJavaDataSetRegistrationDropboxV2>) container
.tryGetPluginClassByClassname(className);
if (clazz != null)
{
return clazz.newInstance();
}
}
return programClass.newInstance(); return programClass.newInstance();
} catch (InstantiationException ex) } catch (InstantiationException ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment