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 7783175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:45:44+00:00 2026-06-01T19:45:44+00:00

I am working on an EJB project with OpenEJB (TomEE++) container. There is a

  • 0

I am working on an EJB project with OpenEJB (TomEE++) container. There is a session bean whose JNDI lookup name needs to be controlled in code.

@Stateless(mappedName="SlideService", name="SlideService")
public class SlideService {

    public Map<Category, List<SlideShow>> fetchSlideShowsBycategory() {
        // TODO Auto-generated method stub
        return null;
    }

    public SlideShow fetchSlideShow(long id) {
        // TODO Auto-generated method stub
        return null;
    }

    public List<SlideShow> fetchSlideShowsByTitle(String title) {
        // TODO Auto-generated method stub
        return null;
    }
}

My problem is that, the name to which this bean gets bound is ‘global/slides/SlideService’

OpenEJB seems to be using the application name, even though I have not specifically mentioned it.

Would this compromise portability ? Is it possible some other container may not use the application name ?

Is using name and mappedName attributes the right way to control the name of a stateless bean, or are there other(better) ways ?

  • 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-01T19:45:46+00:00Added an answer on June 1, 2026 at 7:45 pm

    Your problem is resolved in the EJB 3.1 specifications, any Java EE 6 certified container will use multiple JNDI names for your beans.
    In your code you can control the last part of the name, here a document about Portable Global JNDI Names

    Here you can find a simple guide to the 3 standard scopes of JNDI Portable JNDI names in EJB 3.1

    So yes, your code will be portable across any Java EE 6 certified container

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

Sidebar

Related Questions

I am working on an EJB 3 project using OpenEJB (TomEE++). I have a
I am using Tomcat & OpenEJB 3.1.4.Working with Message Driven Bean(EJB 2.0 - MDB)
I'm working on a web project using EJB 3.0, and whenever EclipseLink tries to
I am currently working on a Java EJB project being deployed to Weblogic 10.3.3.
I've been working on a Java EE 6 project (EJB 3.1, JSF 2, JPA
I am currently working on a project with multiple ejb and one ejb-jar.xml. I
In the project I'm working on, we are using OpenEJB as a framework to
I am working on an enterprise project that has an EJB module and a
I'm working on a project which includes persistence library (JPA 1.2), EJB 3 and
I have tried for hours to get my project working but the EJB part

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.