Results 1 to 6 of 6
  1. #1
    twist900 is offline Member
    Join Date
    Dec 2013
    Posts
    3
    Rep Power
    0

    Default Java Swing application + Database on server (Java EE?)

    Hi! Currently I have a java desktop application with a database that resides on clients system, connection is provided by JDBC connectivity. Now I need to move the database to a server, thus allowing multiple users to work with same db. I want to continue using Swing client. I am new to Java EE and there is tons of technologies from which my system can benefit, so my question is which approach I might want to use? No requirements on the system as long as it will still provide the functionality it had before.

    Being new to such large platform as Java EE, after several days of research I got completely lost, most examples I found were for web based applications that use JSF and JSP, same with books, but I have a Swing gui, and I still want to support networking, JPA and a lot more))

    And yes, I would like to put the system on EE platform, since there is more coming in the future.

    Thank you!
    Last edited by twist900; 12-12-2013 at 06:51 PM.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,354
    Rep Power
    6

    Default Re: Java Swing application + Database on server (Java EE?)

    Yes JEE land is a big place, easy to get lost in.

    You have a bit of a problem because normally you would create the JEE application stack and then create clients to match that platform. Yet here you are with the reverse situation; you have a client and now you want to slap a JEE application stack to it. The trouble is that currently your client application is probably designed to be "the application" that is in charge of everything, while in the new setup that you are moving to it is going to be exactly what it is - a client which consumes services from the JEE application stack, such as database interaction. That is not going to happen by changing a few lines of code, that will likely require some redesigning in the client itself.

    Me personally when I would create a client that needs to talk to an external database, I would stick a webservice in between; a webservice which you make part of your JEE application stack. And then I'd go for RESTful webservices through the JAX-RS API myself, but that is a personal choice (I find the API and the webservice standard very easy to work with).
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    twist900 is offline Member
    Join Date
    Dec 2013
    Posts
    3
    Rep Power
    0

    Default Re: Java Swing application + Database on server (Java EE?)

    Thank you for quick response! Does the approach with webservices require the change of app architecture you were talking about?! Also what kind of projects should I create to support webservices (Eclipse, Intellij, somewhere?...)? Yes, I want to get into it asap)))

  4. #4
    twist900 is offline Member
    Join Date
    Dec 2013
    Posts
    3
    Rep Power
    0

    Default Re: Java Swing application + Database on server (Java EE?)

    And also, do I really need Java EE if it is not a Web app, what are the other paths, and what is better? Now this question really shows how much I am confused)

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,354
    Rep Power
    6

    Default Re: Java Swing application + Database on server (Java EE?)

    JEE is only a specification that combines several loose APIs into one platform. You are free to use and not use any of them.

    I suggest you fix your confusion by researching, not by asking open-ended questions in a forum. I can't tell you what needs to change in YOUR application, I didn't write it. I can't tell you which tools you should use, that is a personal choice and will also depend on what you are already using and perhaps what preferences any other people in your working environment have. Inform yourself on what webservices are (I suggest you read into both JAX-WS which is SOAP and JAX-RS which is REST), do simple experiments with them and see for yourself if it is what you require and like. You're not going to get this done any time soon, that much is sure.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    rfq
    rfq is offline Member
    Join Date
    Mar 2012
    Location
    Novosibirsk, Russia
    Posts
    15
    Rep Power
    0

    Default Re: Java Swing application + Database on server (Java EE?)

    For start, you can avoid using Java EE at all. Just move your database to a accessible server machine and continue to use JDBC connection, now from multiple clients. If you discover problems, change JDBC connection with a webservice protocol. This does not require learning all the Java EE stuff. Webservice is a relatively simple thing. Estimate the number of clients, and chose simplest webserver able to serve you client base.

Similar Threads

  1. Replies: 0
    Last Post: 11-25-2011, 07:16 AM
  2. Silent Printing in java swing application
    By Vishal-pd in forum Java 2D
    Replies: 0
    Last Post: 08-30-2011, 04:36 PM
  3. Japura - Java Swing application framework
    By cadu.andrade in forum AWT / Swing
    Replies: 1
    Last Post: 06-09-2010, 04:31 AM
  4. Java swing Application for J2EE Environment
    By saranbg2 in forum AWT / Swing
    Replies: 0
    Last Post: 12-15-2009, 11:46 AM
  5. How can we use JCalender in Java Swing Application?
    By makpandian in forum AWT / Swing
    Replies: 4
    Last Post: 03-06-2009, 10:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •