users@jersey.java.net

JSR 299 SessionScoped

From: Herak Sen <HSen_at_vertrax.com>
Date: Thu, 3 Dec 2009 13:25:31 -0500

Hi Paul,

Output for SessionScoped beans cannot be generated by the default MessageWriters.

@XmlRootElement
@SessionScoped
public class TestSO implements Serializable
{
  private String f1 = "val";
  //get Set..
}

@Path("/system")
@ManagedBean
public class TesResource {
        @Inject
        private TestSO to;

      @GET
        @Produces(MediaType.APPLICATION_XML)
        public TestSO testMethod() {
               return to;
      }
}

It cannot find the messagewriter for the proxy that is generated by WELD.

Herak