Praveen Adlakha created FALCON-1621:
---------------------------------------
Summary: Lifecycle of entity gets missed when prism and falcon
server communicates
Key: FALCON-1621
URL: https://issues.apache.org/jira/browse/FALCON-1621
Project: Falcon
Issue Type: Bug
Reporter: Praveen Adlakha
Assignee: Praveen Adlakha
Hi All,
When ever communication happens between Prism and falcon server in distributed
mode methods related to lifecycle will never get called because of :
{code}
private String pathValue(Method method, Object... args) throws FalconException {
Path pathParam = method.getAnnotation(Path.class);
if (pathParam == null) {
throw new FalconException("No path param mentioned for " + method);
}
String pathValue = pathParam.value();
Annotation[][] paramAnnotations = method.getParameterAnnotations();
StringBuilder queryString = new StringBuilder("?");
for (int index = 0; index < args.length; index++) {
if (args[index] instanceof String || args[index] instanceof Boolean
|| args[index] instanceof Integer) {
String arg = String.valueOf(args[index]);
for (int annotation = 0; annotation <
paramAnnotations[index].length; annotation++) {
Annotation paramAnnotation =
paramAnnotations[index][annotation];
String annotationClass =
paramAnnotation.annotationType().getName();
if (annotationClass.equals(QueryParam.class.getName())) {
queryString.append(getAnnotationValue(paramAnnotation,
"value")).
append('=').append(arg).append("&");
} else if
(annotationClass.equals(PathParam.class.getName())) {
pathValue = pathValue.replace("{"
+ getAnnotationValue(paramAnnotation, "value")
+ "}", arg);
}
}
}
}
return pathValue + queryString.toString();
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)