Back Forum Reply New

securing a destination made with createDestination

For starters, BlazeDS w/ Spring Integration is great.  Thanks for that.

I've got a suggestion for a killer sample application in the next release.
Bring back the runtimeconfig-messaging application that was released in the BlazeDS-without-Spring release blazeds-turnkey-4.0.0.14931.

This post showed me the right way to get a reference to the MessageBroker.....the flex forums are littered with others who ran into this issue.

It also to me a while to figure out how to secure a dynamically-created destination (see code below).

Having this basic case all together in a single little test application would have saved me a ton of pain.

Thanks again,

--ErikCode:
ServiceAdapter adapter = destination.getAdapter();
MessagingAdapter msgAdapter = (MessagingAdapter)adapter;
if (adapter !=null amp;amp; adapter instanceof MessagingAdapter) {

MessagingSecurityConstraintManager mscm = new MessagingSecurityConstraintManager( getMessageBroker() );   mscm.setSendConstraint(quot;trustedquot;);   mscm.setSubscribeConstraint(quot;trustedquot;);
msgAdapter.setSecurityConstraintManager(mscm);

}
¥
Back Forum Reply New