How best to manage connections

I am rewriting an application in Java. There will be 1-20 people accessing the DB. I don't yet know how many concurrent connections will need to be open. It could also be from 1-20.
Should:
1) Each person establish a single connection for the day and the connection remains open until they close down for the day?
2) Establish a connection pool with an estimate of connections needed overall and each person grabs a connection only when needed and returns to the pool when done?
3) Any other idea?
TIA

Thanks for the responses.
DrClap: The comment regarding single vs multiple JVMs is something I have never considered. How does a single JVM service multiple users? This may force a method upon me.
jschell: My selection of concurrent connections is a 'best guess' for the immediate future.
The layout is actually a question I posed in the network section of the forums. I am still working through that.
As to whether or not this is a real need; few things are ever a real need. This is a want. I am rewriting a manufacturing system I currently use and wrote 10 years ago. My company has evolved and now needs to have the software match our business model. I have written small projects in Java, more for fun that practicallity, other than mobile programs I've written and use.
Thanks all,
TIA

Similar Messages

  • How Best to Manage the Media Cache?

    Hi. I use a Mac Pro and have a 24TB RAID which holds most of my media. My problem is how best to manage the Media Cache which gets very big, certainly to hold on my OS drive (as recommended) . I could store it in a separate "cache" folder on my RAID but will this effect performance? Or is it best to save it with its media? I would rather not trash the Cache files as I often need to draw upon older projects and it's media for current projects. I think this is the weakest part for FCP editors switching to Premiere.

    Ideally you should have five internal 'drives':
    OS/Programs
    Projects
    Cache/Scratch
    Media
    Exports
    You've got the OS and Media drives worked out, now get those other three in place.

  • How best to manage global forms

    Looking for the best way to manage "Global forms". Where the same form (Output) may have different data displayed based on the country it is printed from.
    Let's just use BA00, Order Confirmation as an example.
    In the U.S. this output is on 8.5 X 11 inch letter paper, and has some specific texts which should be displayed in certain locations.
    For Britain, we'd like to use the same form, but this will print on A4 paper, and have their own specific texts (in specific form locations)
    Same difference for China, Greenland, Mexico, etc. Assume each "Country" is a Sales Organization in SAP.
    How best to manage the output form configuration and controls?
    If I use a condition record for BA00 that includes Sales Organization, is it left up to the SMARTFORM programmer to query the sales org. and determine what and where to output the appropriate texts for each country?
    Is there a way to have a different form for each Sales Org, and how would this fom be "selected"?
    Anyone got any other ways to more efficiently handle this situation ?
    Thanks in advance

    Crikey ! Thanks for the quick response. That is where I was going, but wanted to get some other viewpoints
    Thanks

  • 2 iPad users using one iTunes account.  how best to manage this?

    My wife and I both have ipads, ipods, and iphones.  We want to use one iTunes account but it has proven to be very frustrating.  any advice?

    as far as we can tell, iTunes has no concept that this is iPad1 and this is iPad2.  The only to manage sharing 80% same content but diferentiating on 20% is to manage EVERYTHING manually.  With lots of apps, movies, and 80GBs of songs, this is ridiculous.  We can't be the only couple who want one account but lots of different devices with different desired items on them.
    Some syncs can't be done manually so we have to go back and delete or add after the fact. Giant waste of time.
    iTunes on the iPad is a bit of a joke.  it doesn't seem to have any relationship to iTunes on our primary computer.  It doesn't actually function the same way (doesn't actually store downloaded items) which leads to iTunes confusion, frustration, and sometimes duplicate buying.
    I'm thinking I'll just wait for the cloud service but given apple's record with iTunes, I'm a little doubtful about that.  Appreciate the response.

  • How best to manage the camera roll on iPhone

    Should it be periodically cleared?

    I do not use the Camera Roll for long term storage of photos on my iPad or iPhone. I use PhotoStream to transfer photos to my MacBook Pro. Once they are there I archive the best photos and discard those I do not want.
    The best photos are then organized into albums. In my case that means using iPhoto on the MacBook Pro. Keep in mind that I also have backup copies of my best photos on two other hard drives.
    Once the photos are organized in iPhoto I can sync those albums that I want on my iPhone. After I sync I'll delete the redundant photos from the Camera Roll on my iPhone.
    Having too many photos in the Camera Roll makes that album hard to got through to find the photo I might be looking for. When they are organized into albums after a sync I can usually find the one I want fairly quickly.
    I know you can copy a photo from the Camera Roll into another album directly on your iPhone. But that still leaves the original in the Camera Roll. Deleting that original from the Camera Roll will delete the copied versions. Leaving all the original photos in the Camera Roll makes the Camera Roll album with too many photos for me to easily find one. So I use the workflow described above.

  • How best to manage AppleIDs for different countries?

    We live in Canada, but have a recreational property in the U.S. where we spend several months each winter.
    We use AppleTV in both locations, and as such, we have to have AppleIDs associated with both the US iTunes Store and the Canada iTunes Store (which of course means that we have to have credit cards in both countries, which we do).
    This is frustrating as we often have to buy the same content twice so as to be able to watch it in two countries... but I understand that this is probably a content owner imposed issue about distribution rights, and not due to Apple.
    We used to easily manage this by just switching the AppleID (& country of store) on our MacBooks as we travelled back and forth.
    Then Apple introduced a constraint that one could no longer switch between AppleIDs on hardware such as MacBooks and iPads (I believe that one can switch to a new account any time, but cannot switch back to a previously used account until a period of time passes, which I believe used to be 90 days).
    Now it seems that one cannot do these account reversals more often than one per year.
    It seems like it is getting to the point that one has to have a portable hardware device for each country and use a different AppleID on each in order to have access while travelling to the content that one has paid for in the past.
    This was not the case years ago when much of this content was purchased.
    Further, when doing upgrades, it is easy when prompted to enter the "wrong" AppleID and then unintentionally lose access to the store in the country that one is currently in (now for up to a year!)
    Is there a better way to manage one's accounts across different countries?
    Given the constraints on AppleIDs, it is not something that is easy to figure out through experimentation.

    We can start applications in a particular screen, since Snow Leopard, similar to what Linux has been able to do for some time; however, these screens are not really desktops, since we can't dedicate certain shortcuts/icons to only appear on certain screens.
    Thanks, Eric.  Perhaps I wasn't clear in the above.  I realize we can start applications in certain desktops, but that is NOT what I'm after.
    What I would like is the icons (i.e., shortcuts, directories, files) that appear on the desktop, to be different for each desktop.  Such that if I go to Desktop 2, I can place all my game icons/shortcuts there.  Then if I switch to Desktop 3, I might have all my Office programs there, but not my games.  Does that make sense?
    Eventually I might also want my Dock to have different icons based on what desktop I'm using, but I figure that's even more difficult.

  • How best to manage Windows on a Retina Display?

    I'm running a Macbook Pro 15" Retina, set up with Windows 8.1 on a Boot Camp partition, that I also access from within Mac OS X Mavericks using Fusion 6 (whatever the current version is). This means I've spent a bit of time trying to sort out the fun and excitement of using Windows on a Retina display, which is a whole world of chaos. Within Fusion, the secret is to tell Windows to just not use the full Retina HD display capabilities. Hobbled, but things display as you'd expect.
    When I boot up using Boot Camp, however, there are still all mannger of issues that I can't seem to tame using the adapative scaling settings in the Displays control panel. Mainly pertaining to Java apps and games. A particular Java program I need appears to ignore the Windows settings and scales all text at impossibly small sizes (practically unreadable). Games like Neverwinter seem to freak out, with the UI failing to redraw to accomodate the resolution, and even having the entire active game window displayed as a large moving postage stamp in one corner -- not windowed, just tiny and in the corner like a misguided picture-in-picture view.
    So, there appears to be all sorts of things that handle resolution in different ways. The consistent them is that they all seem to freak out when they're on a Retina display.
    Any tips or guidance?
    Thanks!

    You have to copy the catalog and the previews folder over to your laptop. You know that you can't work in the Develop Module without the image files. But you can add keywords, titles, flags, color labels, etc.
    You find the catalog by going >Edit >Catalog Setting >General tab. Note the name and location. Then in Win Explorer navigate to this location. The catalog is the file with the extension <  .lrcat> and the previews folder has the extension <  .lrdata> and is located next to the catalog. Copy both to your laptop. On your laptop - after Lr is installed - double-click the catalog file and Lr will open with it.
    If you want large previews you have to generate them on your PC before copying the previews folder. Open Catalog Settings / File Handling tab and set the preview size you want.
    Then - in Grid View - go to <All Photographs> and press Ctrl + A to select all your photos. Then go >Library > Previews > Build Standard Size Previews / Build 1:1 Previews (whichever you want). "Standard Size" is the size you've set earlier in Catalog Settings. Building the previews for 100 GB of images will take some time - it might take several hours. So be prepared for a long session in your favorite coffee house .

  • Managing Connections in a desktop Application or Applet

    Wondering how people usually manage connections in a fairly large GUI application (or Applet).
    I'm used to using a Connection Pool with Servlets.
    Is this worth using with an Application or is it ok to create a Connection at startup and use it throughout the whole execution?
    Is it ok then to pass references to this Connection to other classes in the application?
    Any tips, experiences, guidelines would be appreciated.
    Thanks.
    Derek

    Hi
    I'm assuming that you are using a J2EE Application Server that implements datasource pooling if you have the ability to use Pooled Connection with your servlet (if not, then you must have created your own connection pool?).
    Basically, if you have an Applet, then there is no reason to change your current way of working...simply let a servlet in your container handle the database stuff, then return the results to the Applet.
    For desktop standalone applications, things are a bit different. You will probably have to implement your own pool. Best practices...hmm...not an expert but I would have thought it best to open the connection, do the SQL stuff, then close it straight away, and in doing so release the connection back to the pool for another application to use (assuming you have a pool). If you are thinking about opening a connection for every application and holding these indefinitely, then you will eventually run into trouble. How many connections can your database handle???
    Hope that helps

  • How to create dynamic connection in business view manager.

    Hi Sir,
    Can u explain how to create dynamic connection in business view manager.
    Thanks
    Vishali Raghava Raju

    HI Vaishali,
       Can you please elaborate your requirement ?
    -Regards
    B

  • How best we can use the Rollback and RollbackAlways mechanism in Visual Studio Release Management Template

    Hello All,
    We need a clarification on Rollback and RollbackAlways in Release template.
    We checked a scenario for Rollback and RollbackAlways:
    In Release Template, we have the first activity as “Configure Application Pool” and then followed by a rollback action of “Create Application Pool”
    and “Create Web Site” then followed by "Code Deployment" via TFS build.
    We tested with 2 scenario’s:
    With App Pool and Web Site already existing: when triggered the build, configure
    app pool succeeded, then Rollback action was skipped (as previous action was successful), finally deploy the code executed (code deployed) and build got succeeded.
    Deleted App Pool and Web Site: when triggered the build, configure app pool failed (as no app pool existed), Rollback action executed (as previous action failed) – created app pool and web site then finally
    deploy the code executed (code deployed)
    But build failed (Error: Configure app pool action failed).
    Ideally the build should succeed as the roll back action got executed and code deployed successfully.
    Please correct us if our understanding is wrong.
    Also, Kindly let us know how best we can use the Rollback and RollbackAlways mechanism in Release Management
    Looking forward for your positive response.
    Thanks in advance.
    Regards,

    Hi Shashank,
    Rollback Always runs if any of the actions in the template failed. Rollback will run if action just above rollback fails or if any of the actions below the Rollback fails.
    Article here (http://www.incyclesoftware.com/2014/03/understanding-rollbacks-release-management/) clearly explains how Rollback and Rollback
    Always work.
    I think you come across this issue since you are using build to do the "code deployment" action. You should use the release template to do that. 
    As far as I know you cannot use Rollback to achieve condition check (App pool exist in your case) action.
    For this you can create your own Power Shell component (which checks if the app pool exist and is not create it) and add it as a tool in RM server (RM Server Inventory).
    Another option is you can follow the workaround in below thread "Answer" quoted below. That is execute Remove app pool regardless if it exist or not (which does not fail) and then create app pool.
    I was able to get it working by removing the app pool which does not fail if it doesn't exist. Removing then creating seems the long way around but it works.
    Flow:
    Remove Application Pool
    Create Application Pool
    https://social.msdn.microsoft.com/Forums/en-US/43bf21c8-e233-4e58-a5a8-2592b78bc466/vs-2013-release-management-create-application-pool-fails-if-it-already-exists?forum=tfsbuild
    Cheers!
    Chaminda

  • How Best to Connect a Drob 5D

    I will be connecting i) a Drobo 5D ii) a Thunderbolt display and iii) a MBA / Mac Mini...I am little confused as to how best to make this work.
    The Drobo documentation is clear that "...the Drobo 5D performs best when it is the first in the daisy-chain, but it can also be in the middle or at the end...".
    The first Thunderbolt-only scenario which came to mind was MBA/Mac Mini --> Thunderbolt display (where the MBA/Mac Mini is connected using the Thunderbolt cable that is part of the display) --> Drobo but this puts the Drobo at the end of the daisy-chain.  This one works as it is described in the Drobo manual.
    The second Thunderbolt-only scenario was MBA/Mac Mini --> Drobo --> Thunderbolt display (where the Drobo is connected using the Thunderbolt cable that is part of the display).   The potential issue here is that I don't know whether this connection sequence will pass the "display" and "Ethernet connection" back to the MBA/Mac Mini through the Drobo.
    Would greatly appreciate someone answering this for me.
    Thanks,
    Joel

    clintonfrombirmingham wrote:
    You should go with the second scenario - Thunderbolt works best with the display at the end of the chain. I don't have a NAS, but I do have two Thunderbolt drives that are daisy-chained first and second with my Display being the third and final TB unit.
    Good luck,
    Clinton
    MacBook Pro (15-inch Late 2011), OS Mavericks 10.9.4, 16GB Crucial RAM, Crucial M500 960GB SSD, 27” Apple Thunderbolt Display
    Appreciate the response and note that the Drobo 5D is a DAS [i.e. it is the Drobo 5N which is the NAS].
    So, just to be perfectly clear, the video and network connection will pass from the Thunderbolt display to the MBA/Mac Mini when those two devices are t the end of the chain?
    Thanks so much,
    Joel
    PS.  What DAS do you have as I am still considering different units.

  • Got a problem? Here's how best to ask for help.

    Working with video editing on an NLE (Non Linear Editor) program can tax the most robust computers. Depending on many factors, this can be a daunting task, at best. Many of the components of one’s computer can be stressed, more than with almost any other operation, that it will ever perform.
    Getting help on the forum can seem almost as daunting, as the first thing that a poster is likely to encounter is a list of questions, before any answers. This is the natural flow, because people are trying to help remotely. They cannot come to your office and sit behind you to determine your computer system’s capabilities, and observe just what you are doing, when and how you are doing it. Do not be put off by these questions, as they are very necessary and will very likely give the respondents some clues on where to look for your problem.
    Problems can normally be broken down into these categories:
    1.) System
    2.) Assets (the Audio, Video and still images)
    3.) Project (how it is setup and with which Preset)
    4.) Workflow (what you are doing, and how you are doing it)
    If you prepare a checklist, before you post your problem, it will save everyone a great deal of time, and will likely yield your answer much more quickly. The more detail that you furnish, the fewer questions will remain, that have to be asked. Remember, you have to be the "eyes" for the others on the forum, if they are expected to help you. They could be thousands of mile away, in other time zones, and will not know about your system, your Assets, your Project or your workflow, until you tell them. Help them get started quickly, by telling them in your first post. Do your "homework," so they do not have to ask questions for the first five responses, and can start giving you answers much more quickly.
    Forum regular Bill Hunt offers these recommendations:
    System:
    Be very specific about your computer. Just saying that "I have a Dell" doesn’t tell them much of anything. List your CPU type and speed, i.e. Core2 Quad Q6700 2.3GHz. Same for your RAM, i.e. 4GB of DDS. Also, list your Video Card, type, connection and driver number and date. Same for your Audio System. Note: most of this data can be found in Control Panel>System>Hardware>Device Manager. Pointing people to a URL on your computer company’s Web site isn’t a bad idea, but giving the exact details of your system is far, far better. It is likely that that Web site will have the general configuration, and who knows if that is exactly what you bought. List it for them, so they do not have to go and guess, and write down the specs. of your system.
    One of the most important aspects of your system will be the I/O sub-system. What is that, you might ask? Well, it’s your HDD’s (Hard Disk Drives). The important info is how many physical HDD’s do you have. List their size, their speed, their connection, the amount of free, defragmented space and how they are allocated. This would look something like this: "3x 200GB SATA II. Drive C:\ OS, programs and Windows Virtual Memory with 185GB free, D:\ media with 120GB free, E:\ Project files, output and Scratch Disks with 150GB free." If you have any drive partitioned (not a good thing nowadays), let everyone know and give details. If you have a RAID, give full details on how it is managed, the type and how it is used in your system. [As an aside, most RAID’s should not really be considered for a system drive, unless one has built in redundancy in the RAID, i.e. 3, or more, physical disks. Remember, this info can be critical. If you have CD/DVD burners, list them and their connections. If you have external HDD’s, list them with the same details as for your internal HDD’s.
    Next, tell about your Windows Virtual Memory (Page File). How large is it, where is it located on your system and how is it managed, i.e. dynamically by Windows, or static? Again, this can be critical. For info, you will need to go to Control Panel>System>Advanced>Performance and look. In the Settings>Advanced, you should see things like Process Scheduling, Memory Usage and Virtual Memory. This is where you will find the answers. Note: depending on which OS one has, the exact location and syntax may differ.
    While we’re on the OS, list the exact OS that you have, i.e. Vista Ultimate 64-bit SP-2 with all updates and hot-fixes.
    What version of the NLE are you using and has it been updated, i.e. PE3.0.2.
    Finally, list any other programs, that might be in use, while you are editing, such as MSN Messaging, etc. These can be critical, even though you are basically editing video.
    Assets:
    Give full details on your Assets. Just saying "a bunch of .AVI’s" tells people nothing. Be very specific with the details. Same for your Audio and for your still images. Size in pixels, file type, etc., are very important for the stills, and file type. Sample-rate and sample size are important for the Audio.
    Project:
    How is your Project setup? Which Preset did you use? What is the Duration of your Timeline. This gives someone the "lay of the land," so to speak and is very important. Note: your Project Preset should match your Video Assets. You can always Export/Share to some other frame size, or format, but your Project should match your Video Assets.
    Workflow:
    How have you arranged your Assets on the Timeline allows someone to "see" your Project in their mind. Information such as one 00;10;00;00 AVI (remember, you will have furnished complete details on those AVI’s, or MPEG’s when you listed your Assets above) on Video Track 1 (VT1) with its Audio on Audio Track 1 (AT1). One AVI used as a PiP (Picture in Picture) on VT2 with its Audio on AT2. One MP3 soundtrack for the full Duration on Soundtrack and my Narration on the Narration Track. List any Transitions, or Effects used. If you have Titles, list them. If you have any Keyframing used, list where and what they control.
    List exactly what you are doing and to which Asset you are doing it, when your problem occurs. If you are doing something like Export/Share, list the full settings (Presets) used, and be sure to mention any other tasks being performed by your computer, while you are doing the Export/Share.
    If you have already done some trouble shooting, list what you have done and the complete results. Were there any error messages? If so, give the full description. To say, "I had error messages," tells people nothing. What exactly did they say?
    This information will help people get right to your problem and will get you up and running much more quickly.
    As an aside, think about the title of your post. Saying "Problem" is not good enough. Instead, something like "PE7 Fails on Share to MPEG-2" would be better. First, you are trying to let everyone know something about your Problem, so they will see it, and be interested in helping you. If you are having an Audio issue, mention "Audio" in the title, so the right people will find your post. Not everyone knows everything about all aspects of Video. You want the right people to see your post and to be working with you, to fix your problem. Also, later on, it is good to have a title that will be easily found by others, who may have the same exact problem. If you get an answer that works, please post back that success, so others, finding your post, will know what worked, and what did not. Note: do not put your entire post into the title. That is just tough to read and understand. Use a few words, but make them the right words.

    Please note that this Tip was produced by Bill Hunt (the_wine_snob) and not me. I would never have the extent of knowledge needed to write this Tip.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • What is the best Practice JCO Connection Settings for DC  Project

    When multiple users are using the system data is missing from Web Dynpro Screens.  This seems to be due to running out of connections to pull data.
    I have a WebDynpro Project based on component development using DC's.  I have one main DC which uses other DC's as Lookup Windows.  All DC's have their Own Apps.  Also inside the main DC screen, the data is populated from multiple function modules.
    There are about 7 lookup DC Apps accessed by the user
    I have created JCO destinations with following settigns
    Max Pool Size 20
    Max Number of Connections 200
    Before I moved to DC project it was regular Web Dynpro Project with one Application and all lookup windows were inside the same Project.  I never had the issue with the same settings.
    Now may be becuase of DC usage and increase in applications I am running out of connections.
    Has any one faced the problem.  Can anyone suggest the best practice of how to size JCO connections.
    It does not make any sense that just with 15-20 concurrent users I am seeing this issue.
    All lookup components are destroyed after its use and is created manually as needed.  What else can I do to manage connections
    Any advise is greatly appreciated.
    Thanks

    Hi Ravi,
    Try to go through this Blog its very helpful.
    [Web Dynpro Best Practices: How to Configure the JCo Destination Settings|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID2054522350DB01207252403570931395End?blog=/pub/wlg/1216]
    Hope It will help.
    Regards
    Jeetendra

  • How do you manage tracks on your iPod using iTunes 7 ?

    Hi - On iTunes 7 what would be the best way to manage tracks / albums on my iPod.. It was so easy before but so complicated now, when I connect my iPod, iTunes just comes up with some sort of summary page. I can Sync but I can’t see any way of bringing up all the tracks on my iPod, then manually adding or deleting the tracks. I don’t wish to keep all of the tunes on my iPod but would like to keep some of them in my Library. I don’t want to delete tracks in my Library then sync but this seems like the only option?
    Thanks for any help!

    I have just found out how to do this:
    Connect your iPod:
    Under DEVICES you will see an arrow (on the left hand side, next to your IPod. If you are unable to display your songs the arrow will be pointing to the right. By clicking on this arrow it will point down, all of your songs will appear. Under Preferences uncheck Auto Sync then you can manually add / delete.

  • How to use JDBC Connection Pools in a standalone application?

    Hi, there,
    I have a question about how to use JDBC Connection Pools in an application. I know well about connection pool itself, but I am not quite sure how to keep the pool management object alive all the time to avoid being destroyed by garbage collection.
    for example, at the website: http://www.developer.com/java/other/article.php/626291, there is a simple connection pool implementation. there are three classes:JDBCConnection, the application's gateway to the database; JDBCConnectionImpl, the real class/object to provide connection; and JDBCPool, the management class to manage connection pool composed by JDBCConnectionImpl. JDBCPool is designed by Singleton pattern to make sure only one instance. supposing there is only one client to use connection for many times, I guess it's ok because this client first needs instantiate JDBCPool and JDBCConnectionImpl and then will hold the reference to JDBCPool all the time. but how about many clients want to use this JDBCPool? supposing client1 finishes using JDBCPool and quits, then JDBCPool will be destroyed by garbage collection since there is no reference to it, also all the connections of JDBCConnectionImpl in this pool will be destroyed too. that means the next client needs recreate pool and connections! so my question is that if there is a way to keep pool management instance alive all the time to provide connection to any client at any time. I guess maybe I can set the pool management class as daemon thread to solve this problem, but I am not quite sure. besides, there is some other problems about daemon thread, for example, how to make sure there is only one daemon instance? how to quit it gracefully? because once the whole application quits, the daemon thread also quits by force. in that case, all the connections in the pool won't get chance to close.
    I know there is another solution by JNDI if we develop servlet application. Tomcat provides an easy way to setup JNDI database pooling source that is available to JSP and Servlet. but how about a standalone application? I mean there is no JNDI service provider. it seems a good solution to combine Commons DBCP with JNID or Apache's Naming (http://jakarta.apache.org/commons/dbcp/index.html). but still, I don't know how to keep pool management instance alive all the time. once we create a JNDI enviroment or naming, if it will save in the memory automatically all the time? or we must implement it as a daemon thread?
    any hint will be great apprieciated!
    Sam

    To my knoledge the pool management instance stays alive as long as the pool is alive. What you have to figure out is how to keep a reference to it if you need to later access it.

Maybe you are looking for