This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing Files between Web Container and EJB Container  RSS feed

 
Rabee' Nawash
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Im trying to pass a file between the Web container to the EJB container, does any one knows how it can be done since EJB doesn't have access to the file system?
[ February 04, 2006: Message edited by: Rabee' Nawash ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you create an object from the file and pass that object as an arg in an EJB method call?
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rabee' Nawash:
since EJB doesn't have access to the file system


More accurately, you aren't supposed to assume that enterprise beans have *direct* access to the filesystem. You could use Sun's fscontext to get JNDI bindings for filesystem access. Still not convinced I'd want to do the file I/O within a bean, but nothing stopping you from creating a simple JCA component to handle the files to protect the beans from problems caused by blocking I/O.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!