Hi Did you try using resources.xml or tomee.xml? Basically context.xml datasources are converted to tomee datasources to get pooling etc by default. Using resources.xml you can define whatever you want so it should match your need.
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-04-22 21:49 GMT+02:00 Stuart Easterling <[email protected]>: > Greetings all, this may be a straightforward question, but I'm unable to > find a solution. Basically I need to define a DataSource with a custom > resource factory. > > According to this thread: > > http://openejb.979440.n4.nabble.com/Getting-Started-TomEE-Plus-and-Custom-Resources-td4662031.html > > in Tomee: > >>ObjectFactory have to be defined in context.xml. tomee.xml >>doesnt define jndi factories but directly objects > > But when I add the Resource in META-INF/context.xml or in conf/context.xml > I get the following warning: > > WARNING: Property "factory" not supported by "0-myAppName/my/resource/name" > > The Resource declaration looks like this: > > <Resource name="my/resource/name" auth="Container" > type="javax.sql.DataSource" > factory="the.factory.class" > customParam="customParamValue" > /> > > I imagine the answer is an obvious one, but I've done a google search, > searched the mail archive, and reviewed the documentation and haven't found > a clear answer on how to proceed. I am running Tomee 1.6.0. > > Many thanks in advance to anyone who can help ! : ) > > Best, > Stuart
