• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejb-jar.xml (Help!)

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between the <resource-ref> and <resource-env-ref> tags?
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello..
<resource-refs> may be any resource being used/referenced by the bean..like a connection pool or a topicconnection/queueconnection factory
on the other hand..
<resource env ref> can be any string or data format that u look up via jndi context ...like a string u place in the java:comp/env/ namespace
this occurs when u would like to create a well known string with a given value and then look up that value from ur bean....instaed of declaring it inside ur code, u look it up from JNDI...
hope it helps..
:roll:
 
Ravi Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.

How is the <resource-env-ref> different from the <env-entry> then?
 
Aboo Bolaky
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry what i meant for <resource -env entry> is actually meant for <env entry>..
the real defn for resource env refs is that they provide a way of accessing, via JNDI lookups, administered objects associated with a resource. For example, an application may need to access a JMS Destination object. The <resource-env-ref> element, defined in the standard deployment descriptors lets applications declare the resource requirements.

The main difference between <resource-env-ref> and <resource-ref> element is the absence of specific resource authentication requirement; both these elements have to be backed up by a resource factory descriptor.

resource-env-ref>
<description> My Topic </description>
<res-env-ref-name> jms/MyTopic </res-ref-name>
<res-env-ref-type> javax.jms.Topic </res-type>
</resource-env-ref>

in order these resource-env-ref variables to work, the administrators will have to make target resource factories available at run-time.
 
Ravi Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.

What do you mean by an administered object?

Does this mean the resource made available through <resource-ref> is managed by the J2EE container, but the resource made available through <resource-env-ref> is managed by some other server?
 
Aboo Bolaky
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
administered objects with reference to JMS are ConnectionFactories and destinations. these are looked up via JNDI...and are both managed by the J2EE server...
 
Aboo Bolaky
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for more information about connection factories and destinations visit Sun's JMS tutorial

connection factories and destinations are created with the J2EE admin console and are best managed adminitratively rather than programmatically..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic