myDs = new://Resource?type=DataSource&class-name=....&factory-name=... myDs.auth=Application ....
as properties should work Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-06-04 17:46 GMT+02:00 Vamsee Lakamsani <[email protected]>: > > > 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
