`
lujiawu12
  • 浏览: 126938 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

lcds学习笔记

阅读更多
1.在tomcat中配置flex的broker(代理服务server),服务中间件MOM采用activemq
Configure your web application so that it has access to the JMS server. For example, if you are using Tomcat, you
might have to add the following Resource definitions to the application to add support for Apache ActiveMQ, which
supports JMS version 1.1:

<Context docBase="${catalina.home}/../../apps/team" privileged="true"
antiResourceLocking="false" antiJARLocking="false" reloadable="true">
    <!-- Resourced needed for JMS -->
    <Resource name="jms/flex/TopicConnectionFactory"      注意与messaging-config中配置相同
        type="org.apache.activemq.ActiveMQConnectionFactory"
        description="JMS Connection Factory"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        brokerURL="vm://localhost"
        brokerName="LocalActiveMQBroker"/>
    <Resource name="jms/topic/flex/simpletopic"
        type="org.apache.activemq.command.ActiveMQTopic"
        description="my Topic"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        physicalName="FlexTopic"/>
    <Resource name="jms/flex/QueueConnectionFactory"
        type="org.apache.activemq.ActiveMQConnectionFactory"
        description="JMS Connection Factory"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        brokerURL="vm://localhost"
        brokerName="LocalActiveMQBroker"/>
     <Resource name="jms/queue/flex/simplequeue"
        type="org.apache.activemq.command.ActiveMQQueue"
        description="my Queue"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        physicalName="FlexQueue"/>
    <Valve className="flex.messaging.security.TomcatValve"/>
</Context>

The JMS server is often embedded in your J2EE server, but you can interact with a JMS server on a remote computer
accessed by using JNDI. For more information, see Using a remote JMS provider.

2.在messaging-config.xml中配置jmsAdapter(一般默认都有配置)
2.1<adapters>
    <adapter-definition id="jms"        
        class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>

2.2配置jmsAdapter的destination(Queue,Topic)
You perform most of the configuration of the JMSAdapter in the destination definition. Configure the adapter with the proper JNDI information and JMS ConnectionFactory information to look up the connection factory in JNDI.
The following example shows a destination that uses the JMSAdapter:

<destination id="chat-topic-jms">
    <properties>
    ...
        <jms>
            <destination-type>Topic</destination-type>    
            <message-type>javax.jms.TextMessage</message-type>
            <connection-factory>jms/flex/TopicConnectionFactory</connection-factory>
            <destination-jndi-name>jms/topic/flex/simpletopic</destination-jndi-name>
            <delivery-mode>NON_PERSISTENT</delivery-mode>
            <message-priority>DEFAULT_PRIORITY</message-priority>
            <preserve-jms-headers>"true"</preserve-jms-headers>
            <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>     
            <connection-credentials username="sampleuser" password="samplepassword"/>
            <max-producers>1</max-producers>
        </jms>
    </properties>
    ...
    <adapter ref="jms"/>
</destination>

几点说明:1.The PERSISTENT mode specifies that all sent messages be stored by the JMS server, and then forwarded to consumers. This configuration adds processing overhead but is necessary for guaranteed delivery. The NON_PERSISTENT mode does not require that messages be stored by the JMS server before forwarding to consumers, so they can be lost if the JMS server fails while processing the message. This setting is suitable for notification messages that do not require guaranteed delivery.
  
3.关于JMS server
方案1.embedded in a j2ee project,<amq:broker ....
方案2.独立的外部服务,如直接运行activemq。
   <!-- (Optional) JNDI environment. Use when using JMS on a remote JNDI server. -->
            <initial-context-environment>
                <property>
                    <name>Context.SECURITY_PRINCIPAL</name>
                    <value>anonymous</value>
                </property>
                <property>
                    <name>Context.SECURITY_CREDENTIALS</name>
                    <value>anonymous</value>
                </property>
                <property>
                    <name>Context.PROVIDER_URL</name>
                    <value>http://{server.name}:1856</value>
                </property>
                <property>
                    <name>Context.INITIAL_CONTEXT_FACTORY</name>
                    <value>fiorano.jms.runtime.naming.FioranoInitialContextFactory</value>
                </property>
            </initial-context-environment>
Flex treats name element values that begin with the text "Context." as constants defined by javax.naming
flex的jndi命名规则

If you do not specify the initial-context-environment properties in the jms section of a destination definition, the default JNDI environment is used.
The default JNDI environment is configured in a jndiprovider.properties application resource file and or a jndi.properties File

4.Message Service Config
<destination id="chat-topic">
    <properties>
        <network>
            <throttle-inbound policy="ERROR" max-frequency="50"/>       
            <throttle-outbound policy="ERROR" max-frequency="500"/>
        </network>
    </properties>
</destination>
客户端CLIENT的网络状态,这里设置了上限<subscription-timeout-minutes  ....
       <server>
            <message-time-to-live>0</message-time-to-live>
        </server>
分享到:
评论

相关推荐

    LCDS_2.16_注册机

    Adobe公司LCDS注册机,适用于LCDS早期版本,学习交流之用

    Flex + LCDS + Java

    【Flex + LCDS + Java 入门教程】 Flex 是一种基于 Adobe Flash 技术的开源框架,用于构建富互联网应用程序(RIA)。...通过学习和理解这三个技术,你可以创建出功能丰富、响应迅速的Web应用,满足复杂的企业级需求。

    java Flex LCDS flex.war lcds.war

    Flex LCDS flex.war就是lcds.war Flex+LCDS使用的war包

    flex_lcds安装配置

    很多人在帖子和群中问到过一些关于建立Flex+LCDS(FDS)工程的问题,由于操作上的东西,很难简单说清楚,于是写了一个简单的教程(本来很早就答应过的,结果被newfish逮住做东西,加上公司的事,一直抽不出时间哈,...

    lcds.war lcds.war lcds.war

    lcds.war lcds.war lcds.war lcds.war lcds.war lcds.war lcds.war lcds.war

    lcds flex与java通讯工具

    lcds是用于来连接java数据库的哦!使用Flex 3 plugin+Eclipse+lcds 欢迎大家下载

    lcds develop guide

    《LCDs Develop Guide》是Adobe LiveCycle Data Services ES Developer's Guide的中文译名,这是一份详尽的...通过深入学习这份指南,开发者能够充分掌握LCDS的各项功能,从而构建出功能强大、用户体验优秀的RIA应用。

    lcds31.war

    从官方安装包lcds31-win.exe中提取的lcds31.war。

    cairngorm + lcds最小包.rar

    在最小工程包中,开发者可以学习如何配置和集成这两个工具,理解它们如何协同工作来处理数据请求、实现数据推送以及优化用户体验。此外,这个最小工程也是一个很好的起点,可以在此基础上根据实际需求扩展和定制。 ...

    flex.war lcds.war

    flex需要用到的war包 flex.war lcds.war

    EmployeeManager.zip_LCDS Flex_flex_flex LC_flex lcds

    总之,EmployeeManager项目是一个理想的Flex与LCDS学习资源,它展示了如何利用这两者创建一个功能完善的员工管理系统。通过对该项目的深入研究,开发者可以掌握RIA开发的核心技巧,为未来的企业级应用开发打下坚实...

    Flex+LCDS+Java入门教程+配置

    Flex+LCDS+Java入门教程,如何使用MyEclips进行配置

    FLEX LCDS 经典入门

    在开始学习Flex LCDS之前,你需要准备以下开发环境: 1. Eclipse 3.3 + FlexBuilder3 beta2 插件版:这是集成开发环境,用于创建Flex项目。 2. MyEclipse 6.0:J2EE项目的开发和部署工具,可以部署Flex和Java结合的...

    flex.war文件,供不愿装lcds的朋友速用

    flex.war lcds java flex 这个包可以供不想下载lcds的朋友直接使用于flex的remote连接,方便好用

    Flex-LCDS-Java.rar_LCDS_flex_flex java

    5. **事件驱动编程**:学习Flex中的事件模型,如何在Flex客户端和LCDS服务之间触发和处理事件。 6. **数据推送**:利用LCDS的LiveCycle Polling Duplex或Long Polling机制实现服务器主动向客户端推送数据。 7. **...

    Flex LCDS的例子

    通过学习这个例子,新手能够更好地理解和掌握Flex与LCDS的整合技巧。 总之,Flex LCDS的整合让Flex应用能够充分利用Java的强大后端能力,为开发高效、动态的RIA提供了强大支持。通过实践和学习,开发者可以构建出...

    lcds.rar_LCDS_LiveCycle Data Servi_LiveCycleDataService_flex_fle

    LCDS(LiveCycle Data Services),原名为Flex Data Service(FDS),是Adobe提供的一款强大的...通过深入学习和应用LCDS,开发者可以构建出响应迅速、功能丰富的Flex企业应用,提升用户体验并增强系统的后台处理能力。

    flex lcds java配置

    【Flex + LCDS + Java配置详解】 Flex 是一种用于创建富互联网应用程序(RIA)的开源框架,它允许开发者构建交互性强、用户体验丰富的Web应用。它使用MXML和ActionScript编程语言,结合Adobe Flash Player或Adobe ...

    LCDS 3.1 ES2序列号

    本次探讨将围绕“LCDS 3.1 ES2序列号”这一主题展开,深入解析其背景、应用场景以及重要性。 ### LCDS 3.1 ES2概述 LCDS (LiveCycle Data Services) 是Adobe公司提供的一款企业级中间件产品,主要应用于Flex和AIR...

Global site tag (gtag.js) - Google Analytics