Hi All,
We are facing difficulty in executing the custom dm_method with EXECUTE DO METHOD query. Below is our requirement.
We have created method by pointing our java class CustomClassA, Say the method isCustomMethod.
We are executing method from another class with try catch block as shown below.
This is works fine if our block of code is executing without any exception. Incase of any exception during execution, it stops with CustomClassA itself. Catch block of Method Execution is not capturing anything and it keeps waiting for the response from custom code. But the code already executed. So this creates a bottleneck incase of any exception in the custom code.
Is this is try to execute the method. Is there any better to capture exceptions while executiog method using EXECUTE DO_METHOD.
Method Execution:
try{
EXECUTE do_method WITH method= 'CustomMethod', arguments = '-object 123456789'
}
catch(Exception e){
}
Custom Class
<<<<<<<<<
public class CustomClassA
extends CustomClassB
{
private static final Logger logger = Logger.getLogger(CustomClassA.class);
public static void main(String[] args)
throws Exception
{
CustomClassB B= new CustomClassB();
try
{
B.run(args);
}
catch (Exception e)
{
String additionalInfo = "Exception in CustomClassA processing request ";
LoggingUtils.logTopLevelException(logger, e, additionalInfo);
throw e;
}
}
}
>>>>>>>>>>>>>>