[arquillian-issues] [JBoss JIRA] (ARQ-814) Should support injection of EJBs (as CDI Beans) in Weld Embedded
Tomas Remes (JIRA)
issues at jboss.org
Mon Apr 24 04:25:01 EDT 2017
[ https://issues.jboss.org/browse/ARQ-814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomas Remes resolved ARQ-814.
-----------------------------
Resolution: Won't Fix
We don't plan to support EJBs in arquillian-container-weld. I think the proposed pull request is not 100% solution to this problem (as Aslak stated - injection points in EJB class wouldn't work) and IMO brings just possible confusion.
This would require to introduce some embedded EJB container integration which wouldn't be so trivial I guess. I think it's still better to use some real EJB container (WFLY, GlassFish, etc) to test such testcases.
> Should support injection of EJBs (as CDI Beans) in Weld Embedded
> ----------------------------------------------------------------
>
> Key: ARQ-814
> URL: https://issues.jboss.org/browse/ARQ-814
> Project: Arquillian
> Issue Type: Bug
> Components: Weld Containers
> Affects Versions: weld_1.0.0.CR3
> Reporter: Anthony O.
> Assignee: Marko Lukša
> Attachments: EJBTest.java
>
>
> As seen in [this post on the Arquillian forum|https://community.jboss.org/message/723563], we cannot test that simple class as an NPE is thrown from {{org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockEjBServices}} which seems to be a copy of Weld code as [Aslak Knutsen|https://community.jboss.org/people/aslak] said.
> {code}
> @RunWith(Arquillian.class)
> public class EJBTest {
> @Deployment
> public static JavaArchive createTestArchive() {
> return ShrinkWrap
> .create(JavaArchive.class, "test.jar")
> .addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
> }
> @Stateless
> public static class SomeService {
> public String someMethod() {
> return "test";
> }
> }
> @Inject
> SomeService someService;
> @Test
> public void testStatelessCall() {
> Assert.assertEquals("test", someService.someMethod());
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the arquillian-issues
mailing list