|
From: Bill B. <bb...@re...> - 2008-06-19 01:28:28
|
No, I don't have Seam integration. I'm also not sure it fits. Seam maintains a conversation between the client and the server which is kind of against the REST principal of statelessness. If you're just looking to be able to use the @PersistenceContext annotation to inject JPA references, you could use an EJB to do this. Just use the JAX-RS annotations on the EJB's business interface and use the resteasy.jndi.resources http://wiki.jboss.org/wiki/RESTeasyEJBIntegration for more information. da kna wrote: > 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/HotDeploymentEntityManagerAndRESTeasyProblem>. > 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.com/evt=52427/*http://de.overview.mail.yahoo.com>. > > Dem pfiffigeren Posteingang. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |