#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/*
 * StateListener.java
 */
package ${package}.servlets; 

import com.rhythm.louie.service.ServiceFactory;
import com.rhythm.louie.servlet.ServiceRegister;

import java.util.ArrayList;
import java.util.Collection;

import javax.servlet.annotation.WebListener;

import ${package}.${service_lowercase}.${service_titlecase}ServiceFactory;

/**
 * LoUIE Service Registration Hook
 */
@WebListener()
public class StateListener extends ServiceRegister {
    @Override
    public Collection<ServiceFactory> loadFactories() {
        Collection<ServiceFactory> factories = new ArrayList<>();
        
        factories.add(${service_titlecase}ServiceFactory.getInstance());
        
        return factories;
    }
}

@@ -695,16 +695,20 @@
 ies.add(
+new 
 $%7Bservic
@@ -737,20 +737,8 @@
 tory
-.getInstance
 ());

fix StateListener to remote getInstance() call