Class SRAParticipant


  • @RequestScoped
    public abstract class SRAParticipant
    extends Object
    • Constructor Detail

      • SRAParticipant

        public SRAParticipant()
    • Method Detail

      • updateParticipantState

        protected abstract SRAStatus updateParticipantState​(SRAStatus status,
                                                            String activityId)
      • getCompensatorData

        protected String getCompensatorData​(String activityId)
      • getCurrentActivityId

        protected String getCurrentActivityId()
        Get the SRA context of the currently running method. Note that @HeaderParam(SRA_HTTP_HEADER) does not match the header (done't know why) so we the httpRequest
        Returns:
        the SRA context of the currently running method
      • getTerminator

        @HEAD
        @Path("/participant")
        @Produces("application/json")
        public javax.ws.rs.core.Response getTerminator()
      • commitWork

        @PUT
        @Path("/commit/{txid}")
        @Produces("application/json")
        public javax.ws.rs.core.Response commitWork​(@HeaderParam("Short-Running-Action")
                                                    String atId,
                                                    @PathParam("txid")
                                                    String sraId)
                                             throws javax.ws.rs.NotFoundException
        Throws:
        javax.ws.rs.NotFoundException
      • prepareWork

        @PUT
        @Path("/prepare/{txid}")
        @Produces("application/json")
        public javax.ws.rs.core.Response prepareWork​(@PathParam("txid")
                                                     String sraId)
                                              throws javax.ws.rs.NotFoundException
        Throws:
        javax.ws.rs.NotFoundException
      • rollbackWork

        @PUT
        @Path("/rollback/{txid}")
        @Produces("application/json")
        public javax.ws.rs.core.Response rollbackWork​(@PathParam("txid")
                                                      String sraId)
                                               throws javax.ws.rs.NotFoundException
        Throws:
        javax.ws.rs.NotFoundException
      • status

        @GET
        @Path("/status/{txid}")
        @Produces("application/json")
        public javax.ws.rs.core.Response status​(@PathParam("txid")
                                                String sraId)
                                         throws javax.ws.rs.NotFoundException
        Throws:
        javax.ws.rs.NotFoundException