I have Flex/AIR app that connects to a tomcat server via BlazeDS. I'm not finding that I have to integrate an old webapp (struts/jsp) and I'd like to keep that webapp untouched except for login, authentication and session handling. Also a 3rd java app that uses httpclient.
Currently I have some blazeDS remote objects to handle login/logout with a few RPC calls. In turn, FlexSession objects are created and handled. Is there a way to use httpclient and javascript to call those blazeds RPCs so I dont have to recode and have 3 different means to handle logins and sessions?
This is supposed to 开发者_如何学Cuse single_sign_on for the 3 apps as well.
Yes, handle everything differently I'm afraid!
you should only use BlazeDS to (de)serliaise your Java objects to/from AMF. Once that's done, hand off to something else to do your business logic. This means you can add different entry points just by providing the API for your business logic.
From the Authentication / Login type stuff, you should be using something like spring security to handle this rather than writing your own. This decouples this type of logic from your business logic and transport mechanisms, and can be reused regardless of how you access your application.
For sessions, it depends on what you are storing, but using FlexSession isn't usually a good plan.
精彩评论