Okay, makes sense, whew. I'm still foggy on how to make the database connection. As it is now, I'm doing it inside a plugin. Will the DB cnxns be available before it loads my DatabaseMessageResourcesFactory class (which I identify in the struts config)
...or will I need to change the time at which I'm connecting to the database.. I suppose I can simply do some log.debugs so see whats getting called first.. thoughts? Other than that, I wanted to say THANK YOU so much for your help! On Apr 7, 2005 3:14 PM, James Mitchell <[EMAIL PROTECTED]> wrote: > ----- Original Message ----- > From: "David Johnson" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org> > Sent: Thursday, April 07, 2005 2:53 PM > Subject: Re: [resources] was: Re: RESEND: RE: Load message > resourcesfromDB??? > > > James > > > > I have a separate thread going on this, I apologize for that, but I'll > > summarize, and please excuse my ignorance. > > > > Essentially, I understand your point , but if I may delve deeper, > > > > I see that inheritance wise, > > > > 1. PropertyMessageResources extends MessageResources > > 2. PropertyMessageResourcesFactory extends MessageResourcesFactory > > > > Logical. > > > > So, I'll create > > > > 1. DatabaseMessageResources extends MessageResources > > 2. DatabaseMessageResourcesFactory extends MessageResourcesFactory > > That's correct. > > > > > Questions > > 1. should I create them in the org.apache.struts.util. package? > > mucking with struts seems risky > > No, do it seperately....com.company.util > > > 2. how do I tell the application to use MY > > DatabaseMessageResourcesFactory and DatabaseMessageResources > > instead of PropertyMessageResourcesFactory and > > PropertyMessageResources > > You configure Struts to use your factory by telling it in the Struts config: > http://struts.apache.org/userGuide/configuration.html#resources_config > > > > > then... I'd just create my own Struts.jar with all my nice custom code > > in it? uggghhhorammmaaaa > > No, make your own JAR. You don't want to have to deploy a custom Struts > build with each project you use your new, and cool, Struts extension with. > > > > > also, that begs several questions... > > > > 1. where am I most logically making my DB connection? in my app now, > > it happens AFTER the message reources are loaded. > > You make/manage the connection either: > - as part the call to your factory class > or > - as part of the call to your getMessage(Locale locale, String key) method. > or > - (I suppose this is possible) - do it as a Struts Plugin > > > > > oh the pain... > > > > Good luck with it! > > -- > James Mitchell > Software Engineer / Open Source Evangelist > Consulting / Mentoring / Freelance > EdgeTech, Inc. > 678.910.8017 > AIM: jmitchtx > Yahoo: jmitchtx > MSN: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]