It's not a secret anymore!*
The moose likes EJB and other Java EE Technologies and the fly likes Is this possible from an EAR? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Is this possible from an EAR?" Watch "Is this possible from an EAR?" New topic
Author

Is this possible from an EAR?

A Harry
Ranch Hand

Joined: Jan 23, 2002
Posts: 124
I have an EAR containing a WAR & several EJBs (running on Weblogic 9.2, not sure if that makes any difference though)

From either an EJB or WAR I need to be able to create and read external files. Is this possible?

So, if I created a file from the EJB (with no path) say "abc.txt", where will it be created and how would I read that from the WAR - and vice versa?

thanks in advance
Prabaharan Gopalan
Ranch Hand

Joined: Oct 16, 2009
Posts: 66

File IO in EJBs? Could you take a look at this for: Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors? and also this: http://stackoverflow.com/questions/1357667/how-to-access-the-file-system-from-an-ejb-3.

Let us know what you think.


Googling doesn't make you a genius. But not Googling makes you dumber.
A Harry
Ranch Hand

Joined: Jan 23, 2002
Posts: 124
many thanks for that, working my way through it now - I can if I wish do all file I/O from the WAR, is that possible/safe?
 
Don't get me started about those stupid light bulbs.
 
subject: Is this possible from an EAR?