Forum Stats

  • 3,852,361 Users
  • 2,264,096 Discussions
  • 7,905,046 Comments

Discussions

What is the best way to connect a daba base from a desktop swing aplication

Miguel Angel
Miguel Angel Member Posts: 518 Green Ribbon
edited Jul 30, 2010 10:41AM in Java Desktop Applications
I have a java deskopt application which has to connect to a oracle(10g) data base for make some transacctions such as find, insert,delete, update and others batch processes. What i want is to minimize the time that this aplication has to connect to the data base. The number of users is about 50. Some of the users are going to connect to this application via VPN(Virtual Private Network), others with LAN.

Do i have to use a singleton class conection with JDBC as usually? ,or a connection pool manager?

Comments

  • 843810
    843810 Member Posts: 46,938
    edited Jul 27, 2010 6:31PM
    So the desktop application is on 50 different machines?
    I mean same application is replicated on 50 different machines?

    Edited by: DynamicBasics on Jul 28, 2010 4:01 AM
  • Miguel Angel
    Miguel Angel Member Posts: 518 Green Ribbon
    In my application also use:
    -the java media framework for record video and take images from that video.
    -java sound to record and playback audio.
    -spell cheker for a medical dictionary.
    -jstarburn to burn cd/dvd data.
    -ftp conections,etc

    So do you think it 's a good idea to have my applications in 50 different machines?? or just one machine and the users connect to it.??. I need a suggestion with this also.
  • 843810
    843810 Member Posts: 46,938
    Usually a single connection is preferable; and if, an application server can be reached out to use the pool it is even better.

    I know connection pools can be created on an application server, dont know for desktop applications. I'm not sure if connection pool can be created in any other way.
    I need a suggestion with this also.
    ???
  • Miguel Angel
    Miguel Angel Member Posts: 518 Green Ribbon
    What i have been doing is using a pool but i also think that i can persist one conection per user as the user is using the application, so the application doesn't have to connect and disconnect to make a transacction.
    Another suggestion that i need is on how to deploy this application, i mean, install it in 50 different machines or in just one, considering all the processess i mentioned above.
  • 793415
    793415 Member Posts: 7,279 Bronze Badge
    a05207811 wrote:
    ..Another suggestion that i need is on how to deploy this application, i mean, install it in 50 different machines or in just one, considering all the processess i mentioned above.
    Deployment is a different question to connecting to a DB.

    But since you asked.. If you can run a server (such as tomcat) somewhere that every user has access to, then [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp] is an excellent option for deploying it to the various users. It will mean some extra work for you, but it is very easy for the end user.
  • 843810
    843810 Member Posts: 46,938
    a05207811 wrote:
    Another suggestion that i need is on how to deploy this application, i mean, install it in 50 different machines or in just one, considering all the processess i mentioned above.
    A quick question, how much memory is the application taking during normal executions?
  • Miguel Angel
    Miguel Angel Member Posts: 518 Green Ribbon
    Ok i will try with java web start, but i still have a doubt about how to set a better connection, I mean do i have to use a pool of connections?? , or just the simple connection as usual??.

    About how memory is using the application, we don't know yet, since we are working separate, i am doing the audio stuffs and my partner the video stuffs.
This discussion has been closed.