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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:19:01+00:00 2026-06-15T11:19:01+00:00

I’m developing a Banking Client-Server architecture. I want to know what is the most

  • 0

I’m developing a Banking Client-Server architecture.

I want to know what is the most convenient way to organize the Server side.
Does the Bank need to be the Server and the GUI in the same file ?

Because currently I have the server GUI which instantiates a Bank. This Bank has a list of Customer and each Customer has several Account.

  1. My first problem concerns a JTable in the server GUI. In fact a Bank store an ArrayList of every operations previously done by the clients. I wrote an implementation of AbstractTableModel which also store an ArrayList. The problem is that the Server instantiate a Bank and a TableModel for the JTable. So, when the Bank adds an Operation in its ArrayList, the TableModel is not aware of that. How can I link these two without giving the TableModel to the Bank ?

  2. The second problem concerns the connection with the Client. The Server pass a Session interface to the Client when login/password are correct. Session contains Banking operations that a Client can do. Is it a security problem if the SessionImpl encapsulate the Bank instance ? Because in reality Session methods call the Bank ones. Session is the only remote Object between the Client and the Server but encapsulating the Bank gives me the impression that the Client can access to the Bank directly.

  • 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-15T11:19:03+00:00Added an answer on June 15, 2026 at 11:19 am

    1) You want your AbstractTableModel to take a Bank object in the constructor. The AbstractTableModel methods then delegates to the underlying list of operations on the Bank object.

    There are two ways to solve the what happens if the bank object changes problem.

    a) Assuming a Bank object with a method:

    public List<Operation> getOperations();
    

    You can just call getOperations() each time a request is made to the table model. For instance:

    public Object getValueAt(int row, int column) {
      return bank.getOperations().get(row)...
    }
    

    This is slow but a simple way to get updates.

    b) In the more complicated way you would have the AbstractTableModel register with the Bank object to receive an event when a new operation is added to the Bank. This would look like:

    public class BankTableModel extends AbstractTableModel {
      private List<Operation> operations;
    
      public BankTableModel(Bank bank) {
        operations = bank.getOperations();
        bank.addOperationEventListener(...);
      }
    
      public Object getValueAt(int row, int column) {
        return operations.get(row)...
      }
    }
    

    The problem with this is that RMI does not provide a mechanism for the server to talk to the client so both the server and client need to be RMI endpoints. See RMI Events.

    2) The whole point of RMI is you get a stub of the remote object that resides on the server. The stub allows you to call methods on the remote object as if that object was local. Don’t worry about the security at this level especially in an academic setting.

    I would get rid of the Session object and just return the Bank object directly. If you are forwarding all your calls to the Bank object then you really just want to interact with the Bank object directly. In a more complicated system you may have justifiable reason for adding Proxy or Facade layers but I would keep it simple in this case.

    3) Your GUI and your Server should be two different objects. Your GUI is your client and there should be no GUI code at all on your server side.

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

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

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.