[jboss-jira] [JBoss JIRA] (WFLY-1960) CDI @Inject of @Stateless @WebService cause WELD-001408 Unsatisfied dependencies
RH Bugzilla Integration (JIRA)
jira-events at lists.jboss.org
Tue Sep 3 14:01:04 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
RH Bugzilla Integration updated WFLY-1960:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1001610
> CDI @Inject of @Stateless @WebService cause WELD-001408 Unsatisfied dependencies
> --------------------------------------------------------------------------------
>
> Key: WFLY-1960
> URL: https://issues.jboss.org/browse/WFLY-1960
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, EJB, Web Services
> Affects Versions: 8.0.0.Alpha4
> Reporter: Aslak Knutsen
> Assignee: Jozef Hartinger
>
> CDI @Inject of @WebService does not work.
> {code}
> import javax.ejb.Stateless;
> import javax.jws.WebService;
>
> @Stateless
> @WebService
> public class TestBean {
> }
>
>
> import javax.inject.Inject;
>
> import org.jboss.arquillian.container.test.api.Deployment;
> import org.jboss.arquillian.junit.Arquillian;
> import org.jboss.shrinkwrap.api.ShrinkWrap;
> import org.jboss.shrinkwrap.api.asset.EmptyAsset;
> import org.jboss.shrinkwrap.api.spec.WebArchive;
> import org.junit.Test;
> import org.junit.runner.RunWith;
>
>
> @RunWith(Arquillian.class)
> public class TestBeanIT {
>
> @Inject
> TestBean bean;
>
> @Deployment
> public static WebArchive createDeployment() {
> WebArchive arch = ShrinkWrap.create(WebArchive.class);
> arch.addClass(TestBean.class);
> arch.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> return arch;
> }
>
> @Test
> public void fooTest() throws Exception {
>
> }
> }
> {code}
> Using CDI to do a non contextual injection on a class where @EJB is used instead of @Inject works.
> {code}
> @RunWith(Arquillian.class)
> public class TestBeanIT {
>
> @EJB
> TestBean bean;
> ...
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list