+1 not sure it's specified for an EAR

2013/5/29 Romain Manni-Bucau <[email protected]>

> Hi
>
> does it work in a war (even in an ear)?
>
> JAXRS is not defined for ear IIRC so not sure it can be deployed from it.
> If it works from a war just declare it in your web.xml and all should be
> fine without modifying that much your packaging
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/5/29 exabrial12 <[email protected]>
>
> > I have an application that just gets/puts RESTful stuff all day, written
> > completely in CDI. I don't have a use for the JSF/JSP/EJB side of TomEE
> in
> > this particular app.
> >
> > Here is what I've put into an EJB project, then included that in an EAR
> > that's being deployed /apps. The server starts fine, but it's not
> deploying
> > the JAX-RS Application.
> >
> > @ApplicationPath("/api")
> > public class FormsApplication extends Application {
> >     /**
> >      * {@inheritDoc}
> >      */
> >     @Override
> >     public Set<Class&lt;?>> getClasses() {
> >         return new HashSet<Class&lt;?>>(Arrays.asList(JSONEndpoint.class,
> > XMLEndpoint.class, RestExceptionMapper.class));
> >     }
> > }
> >
> > @Path("json/forms")
> > @Consumes(MediaType.APPLICATION_JSON)
> > @Produces(MediaType.APPLICATION_JSON)
> > public class JSONEndpoint extends FormsRestController {
> > }
> >
> > @ApplicationScoped
> > public abstract class FormsRestController {
> >     @Inject
> >     private Logger log;
> >     @Inject
> >     private Event<LifeInsuranceForm> lifeBus;
> >
> >     @POST
> >     @Path("lifeInsurance/submit")
> >     public void submit(LifeInsuranceForm lifeInsuranceForm) throws
> > Exception
> > {
> >         log.debug("create() invoked LifeInsuranceForm:{}",
> > lifeInsuranceForm);
> >         validate(lifeInsuranceForm, LifeInsuranceGroup.class);
> >         lifeBus.fire(lifeInsuranceForm);
> >     }
> > }
> >
> > I feel like I'm missing something painfully obvious and stupid.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/JAX-RS-and-OpenEJB-Standalone-tp4663308.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>



-- 
Jean-Louis

Reply via email to