Why not have a environment parameter that contains the directory from which
to load the file?  That way you could put the file whereever it suits,
without having to put it in JBoss's classpath.

cheers
dim

----- Original Message -----
From: "Rodrigo Chandía" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 19, 2002 8:33 AM
Subject: Re: [JBoss-user] Rading a file from Ejb


> Ok, It is working.
>
> I tried once again and It loaded the file. (?!)
>
> Anyway, Is this a good way (a portable way, that is) to load a file from
> inside an EJB?
>
> Regards,
>
> Rodrigo Chandia
>
> El Viernes 18 de Octubre del 2002 06:00 PM, Rodrigo Chandía escribió:
> > Deare Jboss-users:
> >
> > In my app I need to read a file from inside a Session Bean. Initially I
> > thought the best way would be to simpli stick the file into:
> >
> > $JBOSS_HOME/server/default/conf
> >
> > and then use
> >
> >         InputStream is = getClass().getClassLoader()
> >             .getResourceAsStream(FILE_LICENSE_NAME);
> >
> > but it does not seem to work because I keep getting null (I guess I am
not
> > getting the same class loader log4j gets :P )
> >
> > So my question is, is it possible to do it this way?
> > What is the recommended (portalbe) way to do this from an EJB?
> >
> > Regards,
> >
> > Rodrigo Chandia
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:
> > Access Your PC Securely with GoToMyPC. Try Free Now
> > https://www.gotomypc.com/s/OSND/DD
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> Access Your PC Securely with GoToMyPC. Try Free Now
> https://www.gotomypc.com/s/OSND/DD
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to