Please help: Connection Pooling...

Hi everybody,
I am seeking help from our experienced fellows and senior programmers/developers.
I am working with Struts framework, TomCat and JavaBeans and developing a website.
I wanna make my own Connection Pooling class to handel all the connections.
Actualy, I don't wanna make Connection to the DB through my each Action Classes,
which are accessing the Database.
Would you please advise me that how it is possible and how I will refere to
my Connection Pooling Class within Struts framework. And if possible just give the
hints about the structure of the Connection Pooling Class.
Your kind help will be highly appreciated...
VeeJay...
[email protected]

Hi..
Is it a requirement that u must use u'r own connection pool??
Coz each application server provides its connection pool.why dont u exploit one of those.. as u r using tomcat, definitely it wud also be providing a pool of its own.
Kris

Similar Messages

  • Urgent, please help-- connection does not close

    Hi,
    We are using Txdatasource, Oracle thin driver in WLS6.1 sp2. The problem we have
    is that we open connection and pass the connection as parameter to third part
    tool to generate report, but the tool doesn't close connection after finish, then
    the connection is left never being closed, and our connections in connection pool
    soon used up, have to restart weblogic to reset. the connection pool is set to
    allow shrink, but those connections are not recycled. Please help, how do we somehow
    set up WLS or database so that if a connection is not used for some time system
    automatically close connection? Thank you very much. your help is greatly appreciated

    Hi Chun,
    I don't think it's possible whithout changing code. Primaryly it's because
    it hard to tell whether connection is abandoned or still in use. So you have
    to make changes in your code.
    Regards,
    Slava Imeshev
    "Chun" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi,
    Thanks for reply. The reporting tool is supposed to close connection butit didn't.
    And now we need some quick fix on it without touching code.
    Seems like the used connection can not be garbage collected because theconnection
    I used yesterday is still not recycled today. ( I monitor JDBC in WebLogicConsole,
    the "connections" column on "Monitoring" didn't change). No matter how bigI set
    the maximum number of connections, the connections will use up finally andwe
    have to restart WebLogic server.
    Is there any way to make connection drop after some time?
    "Slava Imeshev" <[email protected]> wrote:
    Hi Chun,
    "Chun" <[email protected]> wrote in message
    news:[email protected]...
    We are using Txdatasource, Oracle thin driver in WLS6.1 sp2. The
    problem
    we have
    is that we open connection and pass the connection as parameter tothird
    part
    tool to generate report, but the tool doesn't close connection afterfinish, then
    the connection is left never being closed, and our connections inconnection pool
    What prevents you from closing connection after control is returned
    back from the reporting tool?
    soon used up, have to restart weblogic to reset. the connection poolis
    set to
    allow shrink, but those connections are not recycled. Please help,how do
    we somehow
    set up WLS or database so that if a connection is not used for sometime
    system
    automatically close connection?Weblogic closes connections that were not returned to the pool when
    they are GC-ed. Yet you should not relay on this feature as by the
    moment a connection is closed the pool maybe already used up.
    The other option I was thinking about is that it's possible to size
    of the pool you use is too small for the application. Did you try to
    increase (let say double) size of the pool?
    FYI having shrinking and refresh enabled doesn't make much
    sense in most of the cases. You can improve performance and
    stability of your application by setting initial number of connections
    to max and setting refresh period to let say 99999.
    Hope this helps,
    Regards,
    Slava Imeshev

  • Please help : connection in the LAN

    hello every one ...
    I have a Lan network .. i want to enter another PC by using JAVA ...
    I Know the User Name and the password ... so how can i do that ...
    please help ...
    best regards

    Again, what do you want to do once you connect?
    If you want to run command line programs you can use Telnet. To do this you will need to obtain a telnet server that you can run on the other machine. Most Unix and Linux systems come with one of these. For windows you will need to buy one or find a good Open Source or freeware server. If you have the cash (about $300USD) you can get the Hummingbird Exceed software, it has a Telnet and FTP server built in. As we all know Windows = M$.
    Once you have the server you can write a client to run commands, reply 7 to Telnet to Unix box from Java App provides a simple swing client to run commands over telnet.
    Another choice is to write both the client and the server. I've posted examples of how to do this on this forum. My examples are just a simple multiuser chat program, but the code could be adapted to other uses.
    Again, the question is, what is your requirement?

  • Please Help - Connection Refused

    Hello,
    I am having trouble connecting to cloudscape database, have been working OK for the past
    couple weeks with an application that I have writen but now big problems!
    java -Djdbc.drivers=COM.cloudscape.core.RmiJdbcDriver Testjava.sql.SQLException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect
    at RmiJdbc.RJDriver.connect(RJDriver.java:156)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at COM.cloudscape.core.RmiJdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at Test.getConnection(Test.java:14)
    at Test.main(Test.java:54)
    *I am running cloudscape
    *set the class paths to point at
    - RmiJdbc.jar
    - cloudclient.jar
    I have written a small test program to check problem,
    //////////////////////////////////CODE LISTING/////////////////////////////////////////////
    import java.sql.*;
    import java.util.*;
    public class Test
    { static Connection conn = null;
    static Statement stmt = null;
    static ResultSet rset = null;
    private Test()
    public static Connection getConnection(String url) throws SQLException
    { DriverManager.setLoginTimeout(10);
    return DriverManager.getConnection(url);
    public static void close(Statement stmt)
    { if(stmt != null)
    { try
    { stmt.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void close(Connection conn)
    { if (conn != null)
    { try
    { conn.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void close(ResultSet rset)
    { if (rset != null)
    { try
    { rset.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void main(String [] args)
    { try
    { String url= "jdbc:cloudscape:rmi://localhost:2005/cloudscapeDB;create=true";
    conn = getConnection(url);
    stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    }catch(SQLException e)
    { e.printStackTrace();
    close(rset);
    close(stmt);
    close(conn);
    Please Help me!!!!

    It is obvious that noone is going to reply to me, so I have kind of solved this for myself,
    for some unknown reason my origonal program that worked fine doesnt now.!?!?!??!?
    However decided to approach problem from another side, and give both my desk and head a break.
    Below is now how I am connecting to a database and return a connection to it, it works,
    public static Connection getConnection() {
    String databaseName = "jdbc:rmi://" + "localhost" + ":1099/jdbc:cloudscape:CloudscapeDB;autocommit=true;create=true";
    try {
    Class.forName("RmiJdbc.RJDriver");
    } catch (ClassNotFoundException e) {
    System.out.println("PopulateTables: caught getting connection: " + e);
    Connection con = null;
    try {
    con = DriverManager.getConnection(databaseName); // , user, password);
    } catch (java.sql.SQLException se) {
    System.out.println("PopulateTables: caught getting connection: " + se);
    return con;
    Thanks me.

  • Please please help connect RIM 957

    Can someone help me connect an old RIM 957 to the pc?I need the oldest desktop softwere possible,preferable 2.1 (i have 3.5 but it will not recognise the device)
    I have an RS232 to USB adapter with the drivers installed,works well cuz i successfully connected a Blackberry 5820 with it.But it won't find my good old 975.I am running on Windows 7.
    Please help,i've been searching for a solution for months..

    Hey gsm_dealer08,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    This will not work on Windows® 7, as these previous versions of BlackBerry® Desktop Software 3.5, 2.1 and 2.0 are not designed to work on Windows® 7.
    If you have an other PC running Windows XP, it will work with the BlackBerry Desktop Software 3.5.  However all of the old desktop software is not available to download from our site (www.blackberry.com/desktop).
    http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/8179/271479/Supported_softwa...
    I hope this info helps you out.
    Let me know if you have any more questions.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Please Help Connection Error

    This is going to be long so apologies in advance. Okay here goes. My computer is set to reset every time it's cut off; Meaning i have to reinstall my web browser every time i use it. This is not a problem, actually it's preferred. Anywho i use Firefox and as you all know FireFox doesn't come with Flash Player like Google Chrome so up until now i've been installing Flash with absolutely no problems and then one day i'm installing Flash and i notice the installer window is light grey and yellow not black like it use to be.
    i go ahead with the installation and it stops at 5% and says "Connection Error" i try again and the same thing happens and it only allows me two tries. i look up at the url and i see get2.adobe.com/flashplayer/ notice the number "2"? Anyways i turn my computer off and back on again i reinstall FireFox and go to install Flash again and the "2" and the old black install window pops up and everything works normally. This happened off and on for weeks so now i know that when there is "2" in the url to restart the computer til there isn't one. This was an inconvenience but i could live with it.
    But now there is no "2" in the url but it still displays the light grey window and won't let me move pass 5% no matter how much i restart my computer it does that. And i've noticed i'm not the only one having this problem. i've tried everything that i know to get this thing to work. Older versions of Flash Player and offline installers keep telling me to uninstall FireFox but that's my web browser of choice. And i hate Chrome with a passion; So please can someone here help me because i'm totally stumped, Thanks in advance.
    My system is Windows XP 32 Bit

    tylerxx
    Don't understand your Firefox problem as you described it with repeated installing - sounds like a portable installer version. With regards to the rest of you comments:
    The get2.adobe.com/flashplayer/ and get.adobe.com/flashplayer/  are not significant the first one is an alias to the second one. Adobe flash has this bizzare (read F**ked up)  installer that upon completion will delete itself. This is absolutely something that NO OTHER INSTALLER DOES and in this case where an error is encountered it is absolutely the WRONG WRONG WRONG thing to do. This is a stub installer that goes and gets the real installer. Why does it exist ? Probably to make it easy to add extra stuff on your PC such as "McAfee Security Scan Plus".  Quite similar to CNET Download.com which I do not trust any longer for similar behavior.  You are correct in that the message "connection error" you get a "retry" button so 2 tries then the installer gives up exits and deletes itself. Just make a copy of that file - it's only 1- 2MB and keep it in a folder and then make a copy the installer before each run. That will save you going to get.adobe.com/flashplayer/ every time to get the same installer. Once the problem is fixed you get rid of that installer file.

  • Please help: connection refused on localhost

    I'm using RMI in a BEA WebLogic 7 environment. I've written an RMI object that
    registers itself (with Naming.rebind) in its main method:
    myObject mo = new myObject();
    Naming.rebind("//localhost:7001/my_object", mo);
    I am importing standard RMI packages, not WebLogic RMI packages. The code itself
    appears to be fine, and I have deployed it as a startup class in WebLogic 7. Problem
    is, when I restart WebLogic and that Naming.rebind call is executed, it returns:
    java.net.ConnectException:
    Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect (Native Method) ...
    I am running WebLogic on port 7001 on my local workstation, which has a dynamic
    network IP,
    so I need to bind at either 127.0.0.1:7001 or localhost:7001. I have tried both
    repeatedly in my code, with and without the port number, and everything fails.
    I also played with the Socket permissions in the weblogic.policy file and fileRealm.properties
    file, but still no connection. I'm at wit's end. Can you help, please?

    I am having the same problem. Surprizing thing is the creator (SAP) itself is not solving the problem.
      created: jce/
    inflated: jce/local_policy.jar
    inflated: jce/US_export_policy.jar
    inflated: jce/README.txt
    inflated: jce/COPYRIGHT.html
    C:\DOCUME1\ADMINI1\LOCALS~1\Temp\sapinst_exe.1164.1274306683
    jre\jce\COPYRIGHT.html
    C:\DOCUME1\ADMINI1\LOCALS~1\Temp\sapinst_exe.1164.1274306683
    jre\jce\local_policy.jar
    C:\DOCUME1\ADMINI1\LOCALS~1\Temp\sapinst_exe.1164.1274306683
    jre\jce\README.txt
    C:\DOCUME1\ADMINI1\LOCALS~1\Temp\sapinst_exe.1164.1274306683
    jre\jce\US_export_policy.jar
            4 file(s) copied.
    Start mode: gui (Gui only)
    Connection parameters:
      GuiServer host: localhost
      GuiServer port: 21212
      GUI mode      : normal
    Starting...
    <<< frog.jar: version 7.20.12 06/06/08 sap.theme: null >>>
    Exit status of child: 1

  • Please help - Connection Refused - Mac to Windows Server 2012

    I have downloaded MS Remote Desktop onto my brand new Macbook Air OS X and have tried to connect to my school network - which when logged in says it is "Windows Server2012"
    However each time I try to log in it simply says connections refused.  Nothing more.
    Not sure what I can do next.
    Thank you for any help,
    Laura

    Hi Laura,
    Thank you for posting in Windows Server Forum.
    Are you trying to remote desktop with IP address or hostname?
    Please try both alternate way and check is there any difference between them. Also as suggested by Manouchehr Omari, please see that you have remote desktop enabled on server 2012 and related RDP port (3389) opened for remote connection to take place under
    firewall setting. If possible for a try disable firewall and check. You can get more troubleshooting information from beneath link.
    Remote Desktop Client on Mac: FAQ
    http://technet.microsoft.com/en-in/library/dn473006.aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Please help , "Connection refused: connect "

    hello,
    i have got this exception while connecting to server ?
    what does it mean ? and what can i do to solve this problem ?
    this is so important for me ! i have to solve this in a short time.
    thanks for helps.
    Musa YILMAZ
    // == ERROR
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection refused: connect
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765)
    at com.mysql.jdbc.Connection.<init>(Connection.java:430)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at pi.a(pi.java)
    at pi.b(pi.java)
    at Main.<init>(Main.java)
    at tk.run(tk.java)
    at java.lang.Thread.run(Unknown Source)
    ** END NESTED EXCEPTION **

    You are trying to connect to wrong host or port number
    or
    MySQL server that you are trying to connect is not running

  • PLEASE HELP connect me

    I have a MacBook Pro and I'm trying to connect via the internet to a friend's PowerBook G4.  I tried Remote Desktop Connection and it's only for connecting to a Windows machine.  I tried downloading Remote Desktop Client which I though was for connecting mac to mac and it wouldn't load onto my hard drive because I have a newer version (which I can't find to save my soul).
    Can't someone out there tell me how I can connect to this G4 and what program will and will not work?????
    I have the ip address and the user name and password.
    HELP!!

    Thank you for answering my Remote question.  Unfortunately, I still am unable to connect.  Here's what I've tried:
    1.  Double checked that Remote Management is checked
    2.  Double checked that her computer is not asleep
    3.  Put in the administrator name and password on the Remote Desktop Program on my side
    Question:
    1.  Does the other computer need Remote Desktop?
    2.  We are both running WIFI - I have Airport Extreme 802.11n and she has the older version of Airport.  Do I have to go through them or configure them in some way?
    I SO appreciate your help.
    Kristie

  • Please Help Connect MV8000 with LOGIC PRO 8

    Hello I have a MV-8000 , a Korg Triton, and an iMAC with Reason, and LOGIC PRO 8.
    I can use them all pretty well separately,but that is the problem: they are all SEPARATE music stations. SO I really want all to work seamlessly with each other. I want my main work station to be Logic.I can create the basic beats and tunes on the MV-8000 and then fix them up and sequence them on Logic. I also want to have access to reason through Logic as wel. If anyone one could help me by telling me what is needed to be done or showing me a website that explains in details how I can make all four systems work flawlessly together.
    If this message is to vague I found someone who was in my exact same predicament.Click this link and he can explain better than I can what I want to do . http://logicprohelp.com/viewtopic.php?p=5683&sid=b97ff1f90561a135cc8a6f556e75496 5
    Thanks so much

    Hi, could you give more info as far as what type of input device if any you are using? Firewire, usb, name and model? Running reasons into Logic Pro 8 is pretty simple by following theses steps.
    1. Make sure Logic is started first if you want it to be the host (master)
    2. In logic insert new external midi track
    3. Open Reasons (there are several ways of doing this but here is one) load an instrument no mixer needed in Reasons in this method, if the instrument is stereo it will automatically be routed to 1-2 of the Audio Device in Reasons, manually move them to 3-4 (next stereo instrument 5-6 and so on)
    4. Go back to Logic open up the mixer, Click options> create new aux channel strips, the new auxillary window opens, the number box has 1 for the track you are adding. change format to stereo if working with stereo, input would be 3-4, leave out put alone, click create
    5. Finally go to the external midi track you created in step 2 make suer ibrary is showing on the left and click reasons and the reason istrument you added. You should be able to record the reason instrument within Logic now.

  • Please Help Connection problems G4 and Airport Extreme

    I have a G4 Quicksilver and a Airport Extreme Base Station. Wireless internet has been working great for several years. Purchased a new G5 and moved my G4 upstairs one floor. The G4 airport connection worked fine for about one day. Now everytime the G4 sleeps or restarts it can't find the AEBS. Lines in airport icon on desktop turn from black to gray. I opened Airport Admin Utility and AEBS does not show up. I know the signal is getting to that room because I also own a G4 powerbook and can connect with it. If I open internet connect and turn airport off and on I can sometimes get the signal back and connect but loose it as soon as the computer goes to sleep. If I bring the G4 back down stairs where the AEBS is I can connect no problem. I took out the airport card and reseated it and made sure the antenna connection wash pushed in all the way but no luck. Any Idea?

    You may check the following points:
    1. Do you have neighbouring wireless networks on the upper
    floor?
    2. What are your walls and floors made of? How many of them
    are you crossing from your AEBS to your G4?
    Are you passing through all of them perpendicularly?
    3. With Internet Connect open, try to move and turn your
    G4 to improve the signal strength. Does it change a lot?

  • Please help: connection issues (ATT, Time Capsule and xbox 360 live)

    I am having near constant issues with my home network, so I am hoping to tap in to the collected knowledge of the internets to help sort things out.
    Main issue: daily/hourly internet disconnection. Now, my 360 wireless adaptor can't even see the network. Ugh. Basically, I am hoping someone could give me the "best" configuragtion (ie settings for network, Time Capsule, 360 and/or wireless adaptor) for my current set-up.
    My set up:
    LinkSys modem from ATT (in bridge mode)-->
    Apple Time Capsule (router) -->
    Mad Catz 360 wireless network adaptor -->
    Xbox 360
    I have spent some time looking through the forums but keep running into conflicting recommendations and nothing I have tried so far seems to have helped. Thanks (in advance) for the help.

    So, you must have somehow reconfigured the 2wire to perform as a simple modem, even though it is a full fledged modem/router combination. I've see the 2wire, but never configured one, so I can't offer a lot of help there.
    Was there a particular reason why you configured the 2wire as a bridge when you could have simply configured the TC as a bridge to work with the 2wire? In other words, the 2wire would do the PPPoE service along with DHCP and NAT.
    Maybe you tried it this way and something didn't work?
    We've seen a number of posts from users who are having issues with the TC doing the PPPoE service. I just wonder if you are not betting off letting the 2wire do what the ISP intended it to do.

  • Is connection pooling and sharing available on Oracle 9i RDBMS ?

    Hello,
    I would like to connect from oracle to sql server through db link and ODBC (Heterogenous connectivity). But every session in oracle launch session in sql server. Is it possible to have connection pooling and sharing from Oracle RDBMS level ? I need one solution : when (for example) i run 100 sessions in Oracle i would like to see 10 sessions on sql server. I would like remain 90 sessions from oracle to be queued.
    I would mention that i was using Heterogenous connectivity with multithreading agent (agtctl) without success.
    appreciate any help :-)

    There are two concepts you could evaluate, but they are mainly used for connections to the database, not to sqlserver, but if you can make them work with heterogeneous connectivity this could help:
    Connection Pooling. When many sessions are connecting to the same database, it could be that some of them remain idle. Oracle can detect them and timed them out letting another session to enter into the database, letting the idle session remain open without closing its session. This is configured by means of the shared server architecture.
    Session Multiplexing. Session multiplexing allows the same bandwidth to be used by many sessions at the same time, this enables the server to use fewer network connection endpoints for incoming request. In order for you to configure session multiplexing you have to configure connection manager.
    Ref. Oracle® Database Net Services Administrator's Guide
    10g Release 2 (10.2)
    Part Number B14212-02
    ~ Madrid
    http://hrivera99.blogspot.com/

  • HT204053 I have a just purchased my first iPod touch and i cannot transfer my music from my laptop to the iPod. The sync button doesn't appear to work.  What am i doing wrong? Please help this frustrated Grandma. I am trying to keep up with technology!

    I have just purchased my first iPod touch and I cannot transfer my music from my laptop. The sync button does not appear to work. What have I done wrong? I am a grandma trying to keep up with technology please help.

    Connect it to your computer and restore it as a new device. Then chose what music you want to sync with it and do so just like your Touch does.

Maybe you are looking for

  • Row limit in declarative list view web part

    Hi, Imagine you are in a scenario where you develop a custom web template or a site definition. Page Layouts with web part zones are being provisioned and out of them, decoratively web part pages are being created and populated with web parts. So som

  • REGARDING ALV REPORT SHORT DUMP

    hI ALL, IAM GETTING FOR THE FOLLOWING CODE, PLEASE WHY THE ERROR IN ECC 6.0 TABLES AND DATA DECLARATION. *TABLES: mara,makt.",marc. data syrepid like sy-repid. data sydatum(10). " LIKE sy-datum. data sypagno(3) type n. WHEN USING MORE THAN ONE TABLE

  • "Accessing Apple TV" has taken over 5 minutes

    We just installed a second Apple TV. Unlike the older one, this one is capable of 1080p. However after selecting a movie for the first time on the new Apple TV, the words "Accessing Apple TV" and the spinning gear have remained on screen for close to

  • Rogue Redirect HELP Please!

    I have designed and implemented a scroll page with a Lightbox Image Gallery a couple of weeks ago. When it went live it acted just fine. Everything worked as it should have. Now, regardless of browser (and even in muse preview), when a thumbnail imag

  • Disney Phonics Quest

    I'm a proud owner of a new 20" iMac and one of the first things I tried to do is get Disney's Interactive Phonic's quest installed for the kids. When I click on the install icon, it tells me I can't open this application because it's not supported on