|
FlexDataServices
BlazeDS and GraniteDS
BlazeDS and GraniteDS are open source alternatives to Adobe Live Cycle Data Services, which is the "official" solution to make the link between Java servlet container (Tomcat for example) and Flex. GraniteDS provide more features needed for an enterprise grade software (AS3 generator, hibernate integration) and BlazeDS is provided by Adobe. These features are mandatory for Igenko, so we have chosen GraniteDS. You will find on this page some resources for a better integration of these Data Services in you Java software. GraniteDSI have created some Maven artifacts for GraniteDS. You will find bellow the code to include in your pom.xml : <dependencies> <dependency> <groupId>org.graniteds</groupId> <artifactId>graniteds-core</artifactId> <version>1.1.0</version> </dependency> <dependency> <groupId>org.graniteds</groupId> <artifactId>graniteds-spring</artifactId> <version>1.1.0</version> </dependency> </dependencies> <repositories> <repository> <id>igenko</id> <name>Igenko Repository</name> <url>http://www.igenko.org/archiva/repository/igenko</url> </repository> </repositories> Spring and Acegi integration are provided builtin this version. WebcompilerMXML webcompiler is a GraniteDS contribution developped by us. A demo webapp is available. Source code is commited on Granite SVN. It is based on the Flex oem compiler. It has been released in GraniteDS 1.1. BlazeDSYou can find an overview of BlazeDS fetures bellow :
I have created some Maven artifacts for BalzeDS. You will find bellow the code to include in your pom.xml : <dependencies> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-common</artifactId> <version>beta1</version> </dependency> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-core</artifactId> <version>beta1</version> </dependency> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-opt</artifactId> <version>beta1</version> </dependency> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-proxy</artifactId> <version>beta1</version> </dependency> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-remoting</artifactId> <version>beta1</version> </dependency> <!--<dependency> <groupId>com.adobe.flex</groupId> <artifactId>blazeds-spring</artifactId> <version>beta1-12232007</version> </dependency>--> </dependencies> <repositories> <repository> <id>igenko</id> <name>Igenko Repository</name> <url>http://www.igenko.org/archiva/repository/igenko</url> </repository> </repositories> You will need to have the WEB-INF (without the lib directory, as these libs will be included by Maven) and META-INF templates from BlazeDS war file. Spring integrationI have also created a blazeds-spring artifact, based on the Spring-Flex code available here : http://www.adobe.com/devnet/flex/articles/spring_flex.html To enable BlazeDS Spring integration, uncomment the blazeds-spring dependency in the previous pom.xml. The only difference with the Spring-Flex article is the factory package to add in the services-config.xml : <factories> <factory id="spring" class="flex.messaging.service.SpringFactory"/> </factories> Acegi integrationI have developed an AcegiLoginCommand that provide Acegi integration in BlazeDS. The code is based on GraniteDS Acegi integration. It is included in the release beta1-12232007 of blazeds-spring. Code is available here. To use it in your application, you will need :
|
Sign in to add a comment

These links to the XML files are dead!
I found them at these url's:
http://igenko.googlecode.com/svn/trunk/igenko-backoffice/igenko-backoffice-server/src/main/webapp/WEB-INF/acegiSecurityCtx.xml http://igenko.googlecode.com/svn/trunk/igenko-backoffice/igenko-backoffice-server/src/main/webapp/WEB-INF/web.xml http://igenko.googlecode.com/svn/trunk/igenko-backoffice/igenko-backoffice-server/src/main/webapp/WEB-INF/flex/services-config.xml http://igenko.googlecode.com/svn/trunk/igenko-backoffice/igenko-backoffice-server/src/main/webapp/WEB-INF/flex/remoting-config.xml
Could you include working examples of integration with Acegi? For example - displaying some component for specified role
First of all, thanks, this is great. I have tried to use the AcegiLoginCommand? and had one minor issue. It didn't work for me when I tried to logout and login within the same session (I was getting a session is invalidated error). So I've changed the logout method in the code as follows; and it is working for me know. Thought I'd share with you.
public boolean logout(Principal principal) throws SecurityException { HttpServletRequest request = FlexContext.getHttpRequest(); Authentication authentication = getAuthentication(); if (request != null) { // request.getSession().invalidate(); authentication.setAuthenticated(false); } return true; }Are the ctx files for acegi still available? I get File Not Found when I try to access the links above!?!
These links are not working, can u fix these up?
Hey, Great post! Anyway we can see an example of a whole app?
Thanks Matt
I have corrected dead links.
An example of the application is available from the project homepage : http://code.google.com/p/igenko/
The application is currently based on GaniteDS instead of BlazeDS.
An example of the whole app is available here : http://igenko.org/igenko-bo/Index.swf
Great job!
What if a user performs a login, refresh the page and try to login with another username ? It seams that doAuthorization() is called with the previous principal (doAuthentication() is not called with the new credentials)
Hi, I am new to Flex so apologies if this is a simple questions:
1) The files above listed as "granite-config.xml" - should this be titled "remote-config"? I see there is no ref to granite in the services-config file.
2) This setup is securing remote calls to destinations, yes? I have used Acegi previously so am used to url pattern scenario. I have a security constraint against my service destination and when I attempt to call it I just get an error saying authentication required. Normally I would redirect to my login url but what should happen in the Flex case? Should I be catching the fault and then displaying a login view? What is the usage scenario for flex/blaze apps?
thanks in advance for any help...
Eager Flex beginner...
Hi,
1) I renamed granite-config.xml to remote-config.xml. It is sometime confusing to switch between these 2 frameworks ;-)
2) As you said, in current implementation, we just get an error.
I am working on an updated version, based on GraniteDS and Spring Security, that should contain a credential check that require not specific role and that could be used to validate user credentials. If no valid credential is found, it will return false, and we will display an user friendly error message on Flex side.
More details on GraniteDS/Spring Security version can be found here : http://tech.groups.yahoo.com/group/graniteds/message/1374
As said on BlazeDS Jira (http://bugs.adobe.com/jira/browse/BLZ-63), AcegiLoginCommand? could be easily adapted to Spring security only by updating package names.
Once i tried to run a chat implemented using graniteDS gravity. I found that the response time for the server push was quite slow. The interval between chat messages was more than 10-15 secs. Is there any way to speed up the response.
I have not used Gravity for the moment. You should ask your question on GraniteDS forums : http://tech.groups.yahoo.com/group/graniteds/