[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1165) StatelessSession does not have the ability to set globals.

Mark Proctor (JIRA) jira-events at lists.jboss.org
Sat Sep 8 20:41:11 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBRULES-1165?page=comments#action_12376014 ] 
            
Mark Proctor commented on JBRULES-1165:
---------------------------------------

maybe we could provide two export methods. The one above is the simple one, that copies by reference. We could then have another one that allows the person to provide a "copy" implementation on how to export it.

public interface GlobalExporter {
    public Object export(GlobalResolver resolver);
}

public class GlobalExport Impl implements GlobalExporter {
    private String identifer;
    public GlobalExport(String identifier) {
        this.identifer = identifier;
    }

    public Object export(GlobalResolver resolver) {
        ....code that knows how to retrieve and "copy" the identifier.
    }
}

then user can do:
session.exportGlobalsAsResults( new GlobalExpoert[] { new GlobalExpoertImpl("list"),  new GlobalExpoertImpl("person") } );

we may possibly want to allow the person to have a simple GlobalExpoert impl that can actually take an array of identifiers and export an array, so it can do a block of stuff.

> StatelessSession does not have the ability to set globals. 
> -----------------------------------------------------------
>
>                 Key: JBRULES-1165
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1165
>             Project: JBoss Rules
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Reteoo
>    Affects Versions: 4.0.1
>            Reporter: Michael Neale
>         Assigned To: Mark Proctor
>             Fix For: 4.0.2
>
>
> Most likely an oversight. However, to keep the stateless nature of the API - there isn't another way to do this other then add more methods to the interface, unfortunately. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list