Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:51:07+00:00 2026-06-10T22:51:07+00:00

I read this great article about best-practice for EJB-JNDI mapping : http://www.ibm.com/developerworks/websphere/library/bestpractices/increase_app_portability.html The notion

  • 0

I read this great article about best-practice for EJB-JNDI mapping :

http://www.ibm.com/developerworks/websphere/library/bestpractices/increase_app_portability.html

The notion of ejb-link isn’t clear for me.

For example, let’s say we have an ejb-jar.xml containing this :

<ejb-ref>
   <ejb-ref-name>ejb/Bean2Home</ejb-ref-name>
   <ejb-ref-type>Entity</ejb-ref-type>
   <home>com.ibm.wsc.Bean2Home</home>
   <remote>com.ibm.wsc.Bean2</remote>
   <ejb-link>Bean2</ejb-link>
</ejb-ref>

Thus, it is precised that the targeted EJB component is Bean2 and this simple notation means that Bean2 must be find on this J2EE application package or .ear file.

So, if ejb-link markup is enough determinant to indicate the right way to link to the good EJB component, what is the need for assembler to create a JNDI name for this ejb-ref ?

Is it really useful?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:51:09+00:00Added an answer on June 10, 2026 at 10:51 pm

    Here are some scenarios that hopefully clarify why <ejb-link/> (or @EJB(beanName="...")) and EJB ref bindings are both useful and complementary:

    1. An application can itself be logically broken up into components, and the developer chooses to use EJBs to implement those components. In this case, the application developer knows the target EJB component that the client wants to use. If there are multiple components implementing the same interface, then some disambiguation is required, and <ejb-link/> can be used.

    2. An application has a dependency on an external service. In this case, the application knows it has a dependency on an external service, so <ejb-link/> cannot be used since the service implementation does not exist in the same application.

    3. An application has a dependency on an external service, but a minimal implementation is provided in the same application. In this case, the developer might use an <ejb-link/> as in #1, but the deployer has the flexibility to override that choice as in #2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read about the great uses of /proc/<pid>/fd and specifically fdinfo in this article
(A while back I read this great post: http://aaronlongwell.com/2009/06/the-ruby-on-rails-cms-dilemma.html , discussing the Rails CMS
I read this article: http://weakreference.wordpress.com/2011/06/22/overriding-nslog-on-ios/ . The idea of the article is to add
I just read this great answer from BalusC about how to upload files with
I have read Java Concurrency in Practice and this is a great reference, but
I read this article : http://lwuit.blogspot.in/2008/06/lightweight-text-input-in-lwuit.html This article talks of autocomplete textfield embedded on
I just read this article about the Entity Framework 4 (actually version 2). Entity
I read that great post on Visual Studio 2008 annoyances, but didn't see this
I read this article on how to use keytool to generate CSRs for your
A little while ago I read a great article which described a number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.