I have written EJB's which receive and process ChangeObject in response to the sync method call. Class version erros like ClassNotFoundException and ClassCastException are created when applications written to receive ChangeObject are not running in the same web application as Flex (and thus created by the same classloader). I have tried moving the jar file to a global area so a parent classloader would take over, but this causes new problems for the Flex framework.
I have found a clever way to configure a special EAR file which integrates the Flex WAR, my EJB's, and includes special overrides in JBossAS which control classloading. It works, but was time consuming to develop and forces our applications to be deployed in only this way.
I would like to ask that the jar which contains ChangeObject be redesigned to allow it to be deployed away from Flex, so I can separate my EJB deployments from the Flex WAR deployment. I believe the problems were caused by the messaging framework servlets or classes they depend on not being in the WAR any longer.
I could get around this by using the remote EJB interface rather than the local interface, but in the same JVM the performance is many, many times faster when parameters are sent by reference rather than through serialization (pass by value).