• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassLoader with EJB

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using an XML and XSLT file to map/transform METADATA within an EJB. What I want to do is prevent the overkill of creating a web/database application just so I can access and read in my xml and xslt files into the EJB. My initial thought is to store the information under the META-INF directory for the ejb and access it some how.
I have tried the following:
this.getClass().getClassLoader().getResource("file:///META-INF/xml/NewTOInfo.xml");
This class is a utility class called by the MDB. This does not work and it returns a null;
Can someone with a little more experience than I explain how I can go about doing this?
Thanks in advance.....
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove the file protocol.
[ September 24, 2003: Message edited by: Pradeep Bhat ]
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you VERY much! That got me started! Administrator, you may close this topic!
Russ
[ September 24, 2003: Message edited by: Russ Ray ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic