|
[
Permalink
| « Hide
]
Franck Wolff added a comment - 17/Dec/07 05:48 PM
We'll see what is done in Flex3 and BlazeDS.
Do you think that for 1.0.0 version, you can at least provide add* methods for services, channels and factories in ServicesConfig class? One should be able to use this methods to add more destinations at runtime.
I badly needed this so implemented it myself. It is not the most elegant solution, but it was a minimal modification and it works fantastic.
I created a custom SpringServiceFactory to retrieve a bean from spring using the name specified in the 'source' property of the flex RemoteObject. Additionaly the SpringServiceFactory validates the resulting bean, making sure it is marked with a custom FlexService annotation so only those beans are accessible through the gateway. I have added 3 new methods in the trunk:
public void addService(Service service) { services.put(service.getId(), service); } public void addChannel(Channel channel) { channels.put(channel.getId(), channel); } public void addFactory(Factory factory) { factories.put(factory.getId(), factory); } It will be in the 1.0.0 release, thanks for this suggestion. Great! Is just great!
Yesterday I have created a mechanism for dynamically detecting service destination from Spring configured beans by using an annotation @Destination, and a BeanPostProcessor and a builder that generates and XML document on the fly to create a ServicesConfig instance. This addition will help me to avoid the generation of XML document. However, for 0.4.0 version we are using, this generation is still needed. We look forward to the new 1.0.0 version which, as I can see, is about to be released! Thanks a lot for the good work! Hi Franck!
Starting to work with GraniteDS 1.0.0, I have noticed that the behavior for loading ServicesConfig has changed, meaning, that GDS does not set an servlet context attribute with the loaded configuration for later reuse but, as far as I can tell, rather reload it at each filter initialization. Perhaps this filter is initialized only once. But since the services config is visible only inside the filter, as it is private, makes it impossible to make future changes to this configuration programatically. I had to copy/paste the AMFMessageFilter in order to insert dynamic destination discovery with Spring. Am I missing something from this change? |
|||||||||||||||||||||||||||||||||||||