• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Programming restriction - Usage of java.io package

 
Prajakta Acharya
Ranch Hand
Posts: 138
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB specs mention that an EJB must not use java.io package since these APIs are not well suited for business components to access data.
Can anyone explain this? Could not make out the reason/motivation behind this restriction.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prajakta Acharya wrote:EJB specs mention that an EJB must not use java.io package since these APIs are not well suited for business components to access data.
Can anyone explain this? Could not make out the reason/motivation behind this restriction.



the reason for this is that EJB's are meant for developing enterprise, transaction oriented applications. such applications should and generally maintain their data in resource managers like rdbms or other systems etc. using io package to access data from files is prohibited by the ejb restrictions. this could be one of the reason.
 
Prajakta Acharya
Ranch Hand
Posts: 138
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that does make sense. Thank you for your response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic