kind of but not exactly. TomEE supports configuration of datasources and resources (including router) in: 1) tomee.xml 2) resources.xml (app classloader) 3) system.properties or JVM system properties
All of them are static If you want runtime resource definition you need to use internal mecanism. Globally it doesn't need to be tomee datasource to work, it can be custom ones. The easier will be to use DataSourceFactory: DataSourceFactory.create(name, jta, driverOrDataSourceClass, propertiesInString, waittime, evictionTimeout, evictableTimeout) If you don't use JTA compatible datasource you can just use dbcp. If you prefer just use SystemInstance.get().getComponent(DataSourceCreator.class). The API is maybe easier. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-03-16 21:31 GMT+01:00 onyii5119 <[email protected]>: > Are you saying that the only way it can work is for resources to be defined > in resources.xml or tomee.xml? In other words using properties and reading > the datasource params from a db will not work? > > Thanks, > Jonathan > > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Dynamic-DataSource-Exception-tp4657657p4668235.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
