• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless EJB 3.1 as a REST endpoint (javax.ws.rs.core.Application, @Stateless, @Path, @GET)  RSS feed

 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Ranchers!

Simple question - can an @Stateless EJB which is a REST endpoint (@Path, @GET, etc.) packaged and deployed as a EJB-JAR, or to make it accessible it have to be a WAR?

Thanks in advance,

Cheers!
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Section 2.3 of JaxRS spec has the details. In brief, within a Java EE environment .war deployment is the only supported way. There's a section on "Other Container" in the spec which says that servers might provide a different way of packaging but I don't know if any server does.
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jaikiran!

I looked for this answer in the EJB spec but without a luck.
I will then proceed with the JAX-RS spec.

Cheers!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!