[jboss-jira] [JBoss JIRA] (DROOLS-477) KieScanner is not working as expected
Matteo Mortari (JIRA)
issues at jboss.org
Tue Aug 4 11:31:05 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095496#comment-13095496 ]
Matteo Mortari commented on DROOLS-477:
---------------------------------------
Ciao [~mfusco], I've tried with Drools 6.3.0.Beta2 today and I would like to report my findings in relation to Zahid's [comment|https://issues.jboss.org/browse/DROOLS-477?focusedCommentId=13066050&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13066050].
This is what I'm experiencing so far.
* Before that commit, KieScanner worked with RELEASE and LATEST only by "looking" at local m2 repo - no detection of new releases/snapshots with external/remote nexus repository
* Now with Drools 6.3.0.Beta2, KieScanner work with RELEASE both in local and remote, while LATEST only by "looking" at local m2 repo.
So in my case before, the only way to make it work, was to follow the procedure illustrated in [this forum post|https://groups.google.com/d/msg/drools-usage/x5EKcSg7YIM/kFUXlP9Mm5EJ].
Now with Drools 6.3.0.Beta2, if on the remote nexus a new RELEASE is published, it is detected by the KieScanner.
Now with Drools 6.3.0.Beta2, if on the remote nexus a new LATEST (snapshot) is published, it is not detected by KieScanner, but the procedure illustrated in [this forum post|https://groups.google.com/d/msg/drools-usage/x5EKcSg7YIM/kFUXlP9Mm5EJ] still work, with an external maven process the latest snapshot is updated in the local m2 repo and then detected by the KieScanner.
It is difficult for me to publish a self-contained reproducer given this is more an integration issue requiring a deployed nexus, but I'm available and open to hear how can I support to illustrate the difficulties experienced?
I hope this helps, thank you.
Ciao
> KieScanner is not working as expected
> -------------------------------------
>
> Key: DROOLS-477
> URL: https://issues.jboss.org/browse/DROOLS-477
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.0.1.Final
> Environment: Windows 7
> Reporter: Alexander Pykhtin
> Assignee: Mario Fusco
> Fix For: 6.1.0.Beta4
>
> Attachments: drools_jar.zip, drools_sample.zip
>
>
> KieScanner is not dynamically updates the rules in a sample application.
> drools_sample is a parent project, drools_jar is its dependency that is expected to be dynamically updated.
> Here is the sample code:
> Scanner scanner = new Scanner(System.in);
> try {
> KieServices ks = KieServices.Factory.get();
> ReleaseId releaseId = ks.newReleaseId( "com.study", "drools_sample", "0.0.1-SNAPSHOT" );
> KieContainer kContainer = ks.newKieContainer( releaseId );
> KieSession kSession = null;
> KieScanner kScanner = ks.newKieScanner( kContainer );
> boolean repeat = true;
> // go !
> while(repeat)
> {
> kSession = kContainer.newKieSession("ksession-rules_jar");
> Message message = new Message();
> message.setMessage("Hello World");
> message.setStatus(Message.HELLO);
> DynamicFactType dft = new DynamicFactType();
> kSession.insert(message);
> kSession.insert(dft);
> kSession.fireAllRules();
> kSession.dispose();
> String inp = scanner.nextLine();
> if(inp.length() > 0)
> repeat = false;
> else
> {
> kScanner.scanNow();
> }
> }
> } catch (Throwable t) {
> t.printStackTrace();
> }
> scanner.close();
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list