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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:55:42+00:00 2026-06-13T06:55:42+00:00

Consider the following example @Remote public interface RegistrationService { public String register(); public void

  • 0

Consider the following example

@Remote
public interface RegistrationService {
    public String register();
    public void unregister(String id);
    public void heartbeat(String id);
}

@Stateless
@Remote(RegistrationService.class)
public class RegistrationServiceBean implements RegistrationService {
    /* ... */
}

I have an interface, lets say RegistrationService. With this, a remote client is able to register itself onto the application. By calling heartbeat() periodically, it signals that it is still alive.

What would be the correct way to document EJBs and their interfaces?

For example:

Interface

  1. The user of this interface can register itself onto the application.
    The application then recalculates something to distribute evenly
    across all registered clients. (This would involve knowledge about
    other classes, the recalculation class for example)
  2. The user of the interface is able to register itself and notify the server if it is
    still connected. The implementation uses this information to issue
    tasks to underlying systems based on the amount of registered
    clients (This does not involve knowledge about other classes,
    however is not so precice from an application point of view)

Class

  1. This implementation of the RegistrationService issues recalculations in the RecalculationClass when a client registers, unregisters or a heartbeat expires. This is necessary, because the data has to be evenly distributed between clients.

Any thoughts appreciated. Thanks.

Sven

  • 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-13T06:55:44+00:00Added an answer on June 13, 2026 at 6:55 am

    Interface javadoc should have no information about the implementation. Interfaces are about the what, not the how.

    For example, it would be valid for the implementation to completely ignore calls made to the interface’s methods – ie have an empty method.

    Your javadoc should say something like: Notifies that the specified application is still alive. What the implementation chooses to do with that information is up to it.

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

Sidebar

Related Questions

Consider the following example: public interface ITask { void Execute(); } public class LoggingTaskRunner
Consider following example : public class SomeBusinessLayerService : DataService<MyEntityContainer> { [WebInvoke] void DoSomething(string someParam)
Consider the following code. public interface IFoo { } public class Bar { public
consider the following example: public IEnumerable<String> Test () { IEnumerable<String> lexicalStrings = new List<String>
Consider the following example. I have an interface MyInterface, and then two abstract classes
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Consider the following example: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> <html xmlns=http://www.w3.org/1999/xhtml
Consider the following Hibernate mappings: <hibernate-mapping package=org.example> <class name=Customer table=CUSTOMER> <id name=customerId column=customer_id/> <bag
Consider following example: class CBase abstract { protected: CBase() { } }; I could
Consider following example. #include <iostream> #include <algorithm> #include <vector> #include <boost/bind.hpp> void func(int e,

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.