What is the EJB annotation equivalent for res-sharing-scope xml element?

1 comment

comara asked:

We used element in ejb-jar.xml to specify the shareable or unshareable. How can we do this by using annotations in EJB 3.0?
(without using the a deployment descriptor)

No related posts.

{ 1 comment }

Nahi verena verani

You have to use the “shareable” element of the @Resource annotation for this, as following:

@Resource(name=”", type=”" shareable=”")


@Resource(name=”jdbc/DataSet” type=”javax.sql.DataSource” shareable=”Unshareable”)
public class YourClassBean implements …………..

Next post: