Dave wrote:
On 5/21/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:
big commits? see, that's when you start to scare me. maybe i have the
wrong conception of what these changes entail, but i am not expecting a
big commit to make this happen and i am expecting mostly new code and
not much modification to existing code.
Yeah, big is not the right word. Significant, maybe?
What I meant was that I might check-in a couple of new standalone
classes for review like DatabaseProvider and MailProvider before I
start commits that touch existing code like RollerContext.
gotcha.
One question: where did you see the docs for the Hibernate
InjectedDataSourceConnectionProvider? It appears to be part of the
Hibernate Entity Manager stuff and not a standard part of Hibernate.
hmmm, perhaps that is only part of the entity manager stuff, i looked
through it pretty quickly and then closed the page.
i'm not sure exactly what the right way to do it via standard hibernate
is, but there is a DatasourceConnectionProvider class which provides a
setDataSource() method on it ...
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/connection/DatasourceConnectionProvider.html
the real question is how you pass in your DataSource for it to be
injected. the connection provider factory seems to contain that logic
and it does provide a way to get a new connection provider given a set
of properties and a map of injection data, but i'm not sure if you can
use that by just specifying the DatasourceConnectionProvider in your
config. the docs make it sound like they just try to use that
connection provider by extracting the DS from jndi but don't make it
clear if you can just manually inject the DS somehow. would be kinda
lame if you couldn't do that :(
you could definitely get around that by either providing your own
connection provider class and setting that in the config and all it
would do is ask our roller provider for it's DS and use that. or you
could find a way to have our roller provider set the DS in jndi so that
hibernate can look it up again.
-- Allen
- Dave