tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsee Lakamsani <>
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" >
        singleton = true

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?

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