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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:03:56+00:00 2026-06-03T21:03:56+00:00

An ejb-jar deployed to jboss 7 has a jdni binding java:global/foo!IFoo. Jboss management console

  • 0

An ejb-jar deployed to jboss 7 has a jdni binding “java:global/foo!IFoo”.
Jboss management console shows this binding.
The jndi port is 1099 as by default.
A client on jboss gets an object to that binding but a standalone client running on the same machine does not.

Properties properties = new Properties();  
properties.put("java.naming.factory.initial",
               "org.jboss.as.naming.InitialContextFactory");    
properties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url","jnp://localhost:1099");
Context ctx = new InitialContext(properties);
NamingEnumeration<NameClassPair> list = ctx.list("");
while (list.hasMore()) {
    System.out.println(list.next().getName());
}

produces no results. Also the lookup to the name above fails.
Where is the problem ?

  • 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-03T21:03:57+00:00Added an answer on June 3, 2026 at 9:03 pm

    It seems remote JNDI lookup support was implemented only on JBoss AS 7.1.0.Final (AS7-1338).

    The JNDI properties to perform remote lookups has also changed. Could you try to instantiate the InitialContext with these JNDI properties?

    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
    properties.put(Context.PROVIDER_URL, "remote://localhost:4447");
    properties.put(Context.SECURITY_PRINCIPAL, "user");
    properties.put(Context.SECURITY_CREDENTIALS, "password");
    

    The remote access to the JNDI tree is secured, so you need to provide a user and a password (add an Application User via add-user.sh/add-user.bat script).

    I did this on my own local server, but the NamingEnumeration returned by InitialContext.list() is still empty, even though the lookup below works fine. I posted an answer on JBoss forum, but no luck so far.

    // This lookup works fine
    System.out.println(ctx.lookup("jms/RemoteConnectionFactory").getClass().getName());
    // ... but this list doesn't (empty enumeration)
    NamingEnumeration<NameClassPair> list = ctx.list("");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've copied and pasted the example ejb-jar.xml and jboss.xml file from http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch6.chapt.html#ch6.mdbejbjar.ex and I'm
Please forgive my pitiful knowledge of Java EJBs but, when an EJB is deployed
I'm trying to implement an ejb-call by using JNDI-naming. Setup: JBoss-6.1.0.Final ear-deploy: gwt.war ejb.jar
I have a ConfigParameter SLSB that reads configuration values from the ejb-jar.xml file. This
can you specify on JBoss server logging level for single EJB Jar? I've got
I have ejb 2.1 deployed in JBOSS 5 server . The jndi name is
I've got a session bean, defined in an ejb-jar.xml and jboss.xml. It's defined with
I am new to EJB and I am going thro Enterprise Java Beans 3.1
In my EJB project deployed on WAS 6.1, when I try to call EntityManamger.merge(obj),
I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA

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.