Hi Peter, I think the locking mechanize for file write operations are cross processes and threads regardless which operating system, or at least, in MS based operating system. Correct me if I'm wrong. By default, simultaneous file write operations are not allowed.
For practical point of view, parsing xml in the business/enterprise tier is common on the account of the robustness of the xml file machinizme for use as rule engine or data transformation. Do you have any good reasons on avoiding using xml as rule engine? Or is there other more elagant design come to you mind? Please share. Thanks --- "Peter J. Braswell" <[EMAIL PROTECTED]> wrote: > Hey! > > The only advice I can offer is just simply be > careful. The real problem > with a bean doing file i/o is the fact that there > can be many, many > instances of your bean running within the EJB > container. So questions to > ask: are you doing primily read only? If yes, > perhaps you could implement > the file read part (xml parsing) in some sort of > singleton. If you are > doing read/write, things might get a bit more > complicated... Just be smart > and be aware of the "big picture"... > > Good luck! If you have any more specific questions, > please don't hesitate > to email... > > cheers, > peter > > -----Original Message----- > From: A mailing list for Enterprise JavaBeans > development > [mailto:[EMAIL PROTECTED]]On Behalf Of PiFen > Ellwood > Sent: Monday, October 15, 2001 2:55 PM > To: [EMAIL PROTECTED] > Subject: Re: file io restriction question > > > Hi Peter, > > I use xml file as a rule engine, with a helper class > implemented as xml wrapper. My session bean call > this > xml wrapper class to check the business rules. > My session bean doesn't do direct file io, but > helper > class does. As with my previous email, file io > restriction to me is the contract between ejb > container and ejbs. > > any advise? > > --- "Peter J. Braswell" <[EMAIL PROTECTED]> > wrote: > > PiFen, > > Most containers don't explicitly prohibit file > i/o. > > In other words don't > > expect to see an exception of any sort should you > > happen to open a file to > > read or write. Generally, this no-file-io mandate > > is more a guideline to > > EJB developers rather than a hard specification to > > container implementators. > > > > That being said, be cautious the way you use file > io > > in EJB's. It may > > ultimately be unportable or just plain bad design > > depending on how it is > > utilized... > > > > cheers, > > peter > > > > -----Original Message----- > > From: A mailing list for Enterprise JavaBeans > > development > > [mailto:[EMAIL PROTECTED]]On Behalf Of > PiFen > > Ellwood > > Sent: Monday, October 15, 2001 9:14 AM > > To: [EMAIL PROTECTED] > > Subject: file io restriction question > > > > > > Hi, > > > > I still don't quite understand how is the file io > > restriction works. If I use JDOM to parse an xml > > file, > > it's doing file io anyway. So how's the > restriction > > works? > > > > Thanks for any advices. > > > > > > > > ===== > > PiFen Ellwood > > > > __________________________________________________ > > Do You Yahoo!? > > Make a great connection at Yahoo! Personals. > > http://personals.yahoo.com > > > > > =========================================================================== > > 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". > > > > > > > ===== > PiFen Ellwood > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > > =========================================================================== > 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". > > ===== PiFen Ellwood __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com =========================================================================== 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".
