**DONOTDELETE**
(Unregistered)
08/25/03 02:52 AM
Loading resources in EJB application

Excellent article!
I found it very useful as I am currently looking into different options of loading text files in EJB application (EJB container has a restriction on IO operations, so java.io package should not be used). Loading through the URLs seems the way to go

Is there any way of moving resources from one location to another one without using java.io (basically, I need to archive the files after they have been read by EJB application).

Thanks Vlad for writing good articles. I certainly learn new stuff every time I read them.



vlad_roubtsov
(member)
08/25/03 03:56 PM
Re: Loading resources in EJB application

Thanks for the feedback. Yes, reading static text content from an EJB should be easy if the content is packaged as a classloader resource, whether or not it is further disguised behind a URL.

Regarding storing content from an EJB, things are kind of grim. I think if you adhere to the EJB spec in a very strict manner, your only option is JDBC(that is, store everything in a database).


Catalin
(stranger)
08/26/03 10:22 AM
Re: Loading resources in EJB application

Hi,

Archiving files and storing them to disk is a tricky job to do for an EJB, inside an EJB container.
Just think about clustering, load-balancing, etc.

The way I would do this is writing a stand-alone application for archiving files, and access it from the EJB using RMI, for example.
This way it would work even in EJB container clusters (fault tolerance of the stand-alone application would be an issue, but this is another story).



Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.