|
From: Ryan M. <rmc...@sa...> - 2008-06-18 16:52:43
|
Regan, Seam support is something that I'd like to get in at some point, and I did have it working in some of the very early versions of RESTEasy. I doubt we'd be able to get Seam support in 1.0, but it's on my radar for a future release. To answer your question about the use of a Seam-managed EntityManager in a Resource: you've have to be able to have the Resource double as a Seam component otherwise you will get an NPE. Once I get the MultipartData support wrapped up, I'll have a look at the class loader stuff and proper Seam integration. Ryan- Ryan J. McDonough Platform, Specialist Java EE | Sapient 25 First Street Cambridge, MA 02141 desk: +1 617 761 1611 mobile: +1 508 735 4503 fax: +1 617 621 1300 The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ________________________________ From: res...@li... [mailto:res...@li...] On Behalf Of da kna Sent: Wednesday, June 18, 2008 8:46 AM To: res...@li... Subject: [Resteasy-developers] RESTeasy and Hot Deployed Seam Components Hello, I'm trying to get RESTeasy to work with Seam hot-deployed components, but I can't figure it out. Because this is a mailing list, I will copy my posting from seamframework.org <http://seamframework.org/Community/HotDeploymentEntityManagerAndRESTeas yProblem> . If someone can give me some hints, I will post them to the seam forum as well. My project is using seam components, no EJBs. So all my action classes go to WEB-INF/dev and therefore are not visible for classes deployed outside, because of the custom seam class loader, right? So when I want to use a Seam and JAX-RS annotated action class (@NAME, @PATH at Class, and @GET at method) with RESTeasy, it fails to find it, because it scans in WEB-INF/classes by default. Even when I configure RESTeasy with context param resteasy.resources including the fully qualified class name, I get a ClassNotFoundException. Ok, then I tried to put the action class in model directory, changed package name and corresponding resteasy.resources param. Now RESTeasy finds the class and tries to process the @GET marked action method, but it fails with an NPE when using the injected EntityManager. I guess there is no DI happening? But I want to load the RESTeasy/JAXB annotated entity... So, the questions are: Is there a way for RESTeasy to load seam components in WEB-INF/dev? If not, can I use the @In Annotation for the EntityManager to get access to seam managed persistence context in RESTeasy? All the examples I found are using EJB/Seam components, not regular seam beans. Anyone got this to work? Thanks for any pointers... Regen PS: I'm using RESTeasy Beta 5, Seam 2.0.2.SP1, JBoss 4.2.2.GA ________________________________ Gesendet von Yahoo! Mail <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http:/us.rd.yahoo.c om/evt=52427/*http:/de.overview.mail.yahoo.com> . Dem pfiffigeren Posteingang. |