You're absolutely right. 

I can cast the following to a set of Objects

Set<Object> mySet = 
(Set<Object>)methodInvocation.getCalledMethod().invoke(methodInvocation.getTargetObject(),
 methodInvocation.getArguments());
  |             
and then loop through it with

Iterator iter = mySet.iterator();

In the particular cases where I know my object type I can call
parent.getChildren().getChildName() and indeed catch the thrown Lazy Init 
Exception

However in the general case where I have no knowledge of my object's 
getters/setters methods name, it is getting a bit more complicated.

Will have to think of method refelction solution. 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109173#4109173

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109173
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to