Sure you are right :), but the provider does not work like a template, it is like a holder for the common config(s) of its related data sources.
On Mon, May 25, 2009 at 10:54 PM, David Blevins <[email protected]> wrote: > Oh really, that's crazy. We've had the provider + service-jar.xml (which is > a template) concept since about 2001. > > Great minds think alike I guess. > > On May 25, 2009, at 12:37 PM, Mohammad Nour El-Din wrote: > >> Great Idea, it is something similar to what you can do in WAS, you >> create a Database provider and then you create data-sources based on >> this provider. >> >> On Mon, May 25, 2009 at 10:30 PM, David Blevins <[email protected]> >> wrote: >>> >>> Poked at this idea a little but didn't have time to get it in before the >>> release. >>> >>> The idea is that instead of doing this as we currently do: >>> >>> <Resource id="My DataSource" type="DataSource"> >>> JdbcDriver org.hsqldb.jdbcDriver >>> JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb >>> UserName sa >>> Password >>> JtaManaged true >>> </Resource> >>> >>> <Resource id="My Unmanaged DataSource" type="DataSource"> >>> JdbcDriver org.hsqldb.jdbcDriver >>> JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb >>> UserName sa >>> Password >>> JtaManaged false >>> </Resource> >>> >>> >>> You can instead utilize the already existing 'provider' attribute to >>> point >>> to things in the openejb.xml file just as you can already use it to point >>> to >>> things declared in a service-jar.xml file. >>> >>> <Resource id="My DataSource" type="DataSource"> >>> JdbcDriver org.hsqldb.jdbcDriver >>> JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb >>> UserName sa >>> Password >>> JtaManaged true >>> </Resource> >>> >>> <Resource id="My Unmanaged DataSource" provider="My DataSource"> >>> JtaManaged false >>> </Resource> >>> >>> >>> Small tweak to reduce the redundant config data. >>> >>> >>> -David >>> >>> >> >> >> >> -- >> ---- >> Thanks >> - Mohammad Nour >> - LinkedIn: http://www.linkedin.com/in/mnour >> ---- >> "Life is like riding a bicycle. To keep your balance you must keep moving" >> - Albert Einstein >> > > -- ---- Thanks - Mohammad Nour - LinkedIn: http://www.linkedin.com/in/mnour ---- "Life is like riding a bicycle. To keep your balance you must keep moving" - Albert Einstein
