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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:34:25+00:00 2026-06-15T03:34:25+00:00

I have working JBoss AS 7 (7.1.1 final) server on localhost with some queue.

  • 0

I have working JBoss AS 7 (7.1.1 final) server on localhost with some queue.

And I want to connect to that queue in a desktop application.

So I wrote something like this:

Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
InitialContext initialContext = new InitialContext(env);
ConnectionFactory connectionFactory = (ConnectionFactory) 
initialContext.lookup("RemoteConnectionFactory"); // <- there is it fail

But it results in this exception:

Exception in thread “main” javax.naming.CommunicationException: Could
not obtain connection to any of these urls: remote://localhost:4447
and discovery failed with error: javax.naming.CommunicationException:
Receive timed out [Root exception is java.net.SocketTimeoutException:
Receive timed out] [Root exception is
javax.naming.CommunicationException: Failed to connect to server
remote:1099 [Root exception is
javax.naming.ServiceUnavailableException: Failed to connect to server
remote:1099 [Root exception is java.net.UnknownHostException:
remote]]]

Of course, I have jbosscall-client.jar in class path.

  • 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-15T03:34:27+00:00Added an answer on June 15, 2026 at 3:34 am
    Properties properties = new 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, "hlib");
    properties.put(Context.SECURITY_CREDENTIALS, "password1");
    InitialContext context = new InitialContext(properties);
    ConnectionFactory factory = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
    

    This code workl well if ‘application user’ for jboss have been added.

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

Sidebar

Related Questions

I am working on Jboss 4.05 , I have an xsd file that was
I have an application running in JBoss AS6. Authentication is working using the FORM
I am working on deploying a J2ee application that I have previously been deploying
I have a working Spring MVC application(doing everything I wanted when deployed to jboss)
I'm working with JSF 2.0, JBoss 7.1.1 Final and I have following problem with
I have a JSF/ICEFaces application that was working fine but all of the sudden
I am working on WebSphere application server recently. And now i have to use
I have some troubles setting up my jboss 4.2.3 GA. I want a second
At the company i am working on we have an application build on Jboss/Apache/Hibernate
Following is my jdbcAdapter and I am working with jboss server, I have given

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.