NOt to seem flippant, but the answer to that kind of question is, "it depends." If you have a 2.0 container and can send messages, I'd prefer thatapproach because it's more flexible. If you don't have a 2.0 container, or you need to I/O on massvie objects (like one customer I've worked with), then I recommend having an object outside the container do the actual I/O for you, wiht your EJB just serving as a controller.
Ken >Thank you for your feedback. The alternatives offered are informative. Can >you comment of which alternative is best between the second and third that >you mentioned? > >-----Original Message----- >From: Kenneth D. Litwak [mailto:[EMAIL PROTECTED]] >Sent: Monday, March 18, 2002 3:02 PM >To: [EMAIL PROTECTED]; Bullock, Dempsey >Subject: Re: Requesting/Receiving Files through a JavaBean > > > The spec says not to use any classes from java.io in your EJB, which is a >portability issue. There are a number of ways to dealwith this. One is to >ignore the spec, which I don't encourage. A second way is to have your EJB >access an object outside the container to do the work for you (EJB callss an >RMI >object that it looks up and the RMI objedct does the actual I/O work). >Another >alternative is to include the data in a message, and send it to a >Message-driven >bean. Another alternatige is to find a vendor that has a workaround for the > >limitatoin ofthe spec. I don't know of any but I'm not upon proprieatry >features. Others will know better about that aspect. > > HTH > > Ken Litwak >> >>I am very new to EJB technology. In the near future, I will be developing >a >>mult-user file management program that uses a Java Client Application that >>accesses EJB from a remote server. Is it possible to have a server forward >>a document, such as a TIFF, to a Java Application? And, if so, how can >this >>be done? Thanks in advance! >> >>=========================================================================== >>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".
