This content has been marked as final.
Show 1 reply
-
1. Re: EJBProcessor with primitive arguments
xibalban Aug 11, 2010 7:20 AM (in response to xibalban)I resolved the problem by making a dirty hack to EJBProcessor.
In process() I'm doing this:
for (int i = 0; i < ejbParams.size(); i++) { // get the parameter from the esb message and // cast it to the in the jboss-esb.xml specified type type = ejbParams.get(i).getType(); obj = msg.getBody().get(ejbParams.get(i).getLoc()); // slight int hack part 1 if (type.equals("int")) { param[i] = Integer.parseInt(obj.toString()); } else { param[i] = ClassUtil.forName(type, getClass()).cast(obj); } log.debug("param " + i + ":" + param[i]); }
...and in invoke() this:
for (int i = 0; i < ejbParams.size(); i++) { type = ejbParams.get(i).getType(); // slight int hack part 2 if (type.equals("int")) { sigArray[i] = int.class; } else { sigArray[i] = ClassUtil.forName(type, getClass()); } }
It's dirty but it works in this case.