[weld-issues] [JBoss JIRA] Commented: (WELD-360) CDI component scanning does not include dependent bean archives when running EJBContainer.createEJBContainer()

Johan Eltes (JIRA) jira-events at lists.jboss.org
Wed Jan 6 08:10:30 EST 2010


    [ https://jira.jboss.org/jira/browse/WELD-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12502451#action_12502451 ] 

Johan Eltes commented on WELD-360:
----------------------------------

After som further testing, it also seems that CDI/EJBs that are in the test "branch" (i.e. src/test/java) of the EJB / CDI project remain unscanned. It would be great to be able to add test-EJBs that are looked up through the context by the junit test case. These test ejb:s could then be used to conduct typical integration testing of service: start transaction, execute service operation, verify db state, rollback, simply be being a requires-new Session EJB, that - before returning - does a setRollbackOnly().

> CDI component scanning does not include dependent bean archives when running EJBContainer.createEJBContainer()
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WELD-360
>                 URL: https://jira.jboss.org/jira/browse/WELD-360
>             Project: Weld
>          Issue Type: Bug
>          Components: GlassFish Integration
>    Affects Versions: 1.0.0.GA
>         Environment: Mac OS 10.6.2, 
> java version "1.6.0_17"
> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
> glassfish-embedded-all-3.0
>            Reporter: Johan Eltes
>            Assignee: Roger Kitain
>
> When starting embeddable glassfish within a unit test (JUnit 4.7), weld does only register managed beans (CDI-beans) discovered in the same bean archive as the EJB:s. If an EJB depend on (via @Inject or @Inject + @SomeQualifier) a bean in another bean archive, start-up of the container fails with "org.glassfish.deployment.common.DeploymentException: Injection point has unstatisfied dependencies. Injection point:...". It does however successfully load the classes into the JVM: Removing the @Inject-annotation makes the container launch, but - of cause - some tests to fail.
> I raised it as a blocker, since I'm not aware of a work-around.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list