OpenNTF/SocialSDK

Endpoint not Serializable leads to Exceptions trying to keep it in CDI session scope on tomcat server

Closed this issue · 4 comments

We tried to use the SBT in a CDI based servlet running on a tomcat server and having the endpoint configured to session scope (which is the default) leads to a NotSerializable Exception.
It would be great, if the BasicEndpoint or AbstractEndpoint class could just implement the Serializable interface to solve this.

Please use the MemoryStore and not the Endpoint

We managed to work around this by changing the managed-bean-scope in the xml file from session to request, but lead to a lot of garbage.

<managed-bean>
        <managed-bean-name>connections</managed-bean-name>
        <managed-bean-class>com.ibm.sbt.services.endpoints.ConnectionsBasicEndpoint
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
....

I am not quite sure, how the MemoryStore could help here?

Why are you storing the endpoint? it doesn't make sense. are you storing it for configuration purposes? or for access?

We can reopen the request if we understand more about this issue.