Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958422

Pages: 1
Anonymous
Unregistered




Loading resources in EJB application
      #1203 - 08/25/03 02:52 AM

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.



Post Extras: Print Post   Remind Me!   Notify Moderator  
vlad_roubtsov
member


Reged: 06/21/03
Posts: 169
Re: Loading resources in EJB application [Re: Anonymous]
      #1216 - 08/25/03 03:56 PM

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).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Catalin
stranger


Reged: 08/18/03
Posts: 4
Re: Loading resources in EJB application [Re: Anonymous]
      #1236 - 08/26/03 10:22 AM

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).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 10205

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5