title: Jasper Report - How to change xpath executer factory
body: <p>I was checking the following question <a href="https://stackoverflow.com/questions/15875199/jasperreports-fillreport-too-slow-and-resource-consuming">JasperReports fillReport too slow and resource consuming</a> and I tried to apply the verfied answer but couldn't notice any change in the generation of my reports.</p>
  
  <p>Basicaly what I'm trying to do is to change the xpath executer factory for JasperFillManager to use Jaxen instead of Xalan but I can't seem to know where I should place the following line in my code</p>
  
  <pre><code>    DefaultJasperReportsContext context = DefaultJasperReportsContext.getInstance();
      JRPropertiesUtil.getInstance(context).setProperty("net.sf.jasperreports.xpath.executer.factory",
                                                        "net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory");
  </code></pre>
  
  <p>My code block looks as follows</p>
  
  <pre><code>private JasperPrint getJasperPrintInstance(JasperReport report) throws JRException, NamingException, SQLException {
      JasperPrint jasperPrint = null;
      DefaultJasperReportsContext context = DefaultJasperReportsContext.getInstance();
      JRPropertiesUtil.getInstance(context).setProperty("net.sf.jasperreports.xpath.executer.factory",
                                                        "net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory");
      if (dataSource == null) {
          jasperPrint = JasperFillManager.fillReport(report, this.reportParams, connection);
      } else {
          jasperPrint =
              JasperFillManager.fillReport(report, this.reportParams,
                                           new JRBeanCollectionDataSource(getDataSource()));
      }
  
      return jasperPrint;
  }
  </code></pre>
  
  <p>Even when I change "net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory" to anything else nothing changes.</p>
  
  <p>Can you please let me know what I may be doing wrong?</p>