Hello Everybody,


I have to read a properties file inside my EJB's method(I know the about
EJB specs. restriction).

As far as I know, to read a properties file in Orion we can specify the
name of properties file with -p switch at orion server starting, or copy
the properties file in <ORION_HOME>\lib directory(this directory is
included in classpath setting through the manifest file).

    This solution works for me only if i read the properties file using
getResource method of java.lang.Classloader for getting the
URL of the resource, but if i use getSystemResource it fails.

1) So what's the difference in between getResource and getSystemResource
method of java.lang.Classloader?? I read the java docs for these methods
but it is still not very clear to me.


Secondly, But In our application we don't want anything like above
solution, we wish to include the Properties file in system classpath,
and then our EJB should be able to read the properties file.

2) Is this is the right way ??   I tried but it was unsuccessful. May be
i am missing something. I couldn't figure out why getSystemResource
method is failing in this scenario, where system Classpath contains the
conf file.


any clue??


Thanks
Naresh








Reply via email to