XML files that are static (configuration data) can be stored in the ear
and loaded using:

InputStream xmlStream = Thread.currentThread().getContextClassLoader
().getResourceAsStream();

In case you need to read xml files that are not stored in the ear, I
don't thinkt there are any possibilities to do so from within an EJB.

The need to be read by a servlet, or delivered through JMS into a
message-driven bean. Maybe an URL connetcion could be an option, since
URLs can be looked up through java:comp/env.

/Johan

citerar John Macdonald <[EMAIL PROTECTED]>:

> Hi,
>    I need access to some xml files from a session ejb but have been
told
> that this breaks design guidelines, how can I do this, is there no
> equivalent to web app contexts where you can pick up files relative
to the
> context. Do I need to store the xml files in a dbase and go through an
> Entity EJB or write a DataSource implementation.
>
> Regards
> JmacD
>
>
========================================================================
===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
> of the message "signoff EJB-INTEREST".  For general help, send email
to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to