glassfish
  1. glassfish
  2. GLASSFISH-20354

EJBException thrown in JAXRS resource that's also an EJB bean is sometimes consumed by CDI

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b85
    • Fix Version/s: 4.0_b86_RC2
    • Component/s: jax-rs
    • Labels:
      None

      Description

      In a resource

      @Stateless
      @Path("/ssb")
      public class StatelessRootResource {
      	@Path("exception")
      	@GET
      	public String throwException() {
      		throw new EJBException(new WebApplicationException(Status.CREATED));
      	}
      }
      

      the EJBException should be unwrapped and the exception processed by JAXRS according to JAXRS Spec. However, this only happens in about 50% of deployments (tested 15times in a row). It seems that status 201 is returned only when JAXRS container is dealing with it. Sometimes, Status 500 returned and the exception is logged to server log. However, when

      asadmin set configs.config.server-config.cdi-service.enable-implicit-cdi=false

      ,
      Status 201 has been returned 10x in a row, no 500.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Jakub Podlesak
              Reporter:
              jan.supol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: