Ok, I got the issue about StringProducer: String type. Env-entry types are not supported this way but all other types should work.
So <resource-ref> sounds wrong with type String. That said add in src/main/resources/META-INF/test.ejb-jar.xml: <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"> <enterprise-beans> <session> <ejb-name>Course</ejb-name> <env-entry> <env-entry-name>myresource</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>/home/rmannibucau</env-entry-value> </env-entry> </session> </enterprise-beans> </ejb-jar> and starting the container with: Properties p = new Properties(); p.put(DeploymentLoader.OPENEJB_ALTDD_PREFIX, "test"); container = EJBContainer.createEJBContainer(p); works Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2013/10/31 amber <[email protected]>: > Hi Romain, > > I've try the solution with properties set, but can't get it working. > > I've build a new sample in attachment that is near my target (having a > external String resource set into the application server settings) > > thx cdi-basic-inject-resource.zip > <http://openejb.979440.n4.nabble.com/file/n4665849/cdi-basic-inject-resource.zip> > for your patience ^^ > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/resource-ref-settings-within-openEJB-tp4665781p4665849.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
