.getcurrentrow (DCIteratorBinding) is returning null after an hour

a 夏天 提交于 2019-12-11 11:01:48

问题


I am new in ADF (EJB/JPA not Business Component), when the user is using our new app developed on jdeveloper "12.2.1.2.0", after an hour of activity, system is loosing the current record. To note that the object lost is the parent object.

I tried to change the session-timeout (knowing that it will affect the inactivity time).

public List<SelectItem> getSProvMasterSelectItemList(){
   List<SelectItem> sProvMasterSelectItemList = new ArrayList<SelectItem>();
   DCIteratorBinding lBinding = ADFUtils.findIterator("pByIdIterator");/*After 1 hour I am able to get lBinding is not null*/ 
   Row pRow = lBinding.getCurrentRow();/*But lBinding.getCurrentRow() is null*/
   DCDataRow objRow = (DCDataRow) pRow;
   Prov prov = (Prov) objRow.getDataProvider();
   if (!StringUtils.isEmpty(prov)){
      String code = prov.getCode(); 
      if (StringUtils.isEmpty(code)){
         return sProvMasterSelectItemList;
      }else{
         List<Lov> mProvList = getSessionEJBBean().getProvFindMasterProv(code);
         sProvMasterSelectItemList.add(new SelectItem(null," "));
         for (Lov pMaster:mProvList) {
            sProvMasterSelectItemList.add(new SelectItem(pMaster.getId(),pMaster.getDescription()));
                }
      }
   }
return sProvMasterSelectItemList ;
}

I expect to be able to read the current record at any time, specially that it is the master block, and one record is available.


回答1:


This look like a classic issue of misconfigured Application Module.

Cause : Your application module is timing out and releasing it's transaction before the official adfc-config timeout value.

To Fix : Go to the application module containing this VO > Configuration > Edit the default > Modify Idle Instance Timeout to be the same as your adf session timeout (Take time to validate the other configuration aswell)



来源:https://stackoverflow.com/questions/57676100/getcurrentrow-dciteratorbinding-is-returning-null-after-an-hour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!