Unable to receive globalevent (separate tomcat for app.war & app-core.war)

Hi All,

I create project using Cuba Platform 6.9.7 & adding globalevent addon to propagate event from
method onAfterInsert entity listener to UI

When I deployed it using fastdeployment I could see event message propagate smoothly in UI, but when I deploy it separately into two .war & two tomcat in two server , apparently is not work

Do I have some miss steps here ?

thanks

Hi All,

After look up to catalina.out , I found below message, maybe it is related ?

> com.haulmont.addon.globalevents.core.WebSocketServer - Closed session WebSocketServerSockJsSession[id=240bf4d5b40d4a9d88b22aa7c61a48c1] with status CloseStatus[code=1009, reason=The decoded text message was too big for the output buffer and the endpoint does not support partial messages]

Hi All,

After doing several updates , finally could solve this

  1. Changing data object type in GlobalUiEvent into String
  2. Add bean properties in
    /com/haulmont/addon/globalevents/websocket-spring.xml
<bean class="org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean">
        <property name="maxTextMessageBufferSize" value="281920"/>
        <property name="maxBinaryMessageBufferSize" value="281920"/>
    </bean>
3 Likes

Hi Arifian,

Thank you for letting us know about the solution. I will add the link to this topic to the add-on docs.

Regards,
Konstantin

1 Like

Hi,

could you please expain how can I change these settings? which file I shoul edit? how can I override websocket-spring.xml? Because of this file is only in a cubaglevt…jar which is updated every deployment.

Hi, @felix.r.kamalov @krivopustov , could you solve the problem or manage by another way?

We could override websocket-spring.xml of globalevents addon.
Probably: Unpack war, Replace, Pack back. I don’t remember for sure.
But it had not helped.

So, I reduced size of sending global event object (leaved only id).
And after receiving event on web, I requested all information separatelly by that id from core

Many thanks, Felix!