Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interconnecting 2 Java Swing applications

 
Daniel Jao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I hope you could me with my problem.
Here's the scenario:
I have 3 branches where it all uses same java swing standalone application that i developed. My problem is the main branch (1 of the 3) want to have the sales of each branches to synchronize, by synchronize, i mean the main branch wants to know the sales and transaction of each branches for the royalty purposes and other fees. Can anyone help me and give me suggestion on how to do accomplish these? with java... i know this is easier in web applications but we already have the standalone application so we need to find a solution for this situation. i know internet would be needed, but how does 1 standalone app send the required data to the main branch? what things do i need to know or is this ever possible? each branches has its own database. thnx everyone
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are *lots* and *lots* of ways to accomplish this. To trim down the choices a bit, you'll need to think about some other requirements you might need.

If all the main branch wants is "sales and transaction of each branches for the royalty purposes and other fees", then it sounds like you don't need to worry about updating the main branch's database as transactions are occurring at other branches. In fact, the easiest way to do this probably wouldn't be tied to your Swing GUI or anything Java at all - it would probably only involve the database. All you'd probably need is a nightly process that sends the day's transactions to the main branch's database. Many database systems provide built-in support for this type of thing. If your database system doesn't, you can "build your own" using cron in Linux/Unix operating systems (you can also get Cron-like utilities for Windows). If you have a Java program that is up all the time, you can also use Quartz for scheduling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic