You can call your existing actor-based endpoints by exposing them through the JAX-RS endpoints using the RestServletUtilsImpl
class. The response returns to the JAX-RS endpoint that handles the call, for example, wrapped into the RepresentationModel
, or by using the actor endpoint.
To execute a MVC REST actor endpoint:
Identify the actor endpoint to invoke.
Register the endpoint in the actor chain registry.
Disable the session confirmation number by setting the
enforceSessionConfirmation
parameter in your local/atg/dynamo/service/actor/Configuration.properties
file tofalse
.Define a JAX-RS endpoint method that invokes the actor chain framework using the
invokeActorRestEndpoint
method ofRestUtils
.
The following example shows how you might get a summary of the current user:
@Path("/currentUser/update") @POST @Endpoint(id = "/currentUser/update") public Object update() { return RestUtils .invokeActorRestEndpoint("/model/atg/userprofiling/ProfileActor/ update"); }