I should be ok to load files in the EJB Jar through the class loader, shouldn't it? Otherwise it would be hard to do localization and other tasks that are supported by property-files and other representations of localized resources? My interpretation of the file io restriction stated in the spec, is that you shouldn't do file io by referencing the file system. This has been on the agenda in many threads....
/Johan -----Original Message----- From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Rajan Sent: den 28 september 2001 06:47 To: [EMAIL PROTECTED] Subject: Re: Environment Variables I have been doing the same thing using startup classes. Load the properties file in startup class and keep in memory. As almost every server supports startup classes so there will be no issues while porting. -----Original Message----- From: John Harby [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 10:04 PM To: [EMAIL PROTECTED] Subject: Re: Environment Variables The danger of doing this sort of thing though is that although your container may allow you to do it today, it may (and probably should) not allow you to do it tommorow. Thus, you risk having to rewrite your code when your container vendor puts out a new release. >From: "Peter J. Braswell" <[EMAIL PROTECTED]> >Reply-To: "Peter J. Braswell" <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Environment Variables >Date: Thu, 27 Sep 2001 10:39:52 -0400 > >Steve, >I usually use a property file to set runtime parameters and the >loadAsResource method call to read the file. People will yell as soon as >they read this post and point to not doing file i/o in ejbs as per the >spec, >but I've done it on numerous containers with no problem. I usually use a >property factory to ensure the file is read and properties initialized only >once... It works well, clean, simple, etc.... > >If you want code, let me know. I'll send it to you off line. > >cheers, >peter > >-----Original Message----- >From: A mailing list for Enterprise JavaBeans development >[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Brown >Sent: Thursday, September 27, 2001 8:10 AM >To: [EMAIL PROTECTED] >Subject: Environment Variables > > >Hi, > >I would like to set an environment variable for my EJB container that all >EJBs can access. I can see how you set <env-entry>'s for individual beans, >but how do you set an environment variable that ALL server side components >within the EJB container can read? We are using Weblogic 6.0. > >Thanks, > >Steve. > >=========================================================================== >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". > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp =========================================================================== 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". =========================================================================== 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".
