[jboss-user] [EJB3] - Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1

jaikiran pai do-not-reply at jboss.com
Tue Nov 23 10:27:45 EST 2010

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

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101123/8a631fdc/attachment.html 

More information about the jboss-user mailing list