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

  • Home
  • SEARCH
  • 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 6888539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:01:57+00:00 2026-05-27T06:01:57+00:00

I am working on Java RMI. I am having little issue with running my

  • 0

I am working on Java RMI. I am having little issue with running my rmiregistry on port 2028 as I already used that one to run my test program. I can run my program using other port but I would like to know, How we can close rmiregistry running on particular port ?

  • 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-27T06:01:58+00:00Added an answer on May 27, 2026 at 6:01 am

    If you want to do this in programming, we do something like:

    // create the registry
    Registry rmiRegistry = LocateRegistry.createRegistry(port);
    ...
    // connect to it
    JMXConnectorServer connector =
        JMXConnectorServerFactory.newJMXConnectorServer(url,
            new HashMap<String, Object>(),
            ManagementFactory.getPlatformMBeanServer());
    // do stuff with it ...
    
    // close the connection
    if (connector != null) {
        connector.stop();
    }
    // deregister the registry
    if (rmiRegistry != null) {
        UnicastRemoteObject.unexportObject(rmiRegistry, true);
    }
    

    Here’s the full code for our JMXServer class. We have problems creating 2 of these and completely unregistering them so we make sure to run our unit tests on different ports.

    I use this code in my SimpleJmx JMX client/service package.

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

Sidebar

Related Questions

I'm used to working with PHP but lately I've been working with Java and
This is a nasty one for me... I'm a PHP guy working in Java
Soooo we have this system here that's working as follows: We have a Java
I have a working java client that is communicating with Google, through ProtoBuf serialized
I have an Axis (1.4) web service (running on Tomcat 6.0.20) that is working
I'm working on a project using Java RMI. This is the class causing problem:
I'm working on an application that requires the use of both JPA/Hibernate and RMI.
I'm working with java. I have an interface that has an annotated method in
I was working on java HashMaps and found that it adds values to the
I am currently working on an assignment that deals with RMI. Essentially, it is

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.