Issue Details (XML | Word | Printable)

Key: GDS-754
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: William Draï
Reporter: Morille Jerome
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GraniteDS

Tide: automatic configuration do not take care of services-config.xml custom <destination id="spring">

Created: 24/Aug/10 08:34 PM   Updated: 25/Aug/10 11:12 AM   Resolved: 25/Aug/10 11:12 AM
Component/s: Tide
Affects Version/s: 2.2.0_RC1
Fix Version/s: 2.2.0_RC2

Environment: Using Spring Namespace configuration(and by backend org.granite.spring.FlexFilter automatic configuration) and services-config.xml for custom destination spring configuration


 Description  « Hide
Using the tide and Spring namespace configuration, the org.granite.spring.FlexFilter don't take care of the serviceConfig configuration of the destination with id "spring"
(for exemple to custom the validator-class-name)

In fact,
The org.granite.spring.FlexFilter (line 172) try to find an services-config.xml for destination "spring" by using this method
 
Destination destination = servicesConfig.findDestinationById("flex.messaging.services.RemotingService", "spring");

But services.RemotingService is the classname
and messages.RemotingMessage is the MessageType correct parameter

like the say the method signature

org.granite.config.flex.ServicesConfig {
...
public Destination findDestinationById(String messageType, String id) {
...


To correct this bug,
just past the messageType parameter in order to have

Destination destination = servicesConfig.findDestinationById("flex.messaging.messages.RemotingMessage", "spring");


I have tested it, and it take of the services-config.xml destination configuration

Best regards

Morille Jerome added a comment - 24/Aug/10 08:41 PM
Index: spring/org/granite/spring/FlexFilter.java
===================================================================
--- spring/org/granite/spring/FlexFilter.java (revision 4007)
+++ spring/org/granite/spring/FlexFilter.java (working copy)
@@ -169,7 +169,7 @@
          service = new Service("granite-service", "flex.messaging.services.RemotingService",
          "flex.messaging.messages.RemotingMessage", null, null, new HashMap<String, Destination>());
          }
- Destination destination = servicesConfig.findDestinationById("flex.messaging.services.RemotingService", "spring");
+ Destination destination = servicesConfig.findDestinationById("flex.messaging.messages.RemotingMessage", "spring");
          if (destination == null) {
          List<String> channelIds = new ArrayList<String>();
          channelIds.add("graniteamf");

William Draï added a comment - 25/Aug/10 11:12 AM
Thanks for the patch.
Applied in trunk.

Note: there was the same problem with Seam configuration