On 5/17/07, Anil Gangolli <[EMAIL PROTECTED]> wrote:

I'm a little worried about trying to do db upgrades within the webapp, but
if we write this properly it won't have container dependencies and it won't
be hard to extract later if we decide we should.

[One of the nice things about using the dependency injection model is that
you write classes that can be in library jars that run equally well inside
or outside an app server container.  Here for example, injecting the
DataSource versus looking it up using JNDI makes it a lot easier.  It's easy
to write an adapter for the container setting that allows us to use JNDI to
look it up and then inject it; it's harder to run a class externally that
directly relies on JNDI to find the DataSource.]

Yes, DI is a nice model and I'm taking a little time to look into what
Spring and Guice have to offer as part of my installer design work.

- Dave

Reply via email to