0. 참조 문서

blazeDS 개발자 가이드 : http://livedocs.adobe.com/blazeds/1/blazeds_devguide/

blazeDS 다운로드 : http://opensource.adobe.com/wiki/display/blazeds/download+blazeds+3



1. blazeds.war 파일 다운로드 이후 Eclipse or Tomcat Import


2. 중요 참조 [jre 5.0 이상에서만 동작함에 유의 !]


blazeds.war 파일을 초기 import 하면 WEB-INF 폴더가 생성됩니다.

WEB-INF
└flex
  └ services-config.xml : 전반적인 서비스 설정을 포함.
  └ messaging-config.xml : Message Push 서비스 등 메시지 관련 서비스 설정을 포함.
  └ remoting-config.xml : Remote Object 호출 서비스 설정을 포함.
  └ proxy-config.xml : 프록시 서비스를 사용할 때
└lib - Flex에서 사용되는 library 파일이 존재하는 폴더
└web.xml - Flex Session Management, MessageBroker Servlet 설정에 대한 내용 포함.

3. services-config.xml


: 기본 채널의 설정 및 포함하는 서비스 파일의 경로를 확인 할 수 있다.
my-amf, my-secure-amf, my-polling-amf ..

4. 나머지 .xml 파일


- 설정된 해당 서비스를 확인할 수 있다.
- destination id 설정을 통해 flex에서 접근할 수 있도록 설정한다.

ex)

ㄱ. MessagePush : 해당 채널에 대한 종착점 id를 설정한다.
<destination id="realMsg"/>

ㄴ. Remote Object : 해당 원격지 클래스를 호출하기 위한 종착점 id를 설정한다.
<destination id="fruitRO">
        <properties>
            <source>wonsama.test.FruitManager</source>
        </properties>
</destination>

5. 기타 확인사항


ㄱ. <default-channels> 하위 노드에 여러개의 채널이 선언된 경우
맨 위쪽 부터 처리하며, 채널이 동작하지 않는 경우 다음 채널 서비스를 실행한다.

    <default-channels>
        <channel ref="my-streaming-amf"/> <!-- 처음 실행됨 -->
      <channel ref="my-polling-amf"/> <!-- 위 채널이 동작하지 않으면 동작 -->
    </default-channels>

ㄴ. StreamingAMFChannel 사용 시 <properties>의 하위노드가 1개 이상 존재해야 한다.
==> 존재하지 않으면 Explore에서 정상적으로 MessagePush가 동작하지 않음. (버그인듯?)

ex)
<channel-definition id="my-streaming-amf"
    class="mx.messaging.channels.StreamingAMFChannel">
    <endpoint
        url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf"
        class="flex.messaging.endpoints.StreamingAMFEndpoint" />
    <properties>
        <idle-timeout-minutes>0</idle-timeout-minutes>
        <max-streaming-clients>10</max-streaming-clients>
        <server-to-client-heartbeat-millis>5000    </server-to-client-heartbeat-millis>
        <user-agent-settings>
            <user-agent match-on="MSIE" kickstart-bytes="2048"
                        max-streaming-connections-per-session="3" />
            <user-agent match-on="Firefox" kickstart-bytes="2048"
                        max-streaming-connections-per-session="3" />
        </user-agent-settings>
    </properties>
</channel-definition>

ㄷ. 익스플로러에서 모든 창을 종료하지 않으면 Messaging Service에서 Lock이 발생되어 실시간 메시지 수신을 할 수 없다(약 10초 ~ ???초). (MessageBroker쪽)

파폭에서는 발생하지 않지만 익스플로러에서는 위와 같은 문제가 발생하네여 아.... 초난감 ;;
24시간 시간 모니터링 툴을 제작시 반드시 고려를 하시기 바랍니다. 프로젝트 3개월 차에 이런 버그를 발견해 내서리 쩝...

고객사에는 뭐 끄지마세요 이런식으로 -_-; 아.... 중요 정보 인것 같아 이전 포스트에 덧칠하여 다시 올려 봅니다.




+ Recent posts