[rules-users] how to create kbases with useful names for JMX

cjohns13 christopher.johnston at netboss.com
Tue May 27 16:37:01 EDT 2014


How can I create new container / knowledgebases so that the names as shown in
JMX are not random UUID() strings?  

Something like this currently: 
KieContainer container =
KieServices.Factory.get().newKieContainer(releaseId);
container.newKieSession("myName");

When you enable mbeans via Kie.mbeans.enabled=true

Yields, in JMX:

objectName: org.drools.kbases:type=2d4ffdab-2aca-4d5d-8c44-a5031c4d4094

but, would rather have it be
org.drools.kbases:type=myName

How can I create the container/kbase/session so it gets a good name, as it
stands now?  I can see in KnowledgeBaseFactoryServiceImpl.java that there is
a way to set this kbaseId, but can't figure out a way to actually set this
at the high level.




--
View this message in context: http://drools.46999.n3.nabble.com/how-to-create-kbases-with-useful-names-for-JMX-tp4029719.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list