BlazeDS server architecture
The BlazeDS server is contained in a J2EE web application. A Flex
client makes a request over a channel and the request is routed to an
endpoint on the BlazeDS server. From the endpoint, the request is routed
through a chain of Java objects that includes the MessageBroker object,
a service object, a destination object, and finally an adapter object.
The adapter fulfills the request either locally, or by contacting a
backend system or a remote server such as Java Message Service (JMS)
server.
The following illustration shows the BlazeDS server architecture:
Endpoints
BlazeDS servlet-based endpoints are inside the J2EE servlet
container, which means that the servlet handles the I/O and HTTP
sessions for the endpoints. Servlet-based endpoints are bootstrapped by
the MessageBrokerServlet, which is configured in the web.xml file of the
web application. In addition to the MessageBrokerServlet, an HTTP
session listener is registered with the J2EE server in the web
application's web.xml file so that BlazeDS has HTTP session attribute
and binding listener support.
BlazeDSFlex client applications use
channels to communicate with BlazeDS endpoints. There is a mapping
between the channels on the client and the endpoints on the server. It
is important that the channel and the endpoint use the same message
format. A channel that uses the AMF message format, such as the
AMFChannel, must be paired with an endpoint that also uses the AMF
message format, such as the AMFEndpoint. A channel that uses the AMFX
message format such as the HTTPChannel cannot be paired with an endpoint
that uses the AMF message format. Also, a channel that uses streaming
must be paired with an endpoint that uses streaming.
You
configure endpoints in the services-config.xml file in the WEB-INF/flex
directory of your BlazeDS web application. For more information about
endpoints, see Channels and endpoints
.
MessageBroker
The MessageBroker is responsible for routing messages to services and
is at the core of BlazeDS on the server. After an endpoint initially
processes the request, it extracts the message from the request and
passes it to the MessageBroker. The MessageBroker inspects the message's
destination and passes the message to its intended service. If the
destination is protected by a security constraint, the MessageBroker
runs the authentication and authorization checks before passing the
message along (see Configuring security
). You configure the MessageBroker in the services-config.xml file in he WEB-INF/flex directory of your BlazeDS web application.
Services and destinations
Services and destinations are the next links in the message
processing chain in the BlazeDS server. The system includes four
services and their corresponding destinationsBlazeDS:
- RemotingService and RemotingDestination
- HTPProxyService and HTTPProxyDestination
- MessageService and MessageDestination
Services are the targets of messages from client-side Flex
components. Think of destinations as instances of a service configured
in a certain way. For example, a RemoteObject component is used on the
Flex client to communicate with the RemotingService. In the RemoteObject
component, you must specify a destination id
property that refers to a remoting destination with certain properties,
such as the class you want to invoke methods on. The mapping between
client-side Flex components and BlazeDS services is as follows:
- HTTPService and WebService communicate with HTTPProxyService/HTTPProxyDestination
- RemoteObject communicates with RemotingService/RemotingDestination
- Producer and Consumer communicate with MessageService/MessageDestination
You can configure services and their destinations in the
services-config.xml file, but it is best practice to put them in
separate files as follows:
- RemotingService configured in the remoting-config.xml file
- HTTPProxyService configured in the proxy-config.xml file
- MessageService configured in the messaging-config.xml file
For more information on RPC services (HTTPProxy Service and RemotingService) and MessageService, see the following topics:
Adapters and assemblers
Adapters, and optionally assemblers, are the last link in the message
processing chain. When a message arrives at the correct destination, it
is passed to an adapter that fulfills the request either locally or by
contacting a backend system or a remote server such as a JMS server.
BlazeDS uses the following mappings between destinations and
adapters/assemblers:
- RemotingDestination uses JavaAdapter
- HTTPProxyDestination uses HTTPProxyAdapter or SOAPAdapter
- MessageDestination uses ActionScriptAdapter or JMSAdapter
Adapters and assemblers are configured along with their corresponding destinations in the same configuration files.
Although
the BlazeDS server comes with a rich set of adapters and assemblers to
communicate with different systems, custom adapters and assemblers can
be plugged into the BlazeDS server. Similarly, you do not have to create
all destinations in configuration files, but instead you can create
them dynamically at server startup or when the server is running; for
more information, see Run-time configuration
.
For information about the BlazeDS server-side classes, see the Javadoc API documentation.
分享到:
相关推荐
BlazeDS是Adobe公司推出的一款开源的服务器端技术,它主要负责实现Flex客户端与服务器之间的实时双向通信。Flex是一种用于构建富互联网应用程序(RIA)的客户端框架,而BlazeDS则是其背后的通信引擎,提供了数据推送...
BlazeDS是Adobe公司开发的一款开源的服务器端技术,它主要负责实现Java应用程序与客户端的Flex应用程序之间的数据交互。BlazeDS的出现极大地推动了富互联网应用(RIA)的发展,使得开发者可以利用Flex的图形界面优势...
BlazeDS通信到Java的PureMVC——Flex框架,BlazeDS的服务器配置比较麻烦,这里使用的是直接下载blazeds_turnkey_3-0-0-544.zip中的tomcat BlazeDS模板路径为: blazeds_turnkey_3-0-0-544.zip解压后路径\tomcat\...
### Blazeds入门教程知识点详解 #### 一、引言 Blazeds是一个由Adobe官方推出的开源数据服务中间件,其前身是LiveCycle Data Services(LCDS),也称为Flex Data Services(FDS)。Blazeds简化了Flex应用程序与...
**Spring BlazeDS Integration** 是一个强大的技术组合,它允许开发者使用Spring框架在后端服务器上进行业务逻辑处理,同时利用Adobe Flex在前端构建富互联网应用程序(RIA)。BlazeDS是Adobe提供的一种开源服务器端...
Blazeds Turnkey 4.0 是一个强大的技术框架,专为实现Flex应用程序与Java Enterprise Edition (JEE) 服务器之间的高效通信而设计。这个项目提供了全面的功能,使得开发人员可以构建富互联网应用(RIA)时,充分利用...
在Tomcat中,你可能需要在`server.xml`配置文件中添加一个Context元素来指定Blazeds的应用路径。例如: ```xml <Context path="/blazeds" docBase="path/to/blazeds/war/directory" /> ``` 这里`path/to/...
这个版本包含了两个主要的战争(war)文件:blazeds.war 和 blazeds-spring.war,以及它们对应的解压后的文件夹。这些资源都是为了帮助开发者在Java EE环境中集成Flex和ActionScript客户端应用。 1. **BlazeDS**: ...
Blazeds是一款强大的Flex和Java之间的消息传递中间件,它由Adobe公司开发,主要用于构建富互联网应用程序(RIA)。本文将详细介绍Blazeds的核心概念、功能以及如何使用它。 Blazeds,全称BlazeDS,是Adobe Flex和...
Blazeds是Adobe官方推出的一款开源项目,全称为Flex Business Application Platform,它是Flex与Java应用程序之间进行数据交互的重要桥梁。Flex是一种基于ActionScript的富互联网应用程序(RIA)开发框架,而Java则...
Blazeds是一个强大的Java服务器端技术,主要用于实现Flex(一种基于Adobe Flash的用户界面开发工具)与后端Java应用程序之间的数据交互。它提供了一个全面的解决方案,使开发人员能够构建富互联网应用程序(RIA),...
1、修改apache-tomcat-6.0.14\bin\catalina.bat文件中的JAVA_HOME的值,指向你所装的jdk的目录;...3、输入地址:http://localhost:8080/BlazeDsServer/BlazeDsExample.html 查看效果! 4、包含源代码。
BlazeDS与Flex整合是构建富互联网应用程序(RIA)的一种常见技术组合,它允许开发者创建交互性强、用户体验丰富的Web应用。BlazeDS是Adobe提供的一个开源服务器端数据推送技术,而Flex是用于创建RIA的客户端开发框架...
BlazeDS是Adobe公司推出的一款开源的服务器端技术,它主要负责在客户端(通常是Web浏览器)与服务器之间提供实时的数据通信。此技术基于AMF(Action Message Format)协议,允许高效地传输数据,同时支持Flex和...
Blazeds,全称为BlazeDS,是一款由Adobe公司开发并开源的服务器端技术,它主要为Flash客户端提供数据服务,使Flash与后端服务器能够进行高效的数据交互。Blazeds是基于Java平台的,利用Action Message Format (AMF)...
### BlazeDS War包及Flex结合BlazeDS的入门程序 #### 一、BlazeDS简介与功能 BlazeDS是一款由Adobe开发的开源服务器端软件,主要用来支持远程调用和消息传递服务。它能够实现Java应用服务器和Flex客户端之间的通信...
整合开发Flex、MyEclipse和Blazeds的过程涉及到了多种技术的融合,下面将详细介绍这一过程所包含的关键知识点。 首先,了解JDK环境的配置。JDK是Java开发的基础,其环境配置包括安装JDK、设置JAVA_HOME环境变量、...
【Flex Spring JAVA BLAZEDS整合】是一种技术实践,它将Adobe Flex的前端展示层与Spring框架的后端业务逻辑层紧密结合,利用BlazeDS作为中间件进行数据传输。Flex作为一个强大的RIA(富互联网应用程序)开发平台,常...
BlazeDS是一款由Adobe开发的开源服务器端技术,主要用于提供实时数据推送服务,它与Flex客户端(基于ActionScript的富互联网应用)配合使用,能够实现高效的数据交换和远程调用。在本例中,我们将讨论如何利用...