Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

difference between two xml tags

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

Can somebody tell me what's the difference between following two tags in ejb-jar.xml :-

<resource-ref>
<res-ref-name> ..</res-ref-name>
</resource-ref>

and

<resource-env-ref->
<resource-env-ref-name>..</resource-env-ref-name>
</resource-env-ref>

Not able to understand which tag to use when..and what's the difference.

Regards,

James
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hiya-

all of the following inferred/quoted from HFEJB page#610 and page#616

the <resource-ref> tag is used to get a resource manager connection factory reference, through which you get what you really want. for example

in the above you;re getting a reference to javax.sql.DataSource that you can use to get a connection.

the resource environment reference <resource-env-ref> tag is used to get a reference to something called an administered object like javax.jms.Queue or javax.jms.Topic. The main difference here is that the resource environment reference is to a thing you want, the destination.
for example
[code]
<resource-env-ref>
<resource-env-ref-name>jms/NewCustomerQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-name>
</resource-env-ref>
[code]

'.... the administered object is the destination, whereas a resource manager connection factory reference is just the first step in getting what you really want..'

HTH,

=fazal.
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.

As of now what all i studied <resource-ref> and <resource-env-ref> are responsibility of bean provider

But <resource-env-ref> is used for administered object,then insetad of bean provider(BP)..deployer(D) or Application Assembler(AA) should define this instead of BP.But if AA or D will define this,then how BP will come to know which name to use...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic