Hello,

I have a SFSB with an action method as follows:


  | @Stateful     
  | @Name("searchResult")
  | @Scope(CONVERSATION) 
  | public class SearchResultAction implements SearchResult {
  |  //code ....
  | 
  |     public String export() {
  |             if(!exportAvailable) {
  |                     
if(!ActionUtil.clearUserExportFolder(user,FacesContext.getCurrentInstance())) {
  |                             logger.warn("some files may not be deleted!");
  |                     }
  |             }
  |             try {
  |                     if(!ExportDataUtil.checkCapacity(indexResultSet)) {
  |                             FacesMessages.instance().add("Sorry! too many 
records to export, please refine your query to decline the result");
  |                             return "";
  |                     }
  |                     
  |                     logger.debug("exporting....");
  |                     logger.debug("request parameter:" + exportType);
  |                     
  |                     ExportDataUtil export = new ExportDataUtil();
  |                     
  |                     String path = 
ActionUtil.checkUserExportFolder(user,FacesContext.getCurrentInstance());
  | 
  | //commented code
  | 
  | //                  if("xml".equals(exportType)) {
  | //                          
export.exportToXML(path,indexResultSet,columnHeaders);
  | //                  }else if("pdf".equals(exportType)) {
  | //                          
export.exportToPDF(path,indexResultSet,columnHeaders);
  | //                  }else if("word".equals(exportType)) {
  | //                          
export.exportToRTF(path,indexResultSet,columnHeaders);
  | //                  }else if("access".equals(exportType)) {
  | //                          
export.exportToAccess(path,indexResultSet,columnHeaders);
  | //                  }else if("excel".equals(exportType)) {
  | //                          
export.exportToExcel(path,indexResultSet,columnHeaders);
  | //                  }else {
  | //                          logger.error("unable to export, invalid 
parameter.");
  | //                          FacesMessages.instance().add("Unable to export, 
an unexpected error has been occured, please try again.");
  | //                          return "";
  | //                  }
  | 
  |                     exportAvailable = true;
  |                     return "exportList";
  |             }catch (Exception e) {
  |                         e.printStacktrace();
  |                     exportAvailable = false;
  |                     return "";
  |             }
  |     }
  | 
  | }
  | 

as you can see, I commented out the part of code in which I export the 
information to various formats, this is work with no problem but if I remove 
the comment, at this point the method will create the exported file correctly, 
but suddenly the conversation will ends!!! 

what is wrong with this code? I checked the ExportDataUtil and put many logs to 
see if there is any exception but no exception occurred, and the exported file 
will be created when this method is called

would you tell me what is the problem.

any help is appreciated


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

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

Reply via email to