WARNING: Requires Spring 1.2.8 or newer libraries in the classpath
Allows you to define a Sakai component in a webapp so it can be reloaded,
this makes development easier since it does not require all of Sakai to be restarted
and yet allows you to expose beans to the Sakai component manager
WARNING: This is currently experimental as your bean will not be able to be found by the component
manager while things are starting up (since your webapp will not have loaded up yet),
it is basically only useful for development and some testing right now
How to use:
1) Create a bean for the service you want to proxy in your webapp application context (example: myLocalBean)
2) Create a bean in your webapp like so:
3) Put the interface for your service into shared (this has to be the same interface you are registering in proxyInterfaces)
4) Use
ComponentManager.get(Class) to load up the proxied bean in the service/thing that is using your service
at the point where it is used (not in the init or it will fail):
if (webappService == null) {
webappService = (MyService) ComponentManager.get(MyService.class);
}
That's it. Good luck.