jaikiran pai [
http://community.jboss.org/people/jaikiran] created the discussion
"Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1"
To view the discussion, visit:
http://community.jboss.org/message/572486#572486
--------------------------------------------------------------
aravind kopparthi wrote:
Jai: 1) Using java.io.* in EJBs isn't recommended.
is this true for Ejb 3.1 as well?( how about Singleton EJB reading file and transforming
and then calling SLSBS for persitence is this recommended?)
i was thinking of using SLSB to read file content and tranform into Entities for
persirence. what is the recommend if Ejbs can not read files?
It applies for EJB3.1
as well. Check section 21.2.2 "Programming Restrictions" in EJB3.1 spec for the
entire set of restrictions.
As for java.io.* restriction, here's a quote from that section.
An enterprise bean must not use the java.io package to attempt to
access files and directories in the file system.
The file system APIs are not well-suited for business components to access data. Business
components should use a resource manager API, such as JDBC, to store data.
You don't have to do the file reading part in the EJBs. Just let the EJBs persist your
entities.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/572486#572486]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]