I have a resource defined like this in tomee.xml and it works fine from TomEE
<Resource id=“myDS" type="javax.sql.DataSource"
       factory-name="createJDBCDataSource" 
class-name=“my.CustomDataSourceFactory" >
        auth=Application
        singleton = true
</Resource>

Now, I want to test this in JUnit using javax.ejb.embeddable.EJBContainer


This example shows how to use Properties to initialize the data source.  But is 
there any way I can just pass a javax.sql.DataSource object (created by calling 
createJDBCDataSource on my factory above directly) to the embeddable EJB 
container? 
http://tomee.apache.org/examples-trunk/injection-of-datasource/README.html

Reply via email to