2 Replies Latest reply on Nov 22, 2004 1:23 PM by John Craig

    Info on old setup? JBoss-2.4.7_Jetty-4.0.4

    John Craig Newbie

      Hi Folks,

      I'm trying to do some add-on work for a client who's got the setup shown above and a dedicated app that I can't change is the main user of the JBoss infrastructure so upgrading is out of the question. The VERSION file in the JBoss directory of the install starts with the version in the subject: JBoss-2.4.7_Jetty-4.0.4

      I just need to do some really basic stuff (like get a connection via a DataSource) and I'm familiar with how this works under Tomcat, but I can't find info to tell me how to set up the config files so I can find the DataSource from the InitialContext.... This shouldn't be hard, but given the age of the JBoss version in question and the fact that it's not using Tomcat as the servlet container, I'm stumped. I can't even figure out where it's getting the values that are visible in the name space. So, my attempts to do something which seems pretty trivial only get so far.

      Context ctx = new InitialContext();
      Context envCtx = (Context) ctx.lookup("java:comp/env");

      That works, but even though I think I have my data source defined properly, it reports that "jdbc" is not mounted when I try this:

      DataSource ds = (DataSource) envCtx.lookup("jdbc/ds_anyOldDb");

      Now, I know that the app that already is working on the site is using that DataSource.... I just don't know how to reference it (let alone add my own).

      So, do I need another name rather than "jdbc" or have I got my DataSource in the wrong config file, or what?

      Any old-time JBossers out there would could point me toward some docs or some examples or anything of the like?

      At this point, it'd be worth it to me to pay for help (desperate measures!)....

      Thanks for any suggestions!

      John