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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:19:28+00:00 2026-06-05T05:19:28+00:00

I understand the difference between local view, remote view and no-interface view. I just

  • 0

I understand the difference between local view, remote view and no-interface view. I just don’t understand what is the difference between “no view” (no annotation) and no-interface view. And also why should I annotate my interface with @Local? What if I don’t annotate the interface in at all, is there a difference?

  • 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-05T05:19:31+00:00Added an answer on June 5, 2026 at 5:19 am

    The rules are (from memory):

    1. Bean has a @LocalBean annotation -> bean has a no-interface view
    2. Bean has a @Local annotation -> bean has a local view
    3. Bean has a @Remote annotation -> bean has a remote view
    4. Bean has no view annotations, but directly implements an interface which has a @Local annotation -> bean has a local view
    5. Bean has no view annotations, but directly implements an interface which has a @Remote annotation -> bean has a remote view
    6. Bean has no view annotations, but directly implements an interface which has no view annotations -> bean has a local view
    7. Bean has no view annotations, and implements no interfaces -> bean has a no-interface view

    So, using @LocalBean and using no annotation at all are both ways of getting a no-interface view. If you just want a no-interface view, then the simplest thing is not to annotate. Provided you’re not also implementing any interfaces.

    Part of the reason @LocalBean exists to add a no-interface view to a bean which also has an interface view. I imagine the scenario uppermost in the spec authors’ minds was one where you have a bean like:

    @Stateless
    public class UserPreferences {
        public String getPreference(String preferenceName);
        public Map<String, String> getPreferences();
    }
    

    Where you would want to expose both methods locally, but only the coarser-grained getPreferences() remotely. You can do that by declaring a remote interface with just that method, then just slapping @LocalBean on the bean class. Without it, you’d have to write a pointless local interface just to expose both methods locally.

    Or, to look at it another way, the @LocalBean exists because there is such a thing as a no-interface view, and the no-annotation option exists as a handy shortcut.

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

Sidebar

Related Questions

I don't understand the difference between A and B. A private static final CookieStore
I don't understand the difference between hex2dec and hex2num and their opposites in MATLAB.
I'm trying to understand the difference between sequences and lists. In F# there is
I feel that i don't fully understand difference between KVO and NSNotification... They seem
I don't understand the difference between a) on the server side initiating a cURL
I don't understand the difference between MAC address and BSSID. I understand that MAC
I understand the difference between a process and a thread. And I know the
I couldn't understand the difference between multiple_selection_interval and single_interval_selection in JTable . table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); next,
I can understand the difference between a signed char and an unsigned one. But
Wanted to understand the difference between undef and define a macro as 0. Thanks.

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.