OO Programming: 2 Tiers Applications

Dear fellow Java developers
I have been dying to know how to work this problem out and I can't seem to figure out a flexible way to solve this:
The problem at hand is the following:
I have a 2 tiers application thus meaning that I have my Presentation/Business Logic layer and my Database layer being a small MySQL Database.
I am creating an application with multiple forms which all need to share the same connection to get data from my database.
It seems very inefficiënt if I would just create new connection objects all the time for each new form that I create. Therefore it would seem that using 1 Connection object (being ofcourse a Connection Class) for each form would be the most efficiënt way to work. The problem is that I have it figured out in my head but I can't seem to put it into code or at least not in a very efficiënt way.
Is there anyone who is interested and would find the time to help me figure out what would be a good way to solve this problem ?
I thank you all very kindly !
Regards
Herazio

Herazio wrote:
Dear fellow Java developers
I have been dying to know how to work this problem out and I can't seem to figure out a flexible way to solve this:
The problem at hand is the following:
I have a 2 tiers application thus meaning that I have my Presentation/Business Logic layer and my Database layer being a small MySQL Database.
I am creating an application with multiple forms which all need to share the same connection to get data from my database.
And why exactly do you think that?
It seems very inefficiënt if I would just create new connection objects all the time for each new form that I create. You would be wrong for the system you described.
Therefore it would seem that using 1 Connection object (being ofcourse a Connection Class) for each form would be the most efficiënt way to work. The problem is that I have it figured out in my head but I can't seem to put it into code or at least not in a very efficiënt way.
Which isn't what you said above. One connection per form would seem to be an entirely reasonable way to do this.
Is there anyone who is interested and would find the time to help me figure out what would be a good way to solve this problem ? Note as well that nothing in your description so far would suggest that you actually need to use a connection pool. A client application intended for use by a user does not mandate a pool. You might choose to use one solely for the learning experience but that would be the only benefit. And although not true for your database there can be situations where a pool would absolutely be the wrong choice for your current set up.

