WebSphere Application Server - Re: how to parse xml-file in an ejb?

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > March 2004 > Re: how to parse xml-file in an ejb?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: how to parse xml-file in an ejb?
rsoika

2004-03-28, 4:33 am

in the meantime I found out how to depoly the xml an read it as an input stream.
you can put the xml file into the META-INF directory form your ejb-jar (e.g. /META-INF/myxmlfiles/myfile.xml)
then you can open an input stream to this file inside the ejbCreate Methode with code like this:

java.io.InputStream stream = ( this).getClass().getClassLoader().getResourceAsStream("/META-INF/myxmlfiles/myfile.xml");
try {
System.out.println(stream.available()+ " bytes available");
} catch (IOException io) {
// not found
}

...


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com