tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Christo <_...@mail.com>
Subject Using multiple Rest Api services when testing
Date Mon, 03 Feb 2014 14:33:34 GMT
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