tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Using multiple Rest Api services when testing
Date Mon, 03 Feb 2014 14:35:40 GMT
Hi

using a jaxrs Application?
http://svn.apache.org/repos/asf/tomee/tomee/trunk/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFromWebXmlTest.java
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-03 Chris Christo <_c.c@mail.com>:
> Hi,
>
> I'm using the ApplicationComposer and the EnableServices("jaxrs") when running my test:
>
> @EnableServices(value = "jaxrs")
> @RunWith(ApplicationComposer.class)
> public final class MyTest {
>         @Configuration
>         public Properties config() { return PROPERTIES; }
>
>         @Module
>         public EjbModule ejb() { return EJB_MODULE; }
> }
>
> When I create the EjbModule and add my @Stateless beans to it, if a bean is marked with
an @Path annotation, the Application Composer will publish it at the 127.0.0.1..../MyTest/path
address.
>
> Problem is, if I have multiple @Stateless+@Path annotated beans added to the EjbModule,
then the application composer attempts to publish all these beans at the 127.0.0.1/MyTest/path
address, which results in an error (RuntimeException - Already a destination on https://127.0.0.1:port/MyTest).
>
> Is there a way to have multiple rest beans when using the @EnableServices("jaxrs")?
>
> Regards,
>
> Chris
>
>
>

Mime
View raw message