Does any body know what it exactly means to have <res-sharing-scope> as Shareable? Does it mean it is shareable across the J2EE application and other beans in the application can access the resouce without defining?
The Bean Provider can control the shareability of the connections acquired from the resource manager connection factory. By default, connections to a resource manager are shareable across other enterprise beans in the application that use the same resource in the same transaction context. The Bean Provider can specify that connections obtained from a resource manager connection factory reference are not shareable by specifying the value of the "res-sharing-scope" deployment descriptor element to be "Unshareable". The sharing the connections to a resource manager allows the container to optimize the use of connections and enables the container's use of local transactions optimizations.
It means that other beans in the same app, using the same resource, in the same transaction can use the same connection.
Does any body know what it exactly means to have <res-sharing-scope> as Shareable?
If a bean sepcifies the res-sharing-scope element as "Shareable", this means that the bean is allowing other beans in the same application to use the connection it obtained through the resource manager connection factory. This does not mean that the other enterprise beans in the same application can have access to the shared connection anytime they want. They can access the shared connection only when they are using the same resource in the same transaction context.
Does it mean it is shareable across the J2EE application and other beans in the application can access the resouce without defining?
Yes, it does mean the connection is shareable accross the application but other beans in that application cannot access the shared connection without defining the resource-ref element.
Suman do you have answer for the above question?
Sorry for the delayed response. I was busy for last copule of days. Anyway, let me know if I have explained it right.