"ataylor" wrote : anonymous wrote : How can you add a mapping for each allowable
address if there are no allowable addresses? .....
| |
| | Perhaps there is a terminology mix up here?
|
| By allowable address I'm assuming you mean a destination!
|
Yes I believe you removed the "allowable" when you moved them from postoffice to
address manager.
anonymous wrote :
| so in SimpleAddressManager we would have
|
|
| | public boolean addDestination(final SimpleString address)
| | {
| | Bindings bindings = new BindingsImpl();
| | mappings.putIfAbsent(address, bindings);
| | return destinations.addIfAbsent(address);
| | }
|
| this means that all destinations exist in the mappings object, except that they may
have an empty Bindings object. This also means that when i check for matching addresses i
don't have to check both the destinations and the mappings only the mappings. Taking
this further if they exist in both destinations and mappings we don't need
destinations, we can just check in the mappings, if theres an entry then its an allowable
address, i.e. it has a mapping, empty or not.
Like I said before, there is no guarantee that an allowable destination exists - this is
only used for JMS!!
You're assuming there always an allowable destination for every address that can be
routed to - that is not correct.
Allowable destinations are only used if checkAllowable is true.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199747#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...