Re: [jetty-user] Dynamic Datasources on jetty

Pedro Sena <[email protected]> Mon, 21 Nov 2011 07:49:09 -0200
Newsgroups gmane.comp.java.jetty.support
Message-ID <CAM7EwNc6igtJh30J9nnM73y1hvJ1VsbQTYJRrHEXLDT4oy9gQw@mail.gmail.com>
Hi Jan,

I'm using Spring and I found a way to create the Datasource using it and
assigning this datasource to a Bean, this is enough for my use case(just
one app needs to access such DS).

Thanks for this infos

On Mon, Nov 21, 2011 at 12:05 AM, Jan Bartel <[email protected]> wrote:

> Hi Pedro,
>
> What do you mean by dynamic exactly? Do you mean that you don't
> want the context to be restarted? Also, what should the scope of
> the datasource be - available to the whole container or only a specific
> webapp? How will your app access the the new datasource - are you
> binding it in web.xml or not?
>
> FYI, the jetty context deployer watches xml files in  $JETTY_HOME/contexts,
> so if you change say foo.xml (that configures your foo webapp), then foo
> context will get redeployed, so you can use that facility to add or
> subtract
> resources (but the context will be redeployed). You can probably do
> something
> similar with the webapp deployer - using a jetty-env.xml file to describe
> your resource, but again, your context will restart.
>
> Jan
>
> On 19 November 2011 11:35, Pedro Sena <[email protected]> wrote:
> > Hi Guys,
> >
> > I'm starting a new project with Jetty and one of my requirements is add
> > datasources dynamically.
> >
> > I've done that on Jboss w/o problems (just adding *-ds.xml on deploy
> dir).
> > I'd like to know the best approach to do it on Jetty.
> >
> > Remembering that my app won't start Jetty from my Java code, it will run
> as
> > a common service.
> >
> > Regards
> >
> > --
> > /**
> > * Pedro Sena
> > * Systems Architect
> > * Sun Certified Java Programmer
> > * Sun Certified Web Component Developer
> > */
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/