0

I have created a GUI-DB Swing application1 in Netbeans using MySQL as the database. Now I want to deploy the application and distribute it as jar files over a LAN. The problem is that when a user modifies his table in one jar file, the corresponding tables in ALL the jar files distributed over the LAN should also be modified.

How can I do this? How to automatically update all the databases in a jar file when one database is changed?

Update

  1. It is a Swing application that uses multicasting to chat with other clients over a LAN. Now I want each client to be listen on a specific port, that is if a user wants to send message to a particular client only that client will get the chat message using multicasting. To do this I have a login form that asks the client username.

    Upon entry, the name and a random multicast IP is assigned to that client which is stored in a MySQL database. Other clients can chat with the client using the port.
  2. As an alternative to repackaging Jar files, how do I phone home to the DB?
Community
  • 1
  • 1
  • 1
    @AndrewThompson: This is a wheel I'd hate to re-invent; maybe IRC or XMPP (née Jabber), mentioned [here](http://stackoverflow.com/q/144049/230513). – trashgod Jan 26 '13 at 19:11

1 Answers1

2

Why a single DB has been distributed all over LAN, It wont be a bad idea if you install your DB on a single node and make all the applications (your Swing applications) distributed over the LAN connect to the node where your DB resides.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
c.pramod
  • 606
  • 1
  • 8
  • 22
  • How do I connect my application from the LAN to the node? I am new to mysql and do not know much about connection.Please help me out or send me some goo links to check out.Thank you. – user2013624 Jan 26 '13 at 16:43
  • @user2013624 once you have MySQL running on server mode on one machine, you need to specify the connection string in the JDBC to point to the server/database you are using check [this](http://www.insttech.washington.edu/~lab/Support/HowtoUse/UsingJDBCWithMySQL.html) for more of an explanation of how to do this – MadProgrammer Jan 26 '13 at 22:07