tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsee Lakamsani <vam...@yahoo.com.INVALID>
Subject Using custom data source connection factory in JUnit
Date Wed, 04 Jun 2014 15:46:47 GMT


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message