Re: [jetty-user] Dynamic Datasources on jetty
Jan Bartel <[email protected]> Mon, 21 Nov 2011 13:05:48 +1100
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CALg=Vpjs0H+s=rPBVG_UbMHM=0qJ4WL9DOBOYmAdd6rgf-ToGw@mail.gmail.com> |
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