You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Felipe Jaekel <fk...@gmail.com> on 2014/09/12 22:04:12 UTC

How to inject EJB into SOAPHandler?

Hi,

According to this link
<http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler>
it should be possible to inject a EJB in a SOAPHandler with the @EJB
annotation, but in my case it is still null.

Any ideas?

Thanks

Re: How to inject EJB into SOAPHandler?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
http://tomee.apache.org/examples/interceptors/README.html ?


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-15 19:37 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> Can you give me an example?
>
> Also, when I reload my application the EJB reference is null. Is this
> normal?
>
> Thanks
>
>
>
> 2014-09-15 12:05 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> yes it is
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-09-15 16:10 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
>> > It's working fine with CDI, thanks.
>> >
>> > A conceptual question: since my web service is an EJB, is possible to use
>> > an interceptor instead of a soap handler? If not, is it possible to get
>> rid
>> > of the handler chain xml file?
>> >
>> > 2014-09-12 19:01 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> Hi
>> >>
>> >> it should work but we can have a bug on it, can you try to use @Inject?
>> >>
>> >>
>> >>
>> http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/handler/SimpleHandler.java
>> >>
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> Twitter: @rmannibucau
>> >> Blog: http://rmannibucau.wordpress.com/
>> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> >> Github: https://github.com/rmannibucau
>> >>
>> >>
>> >> 2014-09-12 22:04 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
>> >> > Hi,
>> >> >
>> >> > According to this link
>> >> > <
>> >>
>> http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler
>> >> >
>> >> > it should be possible to inject a EJB in a SOAPHandler with the @EJB
>> >> > annotation, but in my case it is still null.
>> >> >
>> >> > Any ideas?
>> >> >
>> >> > Thanks
>> >>
>>

Re: How to inject EJB into SOAPHandler?

Posted by Felipe Jaekel <fk...@gmail.com>.
Can you give me an example?

Also, when I reload my application the EJB reference is null. Is this
normal?

Thanks



2014-09-15 12:05 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:

> yes it is
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-09-15 16:10 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> > It's working fine with CDI, thanks.
> >
> > A conceptual question: since my web service is an EJB, is possible to use
> > an interceptor instead of a soap handler? If not, is it possible to get
> rid
> > of the handler chain xml file?
> >
> > 2014-09-12 19:01 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> Hi
> >>
> >> it should work but we can have a bug on it, can you try to use @Inject?
> >>
> >>
> >>
> http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/handler/SimpleHandler.java
> >>
> >>
> >>
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >> 2014-09-12 22:04 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> >> > Hi,
> >> >
> >> > According to this link
> >> > <
> >>
> http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler
> >> >
> >> > it should be possible to inject a EJB in a SOAPHandler with the @EJB
> >> > annotation, but in my case it is still null.
> >> >
> >> > Any ideas?
> >> >
> >> > Thanks
> >>
>

Re: How to inject EJB into SOAPHandler?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yes it is


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-15 16:10 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> It's working fine with CDI, thanks.
>
> A conceptual question: since my web service is an EJB, is possible to use
> an interceptor instead of a soap handler? If not, is it possible to get rid
> of the handler chain xml file?
>
> 2014-09-12 19:01 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> Hi
>>
>> it should work but we can have a bug on it, can you try to use @Inject?
>>
>>
>> http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/handler/SimpleHandler.java
>>
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-09-12 22:04 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
>> > Hi,
>> >
>> > According to this link
>> > <
>> http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler
>> >
>> > it should be possible to inject a EJB in a SOAPHandler with the @EJB
>> > annotation, but in my case it is still null.
>> >
>> > Any ideas?
>> >
>> > Thanks
>>

Re: How to inject EJB into SOAPHandler?

Posted by Felipe Jaekel <fk...@gmail.com>.
It's working fine with CDI, thanks.

A conceptual question: since my web service is an EJB, is possible to use
an interceptor instead of a soap handler? If not, is it possible to get rid
of the handler chain xml file?

2014-09-12 19:01 GMT-03:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi
>
> it should work but we can have a bug on it, can you try to use @Inject?
>
>
> http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/handler/SimpleHandler.java
>
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-09-12 22:04 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> > Hi,
> >
> > According to this link
> > <
> http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler
> >
> > it should be possible to inject a EJB in a SOAPHandler with the @EJB
> > annotation, but in my case it is still null.
> >
> > Any ideas?
> >
> > Thanks
>

Re: How to inject EJB into SOAPHandler?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

it should work but we can have a bug on it, can you try to use @Inject?

http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/handler/SimpleHandler.java



Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-12 22:04 GMT+02:00 Felipe Jaekel <fk...@gmail.com>:
> Hi,
>
> According to this link
> <http://stackoverflow.com/questions/14099350/how-to-inject-ejb-into-soaphandler>
> it should be possible to inject a EJB in a SOAPHandler with the @EJB
> annotation, but in my case it is still null.
>
> Any ideas?
>
> Thanks