0 Replies Latest reply on Dec 12, 2006 4:53 PM by Todd Nash

    Accessing a java.net.url resource from JNDI

    Todd Nash Newbie

      I am trying to deploy an existing application that runs on Websphere currently, to JBoss 4.0.4.ga. I am having a problem getting a url resource (java.net.url) to show up in JNDI so it can be accessed from an ejb.

      The purpose is to access a properties file from an ejb. The JNDI allows us to define the location of the properties file at deployment time.

      Any ideas on why the url resource reference doesn't show up? It doesn't show up in the JNDI tree and I get a namenotfound exception when I try to locate it in JNDI

      Here is my jboss.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC
      "-//JBoss//DTD JBOSS 3.0//EN"

      . . .

      <ejb-name>ReportDaemonSB</ejb-name> <local-jndi-name>ejb/ReportDaemonSBLocalHome</local-jndi-name>


      <res-name>url/globalProperties</res-name> <res-url>file:////c:/projects/testproject/global.properties</res-url>