Previously, I use guvnor with no security.
Now, my boss wants me to apply security on guvnor.
http://ngjweb.wordpress.com/2011/12/07/drools-guvnor-manage-access-part-2/
which is using realm of tomcat and create a table is the system for guvnor user.
I tested from browser, the security is working fine even more than 10 users access concurrently.
But when my application access the guvnor and try to create the knowledge base. It's becoming intermittent.
After several time access the guvnor, the guvnor is hang/can not access even from browser.
Here is the exception I got
pCDR-LocalcallWithBRemarks.drl
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:692)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37
The way our app access the guvnor after apply security is as below.
Snipped Code
UrlResource urlResource = (UrlResource) ResourceFactory.newUrlResource(ruleUrl);
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("admin");
urlResource.setPassword("admin");
builder.add(urlResource,ResourceType.DRL);