// Path: relproxy_ex_jsf/src/com/journaldev/jsfBeans/ViewEmployeesManagedBean.java
// @ManagedBean
// @SessionScoped
// public class ViewEmployeesManagedBean 
// {
//     private List<Employee> employees = new ArrayList<Employee>();
//     private ViewEmployeesManagedBeanDelegate delegate;
//     
//     public ViewEmployeesManagedBean(){
//  
//     }
//  
//     @PostConstruct
//     public void populateEmployeeList()
//     { 
//     	this.delegate = JProxy.create(new ViewEmployeesManagedBeanDelegateImpl(), ViewEmployeesManagedBeanDelegate.class);   	
//     	delegate.populateEmployeeList(employees);
//     }
//  
//     public List<Employee> getEmployees() 
//     {
//         return delegate.getEmployees(employees);
//     }
//  
//     public void setEmployees(List<Employee> employees) 
//     {
//         this.employees = employees;
//     }
// }
// 
// Path: relproxy_ex_jsf/src/com/journaldev/jsfBeans/ViewEmployeesManagedBeanDelegate.java
// public interface ViewEmployeesManagedBeanDelegate 
// {
//     public void populateEmployeeList(List<Employee> employees);	
//     public List<Employee> getEmployees(List<Employee> employees);    
// }


import com.innowhere.relproxy.RelProxyOnReloadListener;
import com.innowhere.relproxy.jproxy.JProxy;
import com.innowhere.relproxy.jproxy.JProxyCompilerListener;
import com.innowhere.relproxy.jproxy.JProxyConfig;
import com.innowhere.relproxy.jproxy.JProxyDiagnosticsListener;
import com.innowhere.relproxy.jproxy.JProxyInputSourceFileExcludedListener;
import com.journaldev.jsfBeans.ViewEmployeesManagedBean;
import com.journaldev.jsfBeans.ViewEmployeesManagedBeanDelegate;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticCollector;
import javax.tools.JavaFileObject;

                   System.err.println("  line number: " + diagnostic.getLineNumber());                   
                   System.err.println("  column number: " + diagnostic.getColumnNumber());
                   System.err.println("  start position: " + diagnostic.getStartPosition());
                   System.err.println("  position: " + diagnostic.getPosition());                   
                   System.err.println("  end position: " + diagnostic.getEndPosition());
                   System.err.println("  source: " + diagnostic.getSource());
                   System.err.println("  message: " + diagnostic.getMessage(null));
                   i++;
                }
            }
        };
        
        JProxyConfig jpConfig = JProxy.createJProxyConfig();
        jpConfig.setEnabled(true)
                .setRelProxyOnReloadListener(proxyListener)
                .setInputPath(inputSourcePath)
                .setJProxyInputSourceFileExcludedListener(excludedListener)
                .setScanPeriod(scanPeriod)
                .setClassFolder(classFolder)
                .setCompilationOptions(compilationOptions)
                .setJProxyCompilerListener(compilerListener)                
                .setJProxyDiagnosticsListener(diagnosticsListener);
        
        JProxy.init(jpConfig);        
        
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce)
    {

// Path: relproxy_ex_jsf/src/com/journaldev/jsfBeans/ViewEmployeesManagedBean.java
// @ManagedBean
// @SessionScoped
// public class ViewEmployeesManagedBean 
// {
//     private List<Employee> employees = new ArrayList<Employee>();
//     private ViewEmployeesManagedBeanDelegate delegate;
//     
//     public ViewEmployeesManagedBean(){
//  
//     }
//  
//     @PostConstruct
//     public void populateEmployeeList()
//     { 
//     	this.delegate = JProxy.create(new ViewEmployeesManagedBeanDelegateImpl(), ViewEmployeesManagedBeanDelegate.class);   	
//     	delegate.populateEmployeeList(employees);
//     }
//  
//     public List<Employee> getEmployees() 
//     {
//         return delegate.getEmployees(employees);
//     }
//  
//     public void setEmployees(List<Employee> employees) 
//     {
//         this.employees = employees;
//     }
// }
// 
// Path: relproxy_ex_jsf/src/com/journaldev/jsfBeans/ViewEmployeesManagedBeanDelegate.java
// public interface ViewEmployeesManagedBeanDelegate 
// {
//     public void populateEmployeeList(List<Employee> employees);	
//     public List<Employee> getEmployees(List<Employee> employees);    
// }


// Path: relproxy_ex_jsf/src/com/journaldev/conf/JProxyServletContextListener.java
import com.innowhere.relproxy.RelProxyOnReloadListener;
import com.innowhere.relproxy.jproxy.JProxy;
import com.innowhere.relproxy.jproxy.JProxyCompilerListener;
import com.innowhere.relproxy.jproxy.JProxyConfig;
import com.innowhere.relproxy.jproxy.JProxyDiagnosticsListener;
import com.innowhere.relproxy.jproxy.JProxyInputSourceFileExcludedListener;
import com.journaldev.jsfBeans.ViewEmployeesManagedBean;
import com.journaldev.jsfBeans.ViewEmployeesManagedBeanDelegate;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticCollector;
import javax.tools.JavaFileObject;

                   System.err.println("  line number: " + diagnostic.getLineNumber());                   
                   System.err.println("  column number: " + diagnostic.getColumnNumber());
                   System.err.println("  start position: " + diagnostic.getStartPosition());
                   System.err.println("  position: " + diagnostic.getPosition());                   
                   System.err.println("  end position: " + diagnostic.getEndPosition());
                   System.err.println("  source: " + diagnostic.getSource());
                   System.err.println("  message: " + diagnostic.getMessage(null));
                   i++;
                }
            }
        };
        
        JProxyConfig jpConfig = JProxy.createJProxyConfig();
        jpConfig.setEnabled(true)
                .setRelProxyOnReloadListener(proxyListener)
                .setInputPath(inputSourcePath)
                .setJProxyInputSourceFileExcludedListener(excludedListener)
                .setScanPeriod(scanPeriod)
                .setClassFolder(classFolder)
                .setCompilationOptions(compilationOptions)
                .setJProxyCompilerListener(compilerListener)                
                .setJProxyDiagnosticsListener(diagnosticsListener);
        
        JProxy.init(jpConfig);        
        
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce)
    {

        System.out.println("ServletContextListener contextDestroyed");
