[
https://issues.apache.org/jira/browse/TOMEE-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Romain Manni-Bucau updated TOMEE-1775:
--------------------------------------
Description:
see org.apache.tomee.embedded.SingleInstanceRunnerTest for a sample.
idea is to reuse some part of ApplicationComposer API to get a single container
for all tests in embedded mode.
Base is to declare an @Application class which holds the model and some
injections.
Note: this can be replaced setting tomee.application-composer.application
property to the fully qualified name of the app.
Note: @Application classes are only searched in the same jar as the test.
Model:
- @Classes: only context value is used.
- @ContainerProperties: to configure the container
- @WebResource: first value can be used to set the docBase (other values are
ignored)
- @TomEEEmbeddedSingleRunner.LifecycleTasks: allow to add some lifecycle tasks
(like starting a ftp/sft/elasticsearch... server)
Injections:
- CDI
- @RandomPort: with the value http or https. Supported types are URL (context
base) and int (the port).
> tomee embedded single instance runner
> -------------------------------------
>
> Key: TOMEE-1775
> URL: https://issues.apache.org/jira/browse/TOMEE-1775
> Project: TomEE
> Issue Type: New Feature
> Reporter: Romain Manni-Bucau
> Assignee: Romain Manni-Bucau
> Fix For: 7.0.0-M4
>
>
> see org.apache.tomee.embedded.SingleInstanceRunnerTest for a sample.
> idea is to reuse some part of ApplicationComposer API to get a single
> container for all tests in embedded mode.
> Base is to declare an @Application class which holds the model and some
> injections.
> Note: this can be replaced setting tomee.application-composer.application
> property to the fully qualified name of the app.
> Note: @Application classes are only searched in the same jar as the test.
> Model:
> - @Classes: only context value is used.
> - @ContainerProperties: to configure the container
> - @WebResource: first value can be used to set the docBase (other values are
> ignored)
> - @TomEEEmbeddedSingleRunner.LifecycleTasks: allow to add some lifecycle
> tasks (like starting a ftp/sft/elasticsearch... server)
> Injections:
> - CDI
> - @RandomPort: with the value http or https. Supported types are URL
> (context base) and int (the port).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)