Difference between <resource-ref> and <resource-env-ref>?

Discussions

EJB programming & troubleshooting: Difference between <resource-ref> and <resource-env-ref>?

  1. Hello,

    Can anyone tell me what the difference is between <resource-ref> and <resource-env-ref>? (in ejb-jar.xml)

    Thanks in advance,

    Julien Martin.

    Threaded Messages (5)

  2. resource-ref vs. resoruce-env-ref[ Go to top ]

    As far as I understand the distinction is as follows: A resource-ref is a reference to an object that is being managed by the J2EE container, such as a datasource. A resource-env-ref is a reference to an object that is managed by a separate server like a JMS provider or a JavaMail server. Hope this helps.

    - Ray
  3. resource-ref vs. resoruce-env-ref[ Go to top ]

    This is a direct extract from the DTD used

    The resource-ref element contains a declaration of a web application's
    reference to an external resource.

    The resource-env-ref element contains a declaration of a web application's
    reference to an administered object associated with a resource
    in the web application's environment.

    resource-ref => EXTERNAL RESOURCE

    resource-env-ref =>RESOURCE IN THE WEB APPS ENVIRONMENT
  4. resource-ref vs. resoruce-env-ref[ Go to top ]

    I read that DTD and the numerous help on that subject (which often was the same DTD pasted) - and must say, I understand nothing, what DOES that mean, in order to start use it, without spending several days in different forums like Sharlock Holmes, searchin understandable info bit by bit...

    I begin to be nervous about that java technology documentation, where they spend several pages on explaining the trivial things, feeding with rich examples (that are too trivial to look at), but as soon more complcated things come, only a couple of paragraphs are written on the subject with NO examples, or a cropped example (in best case), as if the wiriter is suddenly short of time!

    So my problem is, that I ant to put some object to JNDI... I use Tomcat, servlet technology. I wanted to do that in web.xml file of my application... There are <env-entry>, <resource-ref>, <resource-env-ref>...
    Which of them should I use?
    Why, when they talk about resource-ref, they often say object factory? Is some new object constructed when i make a lookup? Or I alays get the same instance?
    What is the external resource?

    Big thanks if anybody makes clear the whole situation, big thanks!
  5. resource-ref vs. resoruce-env-ref[ Go to top ]

  6. - Resource reference, which is typically to an object factory for resources such as a JDBC DataSource, a JavaMail Session, or custom object factories configured into Tomcat 4.
  7. - Resource environment reference, a new variation of resource-ref added in Servlet 2.3 that is simpler to configure for resources that do not require authentication information.
  • Difference between and ?[ Go to top ]

    Hello,

    Can anyone tell me what the difference is between and ? (in ejb-jar.xml)

    Thanks in advance,

    Julien Martin.

     

  • - Resource reference, which is typically to an object factory for resources such as a JDBC DataSource, a JavaMail Session, or custom object factories configured into Tomcat 4.
  • - Resource environment reference, a new variation of resource-ref added in Servlet 2.3 that is simpler to configure for resources that do not require authentication information.