[
https://issues.apache.org/jira/browse/OPENEJB-1969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13532617#comment-13532617
]
Trevor Baker commented on OPENEJB-1969:
---------------------------------------
Yeah. I should add better needs into my Jiras.
Reference:
Artifact:
org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext
Class: org.jboss.arquillian.testenricher.initialcontext.InitialContextProducer
@Inject @ApplicationScoped InstanceProducer<Context> -- set on an @Observes
ManagerStarted event
This is used by Arquillian in remote containers.
For example. I wired in Arquillian Persistence but it bombed out at on an
@Observes Before event because @Inject Instance<Context> returns null. So had
to create my own InstanceProducer. As more Arquillian extensions come about,
more will expect Instance<Context>.
> OpenEJBDeployableContainer has InstanceProducer<Context>
> --------------------------------------------------------
>
> Key: OPENEJB-1969
> URL: https://issues.apache.org/jira/browse/OPENEJB-1969
> Project: OpenEJB
> Issue Type: Improvement
> Components: arquillian
> Affects Versions: 4.5.1
> Reporter: Trevor Baker
> Priority: Minor
>
> Nice to have
> In OpenEJBDeployableContainer
> Change this:
> private InitialContext initialContext;
> To this:
> @Inject
> @DeploymentScoped // I'm assuming DeploymentScoped .. is there a better
> one to use?
> private InstanceProducer<Context> initialContext;
> So other Arquillian stuff can access the context with:
> @Inject
> private Instance<Context> ctx;
>
> Instead of new InitialContext().
--
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