users@glassfish.java.net

Using EJB Inside JAX-RS on Glassfish

From: <forums_at_java.net>
Date: Tue, 14 Jun 2011 04:42:26 -0500 (CDT)

 Hi,

I try to use a EJB inside a JAX-RS.

EJB injection works only if EJB doesn't have any interfaces if I try to add
remote and local interface it fails.

 

@Remote public interface CalculatorEngineRemote {...}   @Local public
interface CalculatorEngineLocal {...}   @Stateless @Remote
(CalculatorEngineRemote.class) @Local (CalculatorEngineLocal.class)
@LocalBean public class CalculatorEngine implements CalculatorEngineRemote,
CalculatorEngineLocal {...}   @Stateless @Path("calculator") public class
Calculator {     @SuppressWarnings("unused")     @Context     private
UriInfo context;          @EJB     private CalculatorEngine
calculatorEngine;      ... }   Best Regards, Daniil
 

 

 


--
[Message sent by forum member 'daniil_k']
View Post: http://forums.java.net/node/811756