|
From: Jay B. <te...@gm...> - 2008-06-19 14:07:09
|
It sounds like this is similar to what I was thinking about with seam at the NEJUG talk . It is not really integration, more compatibility. Take this example : I have a Seam component (EJB or POJO does not matter - but most likely stateless) and I also want to have if accessible through a restful call, I should be able to put the correct annotations on it with resteasy and have it work. This would mean either a combined WAR with seam app, and resteasy servlet, or separate wars in an EAR, or something like that. I see seam and resteasy working together really two primary ways. Either the way described above - as different ways to access/manipulate the underlying component. The other would be Seam using restful calls internally as a result of a user action, or to pull data for the UI. These internal restful calls would not really be integration either, but more like a data source, or remote EJB call via rest. The question is - do the co-exist well, not do work together and know about each other. My $.02, -Jay On Wed, Jun 18, 2008 at 9:30 PM, Bill Burke <bb...@re...> wrote: > 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 > > ------------------------------------------------------------------------- > 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 > -- blog: http://in.relation.to/Bloggers/Jay |