Flex blazeds hibernate3 spring2

2010-03-02  来源:本站原创  分类:Flash  人气:288 

Flex and Java server in communication, select the SH combined. Also searched the Web. There are two ways, one is to add a Factory, and then in the Server-config.xml inside and Remote-config.xml in configuration. which directly point to the Spring Destination Management Bean instead of Java class names.
Another more complicated. With the Spring-flex, there are labels. Should have the relevant LIB (downloaded not tried). And then configure Spring in WEb.xml in the DispatchServlet. And Flex the Servlet. Would not have had. And then configuration in the Spring in Flex (using Flex label).
Of course, the first a simple, more, and is the official on the Flex.
SH have a problem during use, is lazy. Probably in the Flex appears when deserialized. He will all the attributes of a Bean (related) all find out. This is in trouble. No solution to find relevant approach.
The following provide Remote-config.xml:

<destination> This is the Spring lane  Bean
                        <factory>spring</factory> This must be added  .
 Then add Services-config.xml  :
 This class is as follows  :
package flex.samples.factories;

import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;

import flex.messaging.FactoryInstance;
import flex.messaging.FlexFactory;
import flex.messaging.config.ConfigMap;
import flex.messaging.services.ServiceException;

public class SpringFactory implements FlexFactory
    private static final String SOURCE = "source";

    public void initialize(String id, ConfigMap configMap) {}

    public FactoryInstance createFactoryInstance(String id, ConfigMap properties)
        SpringFactoryInstance instance = new SpringFactoryInstance(this, id, properties);
        instance.setSource(properties.getPropertyAsString(SOURCE, instance.getId()));
        return instance;
    } // end method createFactoryInstance()

    public Object lookup(FactoryInstance inst)
        SpringFactoryInstance factoryInstance = (SpringFactoryInstance) inst;
        return factoryInstance.lookup();

    static class SpringFactoryInstance extends FactoryInstance
        SpringFactoryInstance(SpringFactory factory, String id, ConfigMap properties)
            super(factory, id, properties);

        public String toString()
            return "SpringFactory instance for source=" + getSource() + " scope=" + getScope();

        public Object lookup()
            ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext());
            String beanName = getSource();

                return appContext.getBean(beanName);
            catch (NoSuchBeanDefinitionException nexc)
                ServiceException e = new ServiceException();
                String msg = "Spring service named '" + beanName + "' does not exist.";
                throw e;
            catch (BeansException bexc)
                ServiceException e = new ServiceException();
                String msg = "Unable to create Spring service named '" + beanName + "' ";
                throw e;

Three-step combination of Spring, like other Blazeds, unchanged.

  • Flex blazeds hibernate3 spring2 2010-03-02

    Flex and Java server in communication, select the SH combined. Also searched the Web. There are two ways, one is to add a Factory, and then in the Server-config.xml inside and Remote-config.xml in configuration. which directly point to the Spring Des

  • flex + blazeds push service implementation summary 2010-08-08

    Achieved using flex + blazeds push services, if the client subscription is successful, refresh the browser or if the re-opening a window, the server side this will be a prompt: [BlazeDS] Endpoint with id 'my-streaming-amf' cannot grant streaming conn

  • flex blazeds spring activemq integration of relevant site data address (Memo) 2010-12-07

    1. Activemq official description of an integrated spring http://activemq.apache.org/spring-support.html 2. Spring blazeds spring flex integration of components on the documentation. Version 1.05m http://static.springsource.org/spring-flex/docs/1.5.x/

  • Implementation using JAVA, and FLEX BLAZEDS communications HELLO WORLD 2010-12-28

    New project on the user experience and user interaction are higher, and decided to use Flex as a front end of the present technology, the overall framework remains Flex + Spring + Hibernate (considered in the seam). As an entry, starting with the cla

  • Flex + BlazeDS integration of J2EE instance 2011-01-13

    Flex + BlazeDS integration of J2EE instance Adobe Flash Builder 4 full version download simplified Chinese: http://subject.csdn.net/adobedownload/index.html Adobe platform technologies Summit Course Video: http://adobev.csdn.net/ "Flash create the fu

  • flex blazeds achieve server to use (specific identification) client pushing data (on consumer models) 2010-03-21

    Introduction: There are many similar stocks, foreign exchange, futures and other real-time quotes for this application, the client needs to display information such as price premiums. The current approach is: the client requests to the server time, r

  • flex + blazeDS integration j2ee project 2010-06-13

    Records about integration blazeDS and flex in the process of j2ee projects: Preparation: eclipse plug-ins installed flex FB3_WWEJ_Plugin.exe. 1, download blazeDS; 2, blazeDS.war into tomcat6.0.14 the webapps folder; 3, the new java web project (the n

  • Comparison of the basic means of communication flex blazeDS. LCDS comparison 2010-09-29

    Three communication Flex Table 1-1 Communication Communication Protocol Interactive data format HttpService Common http protocol XML WebService SOAP protocol XML RemoteObject Flex Custom efficient binary Data communication protocols: AMF Any (can be

  • Spring + flex (Blazeds) notes created as the project 2010-12-26

    My first published article, if wrong, please correct me. Get to the point, spring + flex-line method a lot, but rarely with the article notes, is a way to use annotations to configure a simple example. Development environment used eclipse3.5 + flex4

  • flex blazeds achieved by the server to push data to the client 2010-12-28

    Introduction: Are very similar to the stock, foreign exchange, futures and other real-time quotes for this application, the client needs to display information such as price premiums. The current approach is: the client requests to the server time, r

  • Flex + BlazeDS + AIR + StreamingAMFChannel instant messaging communication chat 2011-05-21

    The StreamingAMFChannel BlazeDS messaging service using chat communications, this approach is the fastest and the smallest delay. BusyChat.mxml file: <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="

  • Transfer: Flex + blazeds Implementation and mySQL database connection 2011-06-01

    Transfer from: http://xaajie.iteye.com/blog/375553 Several Download blazeds_turnkey_3-0-0-544.zip Download: http://download.macromedia.com/pub/opensource/blazeds/blazeds_turnkey_3-0-0-544.zip This small example of communication through remoteobject.

  • Flex+BlazeDs+Java的教程及Demo 2014-08-16

    这个基础教程是Flex4.1,Blazeds4.0为基础写的. 第一步:新建Web Project,名字为:FlexBlazeDsDemo,点Finish 第二步:去Adobe公司的网站上下载Blazeds的包, 解压blazeds.war,看到blaeds的文件夹,里面有一个lib的文件夹,将包引入到项目工作中去 同时将blazeds->WEB-INF下的flex文件夹Copy到项目中的WEB-INF下,目录结构如下: 第三步:在Tomcat中发布项目 第四步:在Web Project中添加F

  • Pomer (Flex + BlazeDS + Hibernate + spring) framework 2009-05-07

    Pomer download and install Pomer Development Environment MyEclipse6.5 plug-in version flex3.0 JDK1.6.0_05 Mysql5.0 Tomcat 6.0 Pomer in Syria on environmental development, and test passed, but does not explain the above version of the environment is n

  • JSF1.2 + Hibernate3 + Spring2 configuration 2010-07-29

    1.JSF profile <application> <variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver </variable-resolver> </application> <managed-bean> <managed-bean-name>UserLogin</managed-bean-name> <manage

  • Flex blazeds spring hibernate CRUD 2010-03-12

    Simple Four in engineering. Despite these shortcomings, but also be completed. If necessary you can download, run, beginners can refer to the next, or make changes to it.

  • Google App Engine / Java (GAE / J) on the successful deployment and operation, Flex + BlazeDS 2010-05-06


  • struts2 + hibernate3 + spring2 study notes 10 (Hibernate configuration file) 2010-06-14

    Hibernate configuration files Chapter 11 1. Configuration hibernate.cfg.xml Hibernate runtime need to get some basic information database, including database URL, database username, database password, database, JDBC driver classes and the database di

  • struts2 + hibernate3 + spring2 study notes 11 (Hibernate Query) 2010-06-15

    Chapter 12, Hibernate query Introduction to database query language in this chapter is the most commonly used database, Hibernate provides a HQL query to the database, also provide the conditions for inquiry (Criteria Queries) SQL queries and join qu

  • struts2 + hibernate3 + spring2 study notes 12 (manipulating physical objects) 2010-06-21

    Chapter 13, Hibernate entity object manipulation <br /> Introduction to Language in this chapter, the database operation, the common operation in addition to queries, there are add, modify and delete records. This chapter first object into the hiber