J�r�me Beau wrote:

> When migrating from some application server to another,
> the <resource-ref> tag seem to be mandatory or not
> for CMP in the ejb-jar descriptor.
> For example, J2EE nor Weblogic does not require it,
> while the Inprise Application Server does.
>
> The specification states that the <resource-ref> element is here to
> let you know what are the EJB resource dependencies. This is tyically
> stateless bean accessing a datasource, but it sounds to me that
> such dependency information should be mandatory for CMP too.
>
> Does anyone know the truth about this ?
>

>From my point of view, the <resource-ref> allows to make your bean
source code independent of your execution/deployment environment
(your EJB platform, but also from your resource, e.g. your database, and the
way you specify it in your EJB platform). This means that when you
deploy your bean on a different platform, or on the same platform but
with a different resource, you only have to modify the deployment
descriptor, and more precisely the EJB platform specific one, which
"maps" the <resource-ref> to the actual resource, you do not have
to modify the code of your bean.
Since with CMP you do not use any resource in the bean code
(for the bean's persistence purpose), you do not need to use
a <resource-ref>; you will only need to use <resource-ref> elements
if you are using resources in your bean for other reasons than CMP
support (e.g. a JMS resource for sending messages).

Best Regards,

Francois

--
==================================================================
Francois EXERTIER         Evidian (Groupe Bull)
     1, rue de Provence,  BP 208,  38432 Echirolles cedex, FRANCE
     mailto:[EMAIL PROTECTED]
     http://www.evidian.com/jonas   http://www.objectweb.org/jonas
==================================================================

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to