public Object execute(CmpEntityBeanContext ctx, Object[] args) throws FinderException {
Collection retVal;
Method method = getMethod();
try {
JDBCQueryCommand query = manager.getQueryManager().getQueryCommand(method);
final CmpEntityBeanComponent selectedComponent = query.getSelectManager().getComponent();
JDBCQueryCommand.EntityProxyFactory factory = new JDBCQueryCommand.EntityProxyFactory() {
public Object getEntityObject(Object primaryKey) {
return queryMetaData.isResultTypeMappingLocal() && selectedComponent.getLocalHomeClass() != null ?
selectedComponent.getEJBLocalObject(primaryKey) : selectedComponent.getEJBObject(primaryKey);
}
};
retVal = query.execute(method, args, null, factory);
} catch (FinderException e) {
throw e;
} catch (EJBException e) {
throw e;
} catch (Exception e) {