Guice 3.0 + JPA persistence on soap and restful web service

392 views
Skip to first unread message

Hui Ouyang

unread,
Mar 27, 2012, 4:03:56 PM3/27/12
to google...@googlegroups.com
Hi,
Is it possible to use Guice and JPA persistence directly for a web application which services soap and restful web service concurrently?
I tried following the instruction http://code.google.com/p/google-guice/wiki/JPA. I have dao layer and service layer, the service layer actually manages the transaction. These two layers work fine with Guice 3.0 + JPA persistence in standalone tests. I added two wrapper on top of the service, one is for soap web service using JBoss implementation on javax.jws.WebService, another is Jboss resteasy implementation for restful web service. So I do not have a way to use injector to create the instance for the two wrappers since the application server instantiate them by calling the "new" directly.
I know there is resteasy-guice project for the restful web servcie, does it work for the soap web service also? Is there any way not relying on additional library to achieve the goal -- make the both soap and restful web services leverage Guice 3.0 persistence and have the Session-per-transaction strategy?

Thx.
Hui

Moandji Ezana

unread,
Mar 28, 2012, 1:37:55 AM3/28/12
to google...@googlegroups.com

If you're on an app server and already using the JPA, JAX-WS & JAX-RS services it provides, why not use CDI, too? No extra libraries and it's made to work together.

Moandji

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-guice/-/ck7X_2517kMJ.
To post to this group, send email to google...@googlegroups.com.
To unsubscribe from this group, send email to google-guice...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.

prabu

unread,
Jul 30, 2013, 7:25:05 AM7/30/13
to google...@googlegroups.com
I am working on building webservices using apache wink. I would like to use Guice. I couldnt find any articles on this usage..
Reply all
Reply to author
Forward
0 new messages