Hello,
I have created a webservice (JAX-WS) using Spring and Hibernate, which is deploy into the JBoss EAP server as a war file. Inside this webservice, I have a class that will pull the kjar remotely using http as below:
KieServices kServices = KieServices.Factory.get();
KieRepository kRepository = kServices.getRepository();
UrlResource urlResource = (UrlResource) kServices.getResources().newUrlResource(comSysPara.getParameterValue());
urlResource.setUsername(SpringPropertiesUtil.getProperty(Constants.BRMS_USERNAME));
urlResource.setPassword(SpringPropertiesUtil.getProperty(Constants.BRMS_PASSWORD));
urlResource.setBasicAuthentication(SpringPropertiesUtil.getProperty(Constants.BRMS_BASIC_AUTHENTICATION));
InputStream inputStream = urlResource.getInputStream();
KieModule kModule = kRepository.addKieModule(kServices.getResources().newInputStreamResource(inputStream));
kContainer = kServices.newKieContainer(kModule.getReleaseId());
After that i will use the kContainer to make newKieSession to run the BRMS rules.
In the kjar, I have a process (.bpmn2) which is used to control the ruleflow-group. Everything in the webservice works perfectly if concurrent calls does not occur. However, if there is concurrent call calling the webservice, the webservice will just hang without any exception/error.
Is this the correct way to do?
Regards,
Percy