Similar Messages

  • I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    You can force quit applications
    >Force quit
    if that does not work you can force quit a computer shut down by hold the power button for an extended period.

  • How do I restore my Admin status for a program in Applications using 10.6.8

    How do I restore my Admin status for a program in Applications using 10.6.8?

    Is this the file that does not have the desired priveleges? I think that's correct. If so, then open Terminal in the Utilitie folder. At the prompt enter:
    sudo chown -Rf root:admin [dragged file goes here]
    Leave a space after "root:admin" and drag the file you need to change into the Terminal window. Press RETURN. You will be asked to enter your admin password. It will not be echoed to the screen so type carefully. Press RETURN again.
    This will change the priveleges of the file to the default for the Applications folder.

  • ABAP Objects: Introduction to Programming SAP Applications

    Hi, does anybody knows any tutorial that would explain me how to install and make available in my SAP installation the examples and database that comes with this book ABAP Objects: Introduction to Programming SAP Applications
    The point is that i couldn't install the version of SAP BASIS that came with the book ( it was SAPmini BASIS 4.6D) on my Windows XP. Instead, i've installed Mini WAS 6.20 with Front-End 6.40 and i'd like to use it while studying the same book.
    any ideas?
    sorry, may be it could sound obviuos for some of you, but i'm complete SAP virgin

    Not sure if this data generator is available in 6.20 or now.  SAPBC_TOOLS_GENERATOR_NEW  Run this program to generate the data for the FLIGHT tables.
    Then you should check out the example programs which start with BCALV*   and also check out transaction code DWDM.
    Regards,
    Rich Heilman

  • Do i need to reinstall programs and applications like FCP after upgrading to the new Lion OS?

    Do i need to reinstall programs and applications like FCP after upgrading to the new Lion OS?

    I've installed Lion over Snow Leopard and all my non Apple software is still here - you may want to check if your software will work with Lion and I would definately recommend having a bootable backup in case anything goes wrong
    Regards,
    Colin R.

  • Uninstalling programs or applications from my mac

    Hello, how are you.
    I'm a new mac user... and I have a doubt. If anybody knows, please answer me as soon as you read this. Is very important. How can I uninstall programs or applications from my mac?
    Somebody talks me that I had to remove the archives from my mac. But, I don't know if "really" I'm uninstalling the program.
    Please... I hope an answer!
    Thank you, very much.

    In MacOS X you can delete most applications by simply
    dragging their icon to the trash (and ofcourse empty
    the trash afterwards). Very few application do have
    an uninstall application or offer an uninstall
    feature in the original installer.
    Trashing is one way to remove files, but it can, in the case of complicated applications that write to folders outside of their own application folder, not completely remove all the files associated with the application, this can be viewed/ termed as a "dirty uninstall".
    For applications check if there is an uninstall option with the installstaller program for the application (in the case of MS Office theirs is a separate utility called "Remove Office" for this sole purpose). If a deinstallation option for the application is not present "dirty deinstallation" can be avoided by using a third-party application to do the job properly (e.g. springcleaning from Allume: http://www.allume.com/mac/springcleaning/ ).

  • TS2529 I can not buy programs and applications with my ipod touch using my itunes credit

    I can´t buy programs and applications using my itunes credit.  My Ipod 4 send an error message everytime when I am trying to download.

    What does the error message say?
    cuchiflusa wrote:
    I can´t buy programs and applications using my itunes credit.  My Ipod 4 send an error message everytime when I am trying to download.

  • Cant Update Programs and Applications

    I have a Mac Book Pro purchased in 2007. I can no longer up date programs and applications such as itunes, skype and others.
    Any advice??
    I dont want to have to upgrade to Snow leopard because I dont have the time to wipe everything off my hard drive and start again.
    Thanks

    Hi HotRock, and a warm welcome to the forums!
    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    If you have 20GB or much more you're OK.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    I dont want to have to upgrade to Snow leopard because I dont have the time to wipe everything off my hard drive and start again.
    While you really need to have a bootable backup or two, installing SL/10.6.x does what we used to call an Archive & install, nothing should be lost.
    But we really need to fix things first.

  • Why is my Macbook Pro using up 3.9GB of 4.0GB RAM when no programs or applications are open? What can be done to free up RAM?

    Once the computer has started up, almost all (3.9 of 4.0 GB) the RAM is used by system resources even though no programs or applications are running. How can I free up RAM on my system? Or is that the base utilization for the operating system?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • LOCATING PROGRAMS AND APPLICATIONS ON YOUR MACBOOK PRO

    Good Morning!  Where do you go on your Mac to find programs and applications that are actually on your Mac?  Also, if there are any malware apps or programs, will it show this, or can they "hide"?
    Thank you!

    Hello wjosten - Well....based on inexperience at this point with being a Mac user, and reading quickly through the Malware Guide, I didn't really see where you can find those "hidden" areas and check for malware....
    Some history..I posted on the community forum regarding a popup I was randomly getting, called "MacKeeper".  Don't have a clue why it has come up, but I have not downloaded anything (that I know of).  I was fortunately given great advice...to go to safari-preferences-privacy, and "remove all website data", which I did and did see this "zeobit", and I guess it's attached to MacKeeper.
    Anyway, the MacKeeper popup has come up a few times in the past day or two...and only when I am on my "spam" screen...emptying the folder....
    Nothing seems to be running differently on the Mac...
    Thanks for getting back to me, I appreciate it.
    Sincerely

  • Programs and applications on iPhone6

    Is there a limit on how many programs and applications the iPhone6 can have on it?  A friend of mine was looking into getting an iPhone6 and was told by Verizon that the iPhone6 had a limit of five programs that could be added to it but could add any number of applications.  Am a bit confused about this.

    Stamper wrote:
    Is there a limit on how many programs and applications the iPhone6 can have on it?  A friend of mine was looking into getting an iPhone6 and was told by Verizon that the iPhone6 had a limit of five programs that could be added to it but could add any number of applications.  Am a bit confused about this.
    Ditto. I have 249 apps on my iPhone.

  • Any time I open a photo program the application freezes.  I want to reinstall OSX from the original disk and then restore my machine from time machine Will a restore from time machine only restore my Apps and data

    Tried to post a question about restoring my i mac from time machine, but this new format makes no sense to me.  I want to restore my i mac from time machine after I reinstall the OS from the original disk.  Will a time machine restore only restore the applications and data or will it restore the current state of the OS.  My machine will not let me open any photo applications (aperture, I photo, NX 2) I have to force quit them every time I try to get some work done.

    06-sep-2012 0:14 
    Me compre un ipod classic de 160gb cada vez que trato de ponerle musica de mi disco duro externo solo copia hasta 1500 canciones y luego me congela el Itune  y no lo puedo cerrar, me pide que restaure el ipod como de fabrica, lo hago y nada.  Trato de cerrar el programa de itune y no me deja, trato de apagar el computador y no lo puedo apagar,  he buscado para ver si tiene errores  el disco del Ipod y me dice que esta bien.  Lo he restaurado como 8 veces y le he puesto musica y videos pero siempre me borra todo.  He aplastado Menu y Seleccion para entrar al sistemade diagnostic o del ipod y le pongo el test manual donde entro al IO y me dice q todo esta bien.  Le he dado ya varios Format directamente desde el Windows 7 y nada tampoco, siempre me borra todo desde que pasan mas de 1300 canciones y me congeal todo el equipo.  Ya no se que pensar de esta compania Apple porque no da ninguna solucion ha este tema.
    I bought a 160gb iPod classic every time I try to put music on my external hard drive only copy up to 1500 songs and then freezes Itune me and I can not close, asks me to restore the ipod as factory, and do nothing . I try to close the program and itune will not let me, I try to turn off the computer and I can not shut, I looked to see if the iPod disk errors and says it's okay. I restored it about 8 times and I've put music and videos but I always delete everything. I crushed and Selection Menu to enter diagnostic sistemade or ipod and I put the manual test where I enter the IO and q tells me everything is fine. I have already given several Format directly from the Windows 7 and anything either, I always delete everything from passing over 1300 songs and I congeal whole team. No longer have to think of this company because Apple gives no solution has this issue.
    iPod classic, Windows 7, ME BORRA TODO Y SE CONGELA 

  • Programs in Application server/Hard Disk

    Hi,
    When we program a report in ABAP , where is it stored in the hard disk of
    the system and what will be its extension?
    Is it possible to get a view of all ABAP programs without logging into R/3  and directly from Windows Search?
    Regards,
    Neeraja

    Hi,
    It's been a confusion actually.
    Just note that the programs and all the objects in the SAP are stored in the "Application Server".(Not ur hard disk).
    Here the Application Server refers to the server where the only way interaction between ur presentation server and the Database server.
    Hope it is clear.
    Cheers,
    Simha.
    Reward all the helpful answers..

  • Calling external program on application server

    Hi, everyone. I'm trying to call an external program from ABAP by using SM69 and FM SXPG_COMMAND_EXECUTE
    MOVE 'zlong_bat' to ld_comline.         "Maintained using trans SM69
    * Execute external command, contained in 'ld_comline'
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = ld_comline
    *           additional_parameters   = ld_param  "Params passed to script
    *           operatingsystem               = 'UNIX'
           IMPORTING
                status                        = ld_status
           TABLES
                exec_protocol                 = ld_output
           EXCEPTIONS
                no_permission                 = 1
                command_not_found             = 2
                parameters_too_long           = 3
                security_risk                 = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry          = 13
                jobcount_generation_error     = 14
                OTHERS                        = 15.
      IF sy-subrc NE 0.
      ENDIF.
    In the  sm69, I define zlong_bat with
        Operating system command: cmd
         Parameters for operating system command: /c remoteconn.bat
    It can run well if remoteconn.bat contain some simple command of dos like dir, md, mk... But when I call a program from remoteconn.bat, the abap program hang. I also cannot test in sm69 because it hang too.
    If I call direcly from sm 69 with
         Operating system command: cmd
         Parameters for operating system command: /c  psexec.exe
    localhost -u test -p 1234
    or
         Operating system command: C:\psexec.exe
         Parameters for operating system command: 
    localhost -u test -p 1234
    The SM69 also hang.
    Are there any method to call a program from sap without hanging
    of course the program is in its position on application server.
    Thank you in advance.
    Regards,
    Long
    Edited by: dragonking88 on Aug 25, 2010 12:54 PM

    Hi Long Le Hoang,
    I am running a shell script fromSM69 which call psexec.
    shell script runs fine but SM69 execution goes on hold.
    Can you please help me how to terminate SM69 execution.
    Alpa

  • Resource Based Authorization sample program and application

    Recently i have studied about the types of authorization and i also did some samples for role based authorization. Now i am looking for Resource based authorization, the sad thing is that i could not able to understand the concept.
    So i am looking for the sample application and C# program. 
    I just want to know the concept of resource based authorization and also the sample application file and c# coding file.
    Please provide me the sample.
    Thanks in Advance. 

    Hi,
    Technet forums are dedicated by technologies. Since you are more looking for concept, you should check for blogs on the Internet (try google...).
    Otherwise please refer to TechNet forums homepage and look for your technology (C# for instance).
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

Maybe you are looking for

  • Using Adobe XI, when trying to open PDF I get a blank page with small "x." How can I open the docume

    Ocassionally I will try to open a PDF. The document is not viewable. I can only see a white page with a small black "x" in the top portion of the page. I have a "repair" in adobe. I have the latest version Adobe XI. Any suggestions on what I can do?

  • Ati Mobility M6 LY catalyst

    I've got a laptop with an ATI Mobility M6 LY card in it.  I installed the catalyst drivers and at first the screen would blank out before I could logon.  I fixed this by disabling KMS with "radeon.modeset=0".  I can logon now but startx puts my scree

  • How do I get flash player to open to facilitate veiwing email video

    How do I get flash player to open in order to facilitate viewing an email video attachment?

  • [SOLVED] Install a single program

    Hello to everyone and sorry for my poor english. I want to install "dig" package but I don't need the entire "dnsutils" group. It's possible? And another question, how can I see all "dnsutils" packages? With another group, for example "kde", I can wr

  • Functional knowledge in XI

    Hi,    I am basically an XI developer, but during interviews they ask for some basic functional knowledge in SD,HR,MM etc.Can you guys send me the basic functional doc for HR,SD,MM  to my mail id : [email protected] ASAP *********Points will be award