Posts Tagged ‘Spring’

Spring BlazeDS Integration 1.0 is available

Thursday, June 11th, 2009

The final version of Spring BlazeDS Integration 1.0 is available now. Since RC2, SpringSource enhanced the documentation and made some improvements on the messaging adapter. More information about the final version are available on the blog of SpringSource and in the offical annoucement.

You can download the BlazeDS Integration here and the documentation can found here.

Using annotated RemoteServices with the Spring BlazeDS Integration

Saturday, May 16th, 2009

On Wednesday, I found the time to test the annotation based configuration of the Spring BlazeDS Integration. Because it isn’t as easy as I thought, I wrote this little guide with all necessary configurations. You can download the sample project here.

First you have to create a new Flex Project in Flex Builder, select as Application server type “J2EE” and use LiveCycle Data Service as Remoting. Click the button “Next”.

annotated_spring_blazeds_step1

Now you have to select the BlazeDS WAR file and click the button “Finish”.

annotated_spring_blazeds_step2

Under Project > Properties > Flex Compiler you have add -services and behind the path to the services-config.xml (Screenhot), like in all other BlazeDS oder LiveCycle DS Applications. During the compile process the compiler creates an Actionscript class with the information of this file. The services-config.xml can found under the WEB-INF/flex. This file contains the definition of the MessageBroker and references to the messaging-config.xml and the remoting-config.xml. In the remoting-config.xml, you can find the definitions of the RemoteObjects and in the messaging-config.xml all messaging configurations.

services-config-xml

You can delete these two files because the RemoteObjects and Messaging will now defined in your Spring application. You must also delete the references to these files in the services-config.xml. The content of the services-config.xml should now look like this.




    
        

        
           
        

    


    
        
        

        
    

    

        
            
        

        
            
            
                false
            
        

        
            
            
                true
                4
            
        
        
	
		
		
			true
			5
			60000
			1
			200
                	
				
				
				
				
				 
				
				
				
				  
				
				
				
				
				
				  
				
				
				
                	
		
	        

        
            
        

        
    

    
        
            
                [BlazeDS] 
                false
                false
                false
                false
            
            
                Endpoint.*
                Service.*
                Configuration
            
        
    

    
        
            false
            
        
    


