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