Hi Alexander,
I apologize for delayed response.
Could you please send out the test project,
so that i can have a look?
Thanks,
~Jakub
On 9.7.2011 12:51, Alexander Zapi wrote:
> Hi!
>
> I have implemented an XmlAdapter and I would like that Guice injects something (e.g. an EntityManager) when Jersey instantiates this XmlAdapter. Is this possible? How to do this?
>
> I want my adapter to look like this:
>
> public class CustomerAdapter extends XmlAdapter<Long, Customer> {
>
> @Inject
> public CustomerAdapter(Something s) {
> {
> // do something with s
> }
> }
>
>
> I want Jersey/Guice to inject an instance of Something. When I try out this code, I get a runtime exception that a no-args constructor for CustomerAdapter is missing.
>
>
> Perhaps somebody can help me, thank you!
> Alex