Now you have to configurate the Dispatcher Servlet, which get the information from the Flex application. Normally, you can find the definition of the MessageBroker Servlet in the web.xml. The Spring BlazeDS integration defines the MessageBroker in applicationContext.xml and uses a Dispatcher Servlet to transfer the Flex request to the MessageBroker. So, you have to replace the Flex related configuration in the web.xml. The file should now look like this:



	AnnotatedService

	
		contextConfigLocation
		
			/WEB-INF/config/web-application-config.xml
		
	
	
	
	
		org.springframework.web.context.ContextLoaderListener
	
	
	
		dispatcherServlet
		org.springframework.web.servlet.DispatcherServlet
		1
	

	
    	dispatcherServlet
    	/messagebroker/*
 	

     
		main.html
	

Now, you need a configuration file for the DispatcherServlet. Because I named the DispatcherServlet instance “dispatcherServlet”, I have to create a file with the name “dispatcherServlet-servlet.xml” in the folder WEB-INF.





The next step is to configurate the MessageBroker in applicationContext.xml. Till now, you can use also for not annotated configuration of Spring BlazeDS integration.

	
		
	

A annotated configuration needs some additional lines to scan the source for the spring annotations. The base-package specifies where Spring should start to search for annotations.

	
	

The applicationContext.xml should look like this:




	
	
 
	
		
	


The last step is to add the annotation in the Java class. You have to add the @Services, the @RemoteDestintion and the protocol you will use for the transfer above the class definition. When a method should be accessable via BlazeDS, you have to add above this method @RemoteInclude annotation otherwhise the @RemoteExclude annotation.

package test;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingExclude;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;

@Service
@RemotingDestination(channels={"my-amf","my-secure-amf"})
public class SampleService {

	// accessable via BlazeDS
	@RemotingInclude
	public String getMessage(String name){
		return "Hello "+name;
	}

	// not accessable via BlazeDS
	@RemotingExclude
	public String getMessage2(String name){
		return "Hello "+name;
	}
}

The name of the RemoteObject is same as Java class name but with the first letter is a lowercase. In my example the name of the RemoteObject is “sampleService”.



	
	
		
	
	
	

I hope this guide helps setting up a Spring BlazeDS application using annotations.

Spring BlazeDS Integration 1.0.0.RC1 Released

Thursday, May 7th, 2009

Today, Spring published the first Release Candiate of the Spring BlazeDS Integration. http://www.springsource.org/spring-flex

One of the new features is the annotation-based configuration of Remote Desitinations. You can include and exclude function, which should publish as Remote Objects. The annotation-based configuration really simplifies the configuration of BlazeDS, if you have a big and complex application. Loving it.
An other feature of this release is the full integration of the BlazeDS Message Service.

Next Thursday, Adobe and SpringSource having a Connect Session/eSemiar about the Spring BlazeDS Integration.

Registration: http://www.adobe.com/cfusion/event/i…2539&loc=en_us

dttl.tv relaunched!

Tuesday, May 5th, 2009

On time for the World Table Tennis Championships in Yokohama, the website of the German Table Tennis League (dttl.tv) was relaunched last week. The main element of the relaunched website is a new video player, based on Adobe Flex and the Adobe Flash Media Server. You can find all games of the German Table Tennis League in full length, interviews and the top rally of the day.

On May 15th 2009, the first live stream (19th match day of the German Table Tennis League) of the new website will avalaible.

To manage all the videos and streams, the player has a backend system based on BlazeDS, Spring and Hibernate.

Have fun and visit the website of the best Table Tennis League worldwide to see some of the most brillant table tennis players.

SpringSource veröffentlicht ersten Milestone der Spring BlazeDS Integration

Friday, December 19th, 2008

Heute hat SpringSource den ersten Milestone der Spring BlazeDS Integration veröffentlicht. Informationen zum Spring BlazeDS Integration finden sich jetzt auch auf der SpringSource Webseite, dort werden eine Referenz Dokumentation, eine JavaDoc und natürlich auch den Downloads zur Verfügung gestellt. Zusätzlich gibt weitere Informationen in einem Blog und einem Forum zur Spring BlazeDS Integration.

Sobald ich selber mal ein Auge auf die Integration geworfen habe, folgen weitere Informationen.

Prana Framework wird zum Spring Actionscript Framework

Thursday, December 18th, 2008

Das IoC Framework Prana von Christophe Herreman ist Spring Extension unter dem Projektnamen Spring Actionscript verfügbar. Bei der Entwicklung von Prana wurde Java Spring Framework als Vorlage genommen und dessen Funktionsweise nachimplementiert. Spring ActionScript basiert auf ActionScript 3 und bietet Integrationsmöglichkeiten für MVC Frameworks Cairngorm und PureMVC.

Spring ActionScript hat nichts mit Kooperation zwischen Adobe und SpringSource zur Integration von BlazeDS/LiveCycle DS und Spring zutun. Während Adobe und SpringSource an einer Backendseitigen Integration arbeiten, kann man mit dem Spring ActionScript Framework die gleichen Dependency Injection Mechnismen im Flex Frontend nutzen, welche durch Spring für das Java Backend zur Verfügung gestellt werden.

Link zur Bekanntmachung im Forum des Spring Frameworks.
Link
zum Subversion von Spring Actionscript

Adobe und SpringSource kooperieren bei der Integration von Flash und Spring Plattformen

Saturday, December 13th, 2008

Adobe und SpringSource haben bekanntgegeben, dass beide der Integration von der Adobe Flash Plattform und Spring Plattform kooperieren. Ziel der Kooperation ist es, die Entwicklung von RIA mittels BlazeDS oder LiveCycle DS und Spring zuvereinfachen. Eine erste Beta-Version der BlazeDS Spring Integration soll Mitte Dezember verfübar sein.

Desweiteren soll ein SpringSource Adapter for Adobe LiveCycle Data Services ES entwicklet werden, welche wohl in einer der kommenden Versionen von den LiveCycle DS verfügbar sein wird. Der Adapter soll den Data Push aus Spring direkt zu Flex ermöglichen.

Link zur gemeinsamen Pressemitteilung von Adobe und SpringSource.