I've seen similar issues and addressed it by overriding
ChainedProperties.getResources with a map to hold the enumeration once it is
found rather than constantly going back to the classloader-


        Map<String, Enumeration&lt;URL>> resourceMap = new TreeMap<String,
Enumeration&lt;URL>>();
        private Enumeration<URL> getResources(String name, ClassLoader 
classLoader)
{

                if (resourceMap.containsKey(name)) {
                        return resourceMap.get(name);
                }
                Enumeration<URL> enumeration = null;
                try {
                        enumeration = classLoader.getResources(name);
                } catch (IOException e) {
                        e.printStackTrace();
                }
                resourceMap.put(name, enumeration);
                return enumeration;

        }

--
View this message in context: 
http://drools.46999.n3.nabble.com/CPU-Spike-creating-a-StatefulKnowledgeSession-using-OSGi-tp1053579p3647726.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to