<commit_before>package org.kie.server.services;

import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

import javax.ws.rs.core.Application;

import org.kie.server.services.impl.KieServerImpl;

public class KieServerApplication extends Application {
    
    private final Set<Class<?>> classes = new CopyOnWriteArraySet<Class<?>>() {
        private static final long serialVersionUID = 1763183096852523317L;
    {
       add(KieServerImpl.class); 
    }};
    
    private final Set<Object> instances = new CopyOnWriteArraySet<Object>() {
        private static final long serialVersionUID = 1763183096852523317L;
    {
       add(new KieServerImpl()); 
    }};
    
    @Override
    public Set<Class<?>> getClasses() {
        return classes;
    }
    
    @Override
    public Set<Object> getSingletons() {
        return instances;
    }

}<commit_msg>DROOLS-494: fixing application to use a singleton server<commit_after>package org.kie.server.services;

import java.util.Collections;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

import javax.ws.rs.core.Application;

import org.kie.server.services.impl.KieServerImpl;

public class KieServerApplication extends Application {
    
//    private final Set<Class<?>> classes = new CopyOnWriteArraySet<Class<?>>() {
//        private static final long serialVersionUID = 1763183096852523317L;
//    {
//       add(KieServerImpl.class); 
//    }};
    
    private final Set<Object> instances = new CopyOnWriteArraySet<Object>() {
        private static final long serialVersionUID = 1763183096852523317L;
    {
       add(new KieServerImpl()); 
    }};
    
    @Override
    public Set<Class<?>> getClasses() {
        return Collections.emptySet();
    }
    
    @Override
    public Set<Object> getSingletons() {
        return instances;
    }

}
{'fraction_non_alphanumeric': 0.10594594594594595, 'fraction_numerical': 0.042702702702702704, 'mean_word_length': 3.206818181818182, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7155597', 'n_tokens_mistral': 605, 'n_tokens_neox': 551, 'n_words': 117}