GENERALPROBLEM:
-------------------------------
Serialization errors when serializing objects other than strings.
Server uses Tomcat CometProcessor and GWT serialization done using RPC
class.
Methods that return strings work just fine.
BACKGROUND:
-----------------------
Bean to be returned :
class MyEvent implements Serializable {
public String event;
public int id;
}
Client side event service definition:
public interface EventService extends RemoteService {
public MyEvent getEvent();
}
public interface EventServiceSync extends RemoteServiceAsync {
public void getEvent(AsyncCallback callback);
}
ServerSide
--------------
public EventServiceImpl extends RemoteServiceServlet implements
EventService, CometProcessor {
public MyEvent getEvent() {
return new MyEvent("Event returned", 1);
}
public void event(CometEvent event) {
if (event.getEventType() == CometEvent.EventType.BEGIN) {
//do the RPC decoding and encoding here to execute
method getEvent() using reflection
//then return the event object as a serialized
response string
}
}
}
PROBLEM:
----------------
If I run the project with the HTTP1.1 Tomcat Connector, the getEvent()
method is executed properly and the MyEvent object returned to client.
If I however I changed the Tomcat Connector to the Nio Connector in
server.xml, program fails with a serialization exception on executing
getEvent(). The error shows that MyEvent object is not assignable to
IsSerializable. This of course flabbergasts me.
Does anyone who has tried to work with Tomcat 6x CometProcessor and
GWT seen this behavior?
What am I missing. Why wont the response string constructed using RPC
class encoding method on a GWT serializable object work.
Thanks,
Melody
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---