Hi

add openejb-cxf-rs as dependency and JAXRS will get deployed if you
activate the associated service (ie remote service for the mode you use)

Side note: we have other testing solution these days like EJBContainer,
ApplicationComposer, Arquillian etc...all support JAXRS



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-04-23 16:31 GMT+02:00 David Goodenough <
[email protected]>:

> I notice that openejb can be used directly in places like junit tests,
> which
> is wonderful and I (think I) understand how it might work for an EJB app.
>
> My case is I suppose best described as half an EJB app, there is the server
> end but no EJB client.  Instead I have an @Stateless EJB which has @POST
> annotated methods called by JAX-RS.
>
> In my junit tests currently I use the JAX-RS client code to call a local
> tomee
> instance.
>
> Is it as simple as instantiating the EJB in the way documented at:-
>
> http://openejb.codehaus.org/embedded.html
>
> and then wrapping object that I would have serialised using the JAX-RS
> client in a JAXBObject and calling the method on the EJB direct, or do I
> have to do something more?
>
> I realise that I will have to fake the HttpServletRequest object that I
> pass as a @Context parameter.
>
> David
>

Reply via email to