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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:27:35+00:00 2026-05-24T20:27:35+00:00

As a postlude to Consuming an EJB question. I have created an ejb on

  • 0

As a postlude to Consuming an EJB question. I have created an ejb on JBOSS AS 6.0 and am consuming it in a java client using the following code.

private ServiceLocator(String host, String principal, String creadentials) throws NamingException {
        Properties env = new Properties();
        env.put(Context.INITIAL_CONTEXT_FACTORY,
                "org.jnp.interfaces.NamingContextFactory");
        env.put(Context.URL_PKG_PREFIXES,
                "org.jboss.naming:org.jnp.interfaces");
        env.put(Context.PROVIDER_URL, "jnp://" + host);
        System.out.println("jnp://" + host);
        env.put(Context.SECURITY_PRINCIPAL, principal);
        env.put(Context.SECURITY_CREDENTIALS, creadentials);
        env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                "org.jboss.security.jndi.JndiLoginInitialContextFactory");
        InitialContext ct = new InitialContext(env);
        cachedStructSpeechRemote = (StructSpeechRemote) ct.lookup("eCWServicesEAR/StructSpeechService/remote-com.ecw.ejb.StructSpeechRemote");
    }

The consumer uses JBOSS-all-client.jar present in client folder of JBoss AS6.0. I am not able to use the same code with JDK1.4 because the jar is not JDK 1.4 compatible. I have also tried to get the jar file form the older distribution of JBoss AS but than it does not work with the newer distribution of the server:(
Is there a way to write an EJB consumer which is JDK version independent (May be also vendor independent!) and can work in all JDKs ranging from 1.4 to 6?

  • 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-05-24T20:27:38+00:00Added an answer on May 24, 2026 at 8:27 pm

    In your case I would expose the EJB on JBoss as a web service to be able to call it from any jvm. Otherwise you can try to find more info here: https://issues.jboss.org/browse/EJBTHREE-1029?focusedCommentId=12371962

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

Sidebar

Related Questions

Can I do ternary in the postlude(s) the same way that I do them
Since functions and actions are first-class, is it possible for an entity variable to
I'm collaborating on a large Kynetx app with another developer. To make it easier

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.