[ 
https://issues.apache.org/jira/browse/OPENEJB-1969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534730#comment-13534730
 ] 

Romain Manni-Bucau commented on OPENEJB-1969:
---------------------------------------------

Ok so first java:global constraints are not in javaee-6 webprofile.

That's said you can define resources in java:global without any issues, here an 
arquillian.xml:

<arquillian
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://jboss.org/schema/arquillian 
http://jboss.org/schema/arquillian/arquillian_1_0.xsd";>
  <container qualifier="openejb" default="true">
    <configuration>
      <property name="properties">
        # used to not have a single DataSource and be able to test the resource 
resolution
        db1 = new://Resource?type=Resource
        db1 = jdbc:hsqldb:mem:db1

        java\:global/db = new://Resource?type=DataSource
        java\:global/db.JdbcUrl = jdbc:hsqldb:mem:global
      </property>
    </configuration>
  </container>
</arquillian>



About your test OpenEJB supports this needs for ages thanks to 
env-entries.properties, maybe try to add to your archive this file, here a 
sample:


.addAsManifestResource(new StringAsset("java\\:global/properties/bankingUrl = 
ACleverValue\n"), "env-entries.properties")
                
> 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
>             Fix For: 4.5.2
>
>         Attachments: OPENEJB-1969.patch, OPENEJB-1969.zip
>
>
> 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

Reply via email to