- 浏览: 1578255 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (571)
- Flex (301)
- AIR (5)
- ComPiere (8)
- ExtJS (15)
- SAP (0)
- jBPM (3)
- Java-Hibernate (5)
- Java-Spring (10)
- XML (2)
- java-web (30)
- db2 (2)
- websphere (4)
- Google (5)
- 虚拟机 (10)
- eclipse (8)
- Win2003 (11)
- Ubuntu (27)
- VMware (4)
- CentOS (3)
- JSON (1)
- Oracle (15)
- SilverLight (1)
- 大事记 (6)
- VirtualBox (5)
- Solaris (10)
- AIX (6)
- 云计算 (10)
- MacOS (4)
- iOS (1)
- SQLite (1)
- Activiti (1)
- jdk (5)
- hadoop (8)
- Ant (4)
- PhoneGap (2)
- JavaScript (11)
- jQuery (1)
- FireFox (1)
- HBase (2)
- sqoop (0)
- ffmpeg (7)
- mencode (0)
- jdbc (1)
- SQLServer (1)
- 组件平台 (12)
- struts2 (4)
- intellj (4)
- android (1)
- ExtJS4 (1)
- 色卡司 (1)
- Linux (3)
- ExtJS5 (1)
- zookeeper (2)
- maven (1)
- Java (6)
- vpn (0)
- squid (1)
- MySQL (2)
- webpackage (1)
- antd (1)
- lucene (1)
最新评论
-
qq_24800465:
请问这里的库从哪下载啊
ffmpeg所有的编码器(encoders) -
neusoft_jerry:
貌似这里没用到StreamingAMFChannel哦,只是用 ...
Flex BlazeDS 推送技术 -
anyone:
感谢你的博文,看了受益匪浅
记住这个IntelliJ IDEA的编译设置 -
keren:
现在还有什么应用需要用flex来开发的?
flex tree的展开,关闭,添加、删除子节点 -
neusoft_jerry:
简洁明快,好贴好贴!楼主V5!
flex tree的展开,关闭,添加、删除子节点
http://www.joshuaostrom.com/2008/08/01/tunkey-blazeds-jms-activemq/
I spent some time this week with BlazeDS and JMS. I wanted to integrate a Flex RIA with some [existing] backend Java classes. One goal was to interface the two in a loosely coupled fashion, enter Java Message Service (JMS).
The RIA uses a mx:producer to publish messages to a JMS topic which the backend Java class is listening in on [consuming] elsewhere in the enterprise. I used an ‘external install’ of ActiveMQ.
I downloaded the turnkey BlazeDS server to get things rolling.
I came across a few great posts in looking into this…
【Michael Martin’s Simplified BlazeDS and JMS】
http://mmartinsoftware.blogspot.com/2008/05/simplified-blazeds-and-jms.html
Christophe Coenraets
【Flex and JMS: Portfolio Viewer (LCDS jRun)】
http://coenraets.org/blog/2006/06/flex-and-jms-portfolio-viewer-updated-for-flex-2-ga/
【30 Minutes Flex Test-Drive for Java Developers (FDS)】
http://coenraets.org/blog/30-minutes-flex-test-drive-for-java-developers/
To be helpful, I’ve included some error messages and their causes:
Flex Runtime Error:
There was an unhandled failure on the server. MessageClient has been invalidated.
Cause: ActiveMQ not running.
Flex Runtime Error:
Client.Message.Encoding
Type ‘com.dl.samples.PersonVO’ not found.
Cannot create class of type ‘com.dl.samples.PersonVO’.
Cause: Java classes not on server.
Java Runtime Error
javax.naming.NameNotFoundException: messageTopic
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:225)
at javax.naming.InitialContext.lookup(Unknown Source)
at Chat.(Chat.java:55)
at Chat.main(Chat.java:27)
Cause: jndi.properties not present for java class
Java Runtime [BlazeDS] Error
[BlazeDS] JMS consumer for JMS destination ‘[destinationName]’ is being removed from the JMS adapter due to the following error: Name jms is not bound in this Context
[BlazeDS] JMS consumer for JMS destination ‘[destinationName]’ is stopping.
[BlazeDS] The corresponding MessageClient for JMS consumer for JMS destination ‘[destinationName]’ is being invalidated
Cause: context.xml Resource names do not match messaging-config.xml connection-factory / destination-jndi-name tags. (i.e. the ‘org.apache.activemq.ActiveMQConnectionFactory’ resource name in context.xml should match the connection-factory value in messaging-config and the ‘org.apache.activemq.command.ActiveMQTopic’ resource name in context.xml should match the destination-jndi-name value in messaging-config).
Adding the logging pattern ‘Service.Message.JMS’ to your services-config.xml can be very helpful in debugging BlazeDS JMS problems.
Here are the config files
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/flex/services-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="messaging-config.xml" />
</services>
<security/>
<channels>
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://localhost:8400/BlazeTest/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
</channels>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Debug">
<properties>
<prefix>[BlazeDS] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
<pattern>Service.Message.JMS</pattern>
</filters>
</target>
</logging>
</services-config>
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/flex/messaging-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" class="flex.messaging.services.MessageService">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="simpleJMS">
<properties>
<jms>
<destination-type>Topic</destination-type>
<!--<message-type>javax.jms.TextMessage</message-type>-->
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>java:comp/env/TopicConnectionFactory</connection-factory>
<destination-jndi-name>java:comp/env/messageTopic</destination-jndi-name>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<initial-context-environment>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="my-amf"/>
</channels>
<adapter ref="jms"/>
</destination>
</service>
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>BlazeDS</display-name>
<description>BlazeDS Application</description>
<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
<!-- MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
C:/blazeds/tomcat/webapps/MyApp/META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/BlazeTest">
<Resource name="TopicConnectionFactory"
type="org.apache.activemq.ActiveMQConnectionFactory"
description="JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="tcp://localhost:61616"
brokerName="myBroker"/>
<Resource name="messageTopic"
type="org.apache.activemq.command.ActiveMQTopic"
description="a simple topic"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="messageTopic"/>
</Context>
Using the above messaging-config’s destination the message will come across as an ObjectMessage in Java.
I spent some time this week with BlazeDS and JMS. I wanted to integrate a Flex RIA with some [existing] backend Java classes. One goal was to interface the two in a loosely coupled fashion, enter Java Message Service (JMS).
The RIA uses a mx:producer to publish messages to a JMS topic which the backend Java class is listening in on [consuming] elsewhere in the enterprise. I used an ‘external install’ of ActiveMQ.
I downloaded the turnkey BlazeDS server to get things rolling.
I came across a few great posts in looking into this…
【Michael Martin’s Simplified BlazeDS and JMS】
http://mmartinsoftware.blogspot.com/2008/05/simplified-blazeds-and-jms.html
Christophe Coenraets
【Flex and JMS: Portfolio Viewer (LCDS jRun)】
http://coenraets.org/blog/2006/06/flex-and-jms-portfolio-viewer-updated-for-flex-2-ga/
【30 Minutes Flex Test-Drive for Java Developers (FDS)】
http://coenraets.org/blog/30-minutes-flex-test-drive-for-java-developers/
To be helpful, I’ve included some error messages and their causes:
Flex Runtime Error:
There was an unhandled failure on the server. MessageClient has been invalidated.
Cause: ActiveMQ not running.
Flex Runtime Error:
Client.Message.Encoding
Type ‘com.dl.samples.PersonVO’ not found.
Cannot create class of type ‘com.dl.samples.PersonVO’.
Cause: Java classes not on server.
Java Runtime Error
javax.naming.NameNotFoundException: messageTopic
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:225)
at javax.naming.InitialContext.lookup(Unknown Source)
at Chat.(Chat.java:55)
at Chat.main(Chat.java:27)
Cause: jndi.properties not present for java class
Java Runtime [BlazeDS] Error
[BlazeDS] JMS consumer for JMS destination ‘[destinationName]’ is being removed from the JMS adapter due to the following error: Name jms is not bound in this Context
[BlazeDS] JMS consumer for JMS destination ‘[destinationName]’ is stopping.
[BlazeDS] The corresponding MessageClient for JMS consumer for JMS destination ‘[destinationName]’ is being invalidated
Cause: context.xml Resource names do not match messaging-config.xml connection-factory / destination-jndi-name tags. (i.e. the ‘org.apache.activemq.ActiveMQConnectionFactory’ resource name in context.xml should match the connection-factory value in messaging-config and the ‘org.apache.activemq.command.ActiveMQTopic’ resource name in context.xml should match the destination-jndi-name value in messaging-config).
Adding the logging pattern ‘Service.Message.JMS’ to your services-config.xml can be very helpful in debugging BlazeDS JMS problems.
Here are the config files
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/flex/services-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="messaging-config.xml" />
</services>
<security/>
<channels>
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://localhost:8400/BlazeTest/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
</channels>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Debug">
<properties>
<prefix>[BlazeDS] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
<pattern>Service.Message.JMS</pattern>
</filters>
</target>
</logging>
</services-config>
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/flex/messaging-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" class="flex.messaging.services.MessageService">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="simpleJMS">
<properties>
<jms>
<destination-type>Topic</destination-type>
<!--<message-type>javax.jms.TextMessage</message-type>-->
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>java:comp/env/TopicConnectionFactory</connection-factory>
<destination-jndi-name>java:comp/env/messageTopic</destination-jndi-name>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<initial-context-environment>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="my-amf"/>
</channels>
<adapter ref="jms"/>
</destination>
</service>
C:/blazeds/tomcat/webapps/MyApp/WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>BlazeDS</display-name>
<description>BlazeDS Application</description>
<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
<!-- MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
C:/blazeds/tomcat/webapps/MyApp/META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/BlazeTest">
<Resource name="TopicConnectionFactory"
type="org.apache.activemq.ActiveMQConnectionFactory"
description="JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="tcp://localhost:61616"
brokerName="myBroker"/>
<Resource name="messageTopic"
type="org.apache.activemq.command.ActiveMQTopic"
description="a simple topic"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="messageTopic"/>
</Context>
Using the above messaging-config’s destination the message will come across as an ObjectMessage in Java.
发表评论
-
extjs结合flex(flash)的注意事项.
2014-01-02 17:11 2442//for fix bug //flash里使 ... -
flash(flex)crossdomain dtd规范
2013-12-27 13:38 991dtd文件位置: http://www.macromedia. ... -
flash内嵌在html里面的代码
2013-12-27 09:19 1234<!-- 除IE外都可识别 --> < ... -
FlashBuilder4.5 ADT命令详解(官方)
2011-12-16 17:45 1287http://help.adobe.com/en_US/air ... -
FlashBuilder4.5加入ADT插件
2011-12-16 17:24 1857参考: http://renaun.com/blog/2011 ... -
Flex as3commons log的简单使用
2011-11-28 20:26 1633http://www.as3commons.org/ &l ... -
Flex日志工具汇总
2011-11-27 16:29 1294巨兽 monster [能调试 mobile和web air] ... -
【转】[Flex]我经常使用的Flex Tools 和 Resource
2011-11-22 08:36 1342http://www.k-zone.cn/zblog/post ... -
[转]Flex Socket安全策略<policy-file-request/>及应对方法
2011-08-27 16:43 1778http://hi.baidu.com/dobodo/blog ... -
flash 安全策略文件
2011-08-27 16:31 2186<?xml version="1.0&qu ... -
Request请求头的格式
2011-08-27 15:38 2398每次提交http请求时,请求头是什么样的的格式呢? GET方 ... -
flash Tooltip类
2011-08-27 15:06 1174http://www.flepstudio.com/flash ... -
flash SQLite包装类
2011-08-27 15:00 2267[转]http://www.flepstudio.com/fl ... -
[转](原创)flex解决跨域问题的策略文件的写法
2011-08-04 09:59 1600http://hi.baidu.com/wosinmaiken ... -
[转](整理)flex常用验证控件
2011-08-04 08:30 1419http://hi.baidu.com/wosinmaiken ... -
Flex4.5 skin组建皮肤的应用
2011-07-28 08:52 2856http://www.iyoya.com/2011/06/04 ... -
如何成为一个合格的iOS开发者?
2011-07-17 14:59 1385转:http://www.adobe.com/cn/devne ... -
flex4.5移动设备开发-添加应用背景图片
2011-07-17 10:50 2317【转】http://spy6.blogspot.com/201 ... -
flex4.5移动设备开发-应用访问权限设置
2011-07-16 14:19 1399在构建flex4.5 mobile application的时 ... -
flex4.5移动设备开发-表格效果
2011-07-15 23:12 1849做了个实验,没想到做出表格的效果
相关推荐
本项目“spring3+ActiveMQ+blazeds+flex consumer”旨在整合一系列技术,以实现这样的功能。下面将详细阐述这些技术及其整合过程。 首先,Spring框架(Spring3)是Java领域最流行的轻量级应用框架之一,它提供了...
【标题】"Flex4.X+BlazeDS+Spring3实战开发在线书店四"涉及的核心技术栈是Adobe Flex 4.6、BlazeDS、Spring 3框架以及Java相关的JPA和Hibernate,配合MySQL数据库实现一个在线书店的完整系统。下面将详细阐述这些...
标题 "BlazeDS+Spring+activeMQ outofmemory" 指的是在使用BlazeDS、Spring和ActiveMQ集成的环境中遇到了内存溢出问题。BlazeDS是一个开放源码的服务器端技术,它允许双向通信,使Flex或AJAX客户端能够与Java后端...
BlazeDS还提供了LiveCycle Data Services扩展,其中包括对JMS的支持,使得Flex能够订阅和发布JMS消息。 3. **Java**:在后端,Java通过Spring或其它框架处理业务逻辑,并与JMS服务器进行交互。Java应用通过JMS API...
在本课程中,我们将深入探讨如何使用Flex 4.6、BlazeDS、Spring 3 和其他相关技术来构建一个实际的在线书店应用。Flex 4.6 是Adobe Flex框架的一个重要版本,它提供了强大的富互联网应用程序(RIA)开发工具,使...
标题中的“PureMVC+Flex+BlazeDS+Spring+Hibernate.doc”指的是一项整合了多种技术的Web应用开发方案,这些技术包括PureMVC、Flex、BlazeDS、Spring和Hibernate。这篇文档可能是指导读者如何将这些技术结合在一起...
标题“flex+blazeds+spring”表明我们要探讨的是如何将Flex前端与BlazeDS中继层和Spring后端框架结合起来,实现完整的数据交互和应用程序逻辑。 在Flex与Spring集成的环境中,Flex作为用户界面展示层,负责与用户...
《Flex4.X+BlazeDS+Spring3 实战开发在线书店》是一门深入探讨使用Adobe Flex 4.6、BlazeDS、Spring 3框架以及Java相关技术进行Web应用程序开发的课程。这门课程旨在帮助开发者掌握如何构建功能丰富的、交互性强的...
### Flex4+BlazeDS+Spring+iBatis 开发教程详解 #### 一、富互联网应用(RIA)概念与背景 ##### RIA定义 富互联网应用(Rich Internet Application,简称RIA)是一种新兴的应用程序形式,它结合了客户端与服务器端...
Myeclipse6.5+flex3+Blazeds+spring+hibernate完美整合,写的非常详细
Flex4+BlazeDS+Java+JDBC+MySQL是一个经典的前端与后端交互技术栈,用于构建富互联网应用程序(Rich Internet Applications,RIAs)。在这个架构中,Flex4作为客户端的展示层,BlazeDS作为服务器端的数据通信中间件...
Flex + blazeds + Java推送Demo 本例实现由Flex一端客户端发送消息, 然后由Java端在发布到所有订阅的其它Flex端. 里面有说明与源码, 还有一个直接放到Tomcat里面的直接发布的项目 小编使用工具 eclipse3.5 flex sdk...
在“spring+blazeDS+flex4 例子”项目中,我们看到一个完整的集成示例。该项目可以直接运行,所有必要的jar包都已包含。首先,我们需要在Spring配置中定义BlazeDS的通道配置和服务接口。然后,在Flex4的MXML或AS3...
《Flex + BlazeDS + Java 入门搭建与简单应用详解》 在当今的Web开发领域,富互联网应用程序(Rich Internet Applications, RIA)已经成为提升用户体验的重要手段。Flex作为Adobe公司推出的RIA开发框架,搭配...
使用flex 4.5 + Spring 3.0 + Hibernate 3.3 + Cairngorm 2.2.1 + BlazeDS 3.3.0 + Spring BlazeDS Integration 1.0.3整合出的一个登录的小demo·
一个 Flex+J2EE实例(cairngorm+blazeDS+hibernate+spring) 本实例为一个 flex 与 java通信项目。前端采用cairngorm框架,后台 采用hibernate+spring 每个部署 步骤,附详细 图文解释。旨在 采用 一种快速开发 ...
Flex+BlazeDS+Spring+Hibernate 是一个经典的前端与后端集成方案,广泛应用于构建富互联网应用程序(Rich Internet Applications,RIA)。在这个框架组合中,Flex 作为用户界面层,提供了丰富的交互体验;BlazeDS ...
Flex+blazeDS+Spring官方Demo,环境搭建,内含十几个例子,从易到难,包括spring消息,spring安全,注解方式和非注解配置文件方式,十分好用。内含有tomcat,可直接启动并运行用户手册。
Flex+BlazeDS+Java通信是构建富互联网应用程序(RIA)的一种常见技术组合,它允许前端的Flex客户端与后端的Java服务器进行实时双向通信。本文将深入探讨Flex、BlazeDS以及Java之间的通信机制,并提供相关的源代码...