|
From: Luke T. <luk...@fr...> - 2003-05-19 15:27:00
|
Isabelle Muszynski wrote: > Hi Thomas, > > I got Ken's demo working in Jboss using your changes. However, there > is one thing I don't understand. In jboss-web, the JNDI name is > java:/DefauldDS. So why is the datasource lookup done using > jdbc/SpringDS? The way you do it in Weblogic is that whatever JNDI > name you specify, that's waht you use for the lookup. > > Isabelle > It's a standard J2EE thing - jdbc/SpringDS is the container-independent name you use in your code to provide a layer of indirection, and you map it to an actual named container resource (in the JBoss case by supplying a jboss-web file). You can do the same in Weblogic: http://edocs.bea.com/wls/docs60/programming/web_xml.html#1017834 An explicit lookup would work too but would require code changes every time you change to use a different "physical" datasource or if you move to a different container. There's an equivalent syntax for use in EJBs, in the ejb-jar.xml file. Luke. -- Luke Taylor. Monkey Machine Ltd. PGP Key ID: 0x57E9523C http://www.monkeymachine.ltd.uk |