Programmatically removing grails artifact from application context -
i learned how register custom grails artifacts (i need dynamic controllers in application) using grailsapplication.addartefact(java.lang.string artefacttype, grailsclass artefactgrailsclass) , works fine, realized want able unregister them.
unfortunately, interface grailsapplication provides no clear way , seems unregistering unwanted dynamically registered grails artifacts can done restarting whole application.
maybe i'm missing , artifact can removed application without having restart app?
thank you
you can rebuild grailsapplication. throws away artefacts , loads default ones. means you'd have addartefact artefacts want keep again.
other option access loadedclasses set (which protected) , make changes manually , call populateallclasses make available (this method protected too).
Comments
Post a Comment