Sim
Ficou assim: -locale en_US -services
"../WebContent/WEB-INF/flex/services-config.xml"
Preciso entender como configura o messaging-config e o service-config
Os meus estão assim:
messaging-config:
<default-channels>
<channel ref="streaming-amf"/>
</default-channels>
<destination id="chatMessage"/>
service-config:
<channel-definition id="streaming-amf"
class="mx.messaging.channels.StreamingAMFChannel">
<endpoint url="
http://localhost:8080/BlazeDS/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>
</properties>
</channel-definition>
Dessa forma funcionou, mas entre uma instância no ie e outra no firefox.
eSTAVA COM ESSES DOIS FUNCIONANDO AGORA, tentei colocar mais um firefox na
jogada e deu erro:
[BlazeDS]Endpoint with id 'streaming-amf' cannot grant streaming connection
to FlexClient with id '2774A9B7-D31E-17D1-89C8-F9EEFE5C7136' because
max-streaming-connections-per-session limit of '1' has been reached.
Existe uma outra configuração que seria:
<channel-definition id="my-polling-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint url="
http://localhost:8080/BlazeDS/messagebroker/amfpolling"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>4</polling-interval-seconds>
</properties>
</channel-definition>
Mas não funcionou, teria como você explicar essa parte?
Obrigado,
Vinicius.
2009/6/2 Mário Júnior <[email protected]>
> Tu indicou o services-config.xml em additional arguments compiler?
>
>
>
> 2009/6/2 Vinicius <[email protected]>
>
>
>> Pessoal,
>>
>> Ninguém sabe mesmo.
>>
>> Fiz um teste usando o remoting-config trocando informações entre java
>> e flex e funcionou.
>>
>> Agora usando o messaging-config não e está configurado desta forma:
>>
>> <destination id="myNewDestination">
>> <properties>
>> <network>
>> <session-timeout>0</session-timeout>
>> </network>
>> <server>
>> <max-cache-size>1000</max-cache-size>
>> <durable>false</durable>
>> </server>
>> </properties>
>> <channels>
>> <channel ref="my-polling-amf" />
>> </channels>
>> </destination>
>>
>> E o meu producer assim:
>>
>> <mx:Producer id="producer" destination="myNewDestination" />
>>
>> Onde será que estou falhando?
>>
>> Obrigado,
>> Vinicius.
>>
>> On 2 jun, 11:15, Vinicius <[email protected]> wrote:
>> > Pessoal,
>> >
>> > Estou fazando o teste deste exemplo:
>> >
>> > <?xml version="1.0" encoding="utf-8"?>
>> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
>> > layout="absolute" creationComplete="init()">
>> > <mx:Script>
>> > <![CDATA[
>> > import mx.messaging.events.MessageEvent;
>> > import mx.messaging.messages.AsyncMessage;
>> >
>> > private function init():void
>> > {
>> > consumer.subscribe();
>> > }
>> >
>> > private function pub():void
>> > {
>> > var message:AsyncMessage = new
>> AsyncMessage();
>> > message.headers.myCustomHeader = "hello
>> header";
>> > message.body = "hello flex message
>> service!";
>> > producer.send(message);
>> > }
>> >
>> > private function onMsg(event:MessageEvent):void
>> > {
>> > trace(event.message.body);
>> > }
>> > ]]>
>> > </mx:Script>
>> > <mx:Producer id="producer" destination="myNewDestination" />
>> > <mx:Consumer id="consumer" destination="myNewDestination"
>> > message="onMsg(event)" />
>> > <mx:Button click="pub()" />
>> > </mx:Application>
>> >
>> > Para tanto eu fiz o download do BlazeDS (blazeds-bin-3.2.0.3978.zip) e
>> > copiei para a pasta WEB-INF do meu projeto os dados da pasta WEB-INF
>> > do BlazeDS. Mas quando tento rodar o exemplo nada acontece, estou
>> > esquecendo de algo?
>> >
>> > Ops, fiz a seguinte configuração no messaging-config.xml:
>> >
>> > adicionei:
>> > <destination id="myNewDestination">
>> > <properties>
>> > <network>
>> > <session-timeout>0</session-timeout>
>> > </network>
>> > <server>
>> > <max-cache-size>1000</max-cache-size>
>> > <durable>false</durable>
>> > </server>
>> > </properties>
>> > <channels>
>> > <channel ref="my-polling-amf" />
>> > </channels>
>> > </destination>
>> >
>> > Obrigado,
>> > Vinicius.
>>
>>
>
>
> --
> Mário Júnior
> Programador Java / Adobe Flex
> http://blog.mariojunior.com
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para
[email protected]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---