>>>>> Steinar Bang <[email protected]>:

>> The version of the filter does runtime reconfiguration hasn't been
>> pushed yet, but it will look like this:
>>  
>> https://gist.github.com/steinarb/1c16c1ce4f6148b47581019de1d23e40#file-oldalbumshirofilter-java-L66

>> Here an OldalbumService is injected and is used as a constructor
>> argument to an OldAlbumWebEnvironment, which will look like this (not
>> pushed yet):
>>  
>> https://gist.github.com/steinarb/a7b4bff8786d9e0e37a8925e19090068#file-oldalbumwebenvironment-java-L23

> Will it be enough to run the activate method again, creating a new
> WebEnvironment and use it to set up things?

Answering my question here: Yes, unless I'm fooling myself during early
testing, it was enough to run the contents of the activate method again:

I was able to open an URL in the shiro filter at runtime.

Now just a teensy, weensy bit of cleanup remains (I just did the
quickest hackup I could do to create a new OSGi service, make the OSGi
service reload the config, expose the service all the way to the REST
API and add a button to trigger the reload in the react frontend).

Here is what I did (in non-cleanup form):

 1. Create an interface for a new service
     https://gist.github.com/steinarb/47b6de3f504e1fc8a570a26689644219

 2. Expose the service from the shiro filter and use it to do a reload
    of the shiro config
     
https://gist.github.com/steinarb/39e9b4de1ee2ab6da57eea4c7df9e5b5#file-oldalbumshirofilter-java-L39

 3. Make a REST endpoint
     
https://gist.github.com/steinarb/8a7b9e209a493f9d167924e58f3efde7#file-routesresource-java-L62

 4. Create a redux saga to call the REST endpoint
     https://gist.github.com/steinarb/dd72a9b095a5f48f6483ac12669a5124

 5. Create a menu entry to trigger the reload
     https://gist.github.com/steinarb/34339a67cb34742f2f89860bb585bf6c

Reply via email to