You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jakub Marchwicki (Updated) (JIRA)" <ji...@apache.org> on 2012/02/04 19:09:53 UTC
[jira] [Updated] (OPENEJB-1763) Allow EjbModule to be returned as a
part of in-class configuration in ApplicationComposer (@Module)
[ https://issues.apache.org/jira/browse/OPENEJB-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakub Marchwicki updated OPENEJB-1763:
--------------------------------------
Description:
The ApplicationComposer JUnit runner, allows certain types to be returned by the @Module annotated methods. EjbModule is not allowed and it would be helpful if a specific JNDI mapping needs to be defined for tests (that was our case). That way instead of
@Module
public EjbJar beans() {
EjbJar ejbJar = new EjbJar("application");
ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
return ejbJar;
}
a whole module can be created in-class
@Module
public EjbModule module() {
EjbJar ejbJar = new EjbJar("application");
ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
EjbModule ejbModule = new EjbModule(ejbJar, new OpenejbJar());
EjbDeployment deployment = new EjbDeployment(new StatefulBean(SomeClass.class));
deployment.getJndi().add(new Jndi("custombindings/myClass", "Local"));
ejbModule.getOpenejbJar().addEjbDeployment(deployment);
return ejbModule;
}
was:
The ApplicationComposer JUnit runner, allows certain types to be returned by the @Module annotated methods. EjbModule is not allowed and it would be helpful if a specific JNDI mapping needs to be defined for tests (that was our case). That way instead of
@Module
public EjbJar beans() {
EjbJar ejbJar = new EjbJar("application");
ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
return ejbJar;
}
a whole module can be created in-class
@Module
public EjbModule module() {
EjbJar ejbJar = new EjbJar("application");
ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
EjbModule ejbModule = new EjbModule(ejbJar, new OpenejbJar());
EjbDeployment deployment = new EjbDeployment(new StatefulBean(SomeClass.class));
deployment.getJndi().add(new Jndi("custombindings/myClass", "Local"));
ejbModule.getOpenejbJar().addEjbDeployment(deployment);
return ejbModule;
}
> Allow EjbModule to be returned as a part of in-class configuration in ApplicationComposer (@Module)
> ---------------------------------------------------------------------------------------------------
>
> Key: OPENEJB-1763
> URL: https://issues.apache.org/jira/browse/OPENEJB-1763
> Project: OpenEJB
> Issue Type: Improvement
> Components: tests
> Affects Versions: 4.0.0-beta-2
> Reporter: Jakub Marchwicki
> Priority: Minor
> Labels: patch, test
>
> The ApplicationComposer JUnit runner, allows certain types to be returned by the @Module annotated methods. EjbModule is not allowed and it would be helpful if a specific JNDI mapping needs to be defined for tests (that was our case). That way instead of
> @Module
> public EjbJar beans() {
> EjbJar ejbJar = new EjbJar("application");
> ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
> return ejbJar;
> }
> a whole module can be created in-class
> @Module
> public EjbModule module() {
> EjbJar ejbJar = new EjbJar("application");
> ejbJar.addEnterpriseBean(new StatefulBean(SomeClass.class));
> EjbModule ejbModule = new EjbModule(ejbJar, new OpenejbJar());
> EjbDeployment deployment = new EjbDeployment(new StatefulBean(SomeClass.class));
> deployment.getJndi().add(new Jndi("custombindings/myClass", "Local"));
> ejbModule.getOpenejbJar().addEjbDeployment(deployment);
> return ejbModule;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira