This is the umbrella issue to cover the following situation/issue:
- User-defined classes should be available (when specified by the user) for use in the remote services. This means that these classes need to be added to the serialization contexts and classpath in the appropriate places.
- However, only some of the classes in a deployment and the deployment's dependency tree should be added to serialization contexts/classpath. Otherwise, if we add all of the classes, we risk making the serialization context so large that it will impact performance for some deployments (with large dependency trees).
- Lastly, specifying the user-defined classes that should be available for the remote services should be easy and straight forward.
The approach we've agreed on is to add a class-level @Remotable annotation to the kie-api that users can use to mark the classes that should be remote accessible. The deployment manager will then scan for these classes in the deployment and add them to the list of classes in the deployment unit event. This list of classes is used by the remote services code to build to the serialization context.