0

If I use the same interface for a local EJB and web service EJB as shown below I can't use the same create method. What should I do? Should I create another interface for the web service methods or doing as below? Or are there better alternatives?

@Local
@Path("questions")
public interface QuestionServiceLocal {

    @POST
    Response create(JAXBElement<Question> question);
    void create(Question question);


}
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434

1 Answers1

1

What is your use case ? Do you want to create a Restful Web service API ? Then read about JAX-RS specification http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html ALTERNATIVES :- Several libraries/frameworks as follows could help you develop restful services easily,

  1. RestEasy - Popular JAX-RS implementation.
  2. Jersey - Reference implementation of JAX-RS spec.
  3. Restlet - Not so popular but one of the viable option.
  4. Play Framework - Personal favorite and very easy to pickup.
  5. Dropwizard - New entrant, from guys who created Yammer !
Community
  • 1
  • 1
Rakesh Waghela
  • 2,227
  • 2
  • 26
  • 46