Help needed : javamail Too many simultaneous connections

Hello
i'm using javamail to develop a webmail
i've created a service Class , and all things works well , but i have a serious problem when i browse my webmail ( viewing folders: inbox / spam / etc or messages) i get an error saying :
Too many simultaneous connections. (Failure)
i know that the imap server dosen't support more than 10 simultaneous connections.
But i can't say to users using my webmail to do not a lot of actions !!! , and also when i use thunderbird for example it works fine without errors even if i do a lot of actions/connections
How can i solve that problem ?
Thanks
A1 OK [email protected] authenticated (Success)
A2 CAPABILITY
* CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
A2 OK Success
A3 SELECT INBOX
DEBUG: no connections in the pool, creating a new one
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* OK [UIDVALIDITY 616267767]
* 7 EXISTS
* 0 RECENT
* OK [UNSEEN 1]
* OK [UIDNEXT 90]
A3 OK [READ-WRITE] INBOX selected. (Success)
A4 STORE 1 +FLAGS (\Seen)+
+* OK Gimap ready for requests from MyIP 24if2631473eyx.55+
+A0 CAPABILITY+
+* 1 FETCH (FLAGS (\Seen))+
+A4 OK Success+
+* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY+
+A0 OK Thats all she wrote! 24if2631473eyx.55+
+A1 LOGIN myemail mypwd+
+A1 OK [email protected] authenticated (Success)+
+A2 CAPABILITY+
+* CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
A2 OK Success
A3 SELECT INBOX
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* OK [UIDVALIDITY 616267767]
* 7 EXISTS
* 0 RECENT
* OK [UNSEEN 1]
* OK [UIDNEXT 90]
A3 OK [READ-WRITE] INBOX selected. (Success)
A4 STORE 1 +FLAGS (\Seen)
* OK Gimap ready for requests from MyIP 23if2388548eya.46
A0 CAPABILITY
* 1 FETCH (FLAGS (\Seen))
A4 OK Success
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY
A0 OK Thats all she wrote! 23if2388548eya.46
A1 LOGIN custom.infoma1 mypwd
A1 NO [ALERT] *Too many simultaneous connections. (Failure)*
A2 LOGOUT
* BYE Logout Requested 23if2388548eya.46
A2 OK Quoth the raven, nevermore... 23if2388548eya.46
A4 CLOSE
A4 CLOSE

Thunderbird supports disconnected or offline operation. It can disconnect from the server and then reconnect later
and synchronize its state, so that you never know it was disconnected.
You can do that too, but it's a lot of work.
For webmail, the simplest approach is usually to have only one folder open at a time for each user.
If your IMAP server is limiting you to 10 connections total, across all users, get a new IMAP server.

Similar Messages

  • I can´t send or receive emails theres a message Too many simultaneous connections. (Failure)

    What can I do if theres a message that says Too many simultaneous connections. (Failure) an error in IMAP conection
    I can´t send or receive any emails

    Hi monic,
    I'm sorry to hear you are having mail issues on your Mac. I'm a bit unclear exactly which version of OS X you are currently using, but if you continue to have issues sending or receiving emails, you may find the troubleshooting steps outlined in the following article helpful:
    OS X Mail: Troubleshooting sending and receiving email messages - Apple Support
    Regards,
    - Brenden

  • Too many simultaneous connections. (Failure)

    Hi there,
    Here are the facts:
    Two MAC MINI. Both OS X 10.9.2. One from 2009 and the second from 2010. Both are using same MAIL application with same version. On both MAIL I set three GMAIL accounts that were working perfect last week. A day ago on MAC 2009 the GMAIL accounts stopped working anymore due to that error.
    There is no other gadgets in house using any kind of email application to read Gmail emails. Mac 2009 is on LAN while MAC 2010 is on WiFi. Both are logged to same router so there are using same Internet connection: a Fiberlink 100Mb connection.
    There are a total of 7 email accounts set on each MAC. The rest are working fine.
    Why I have that issue only on MAC 2009? How can I solve it?
    Warm regards,
    Sebastian

    I will support your theory on the cable modem being the problem.
    My internet connectivity was horrible with an Aris.  Oceanic provided me a new cable modem (a Ubee).  It was still horrible.
    Using netstat I found "tons" of TCP connections in other-than "ESTABLISHED" state.
    Neither the Aris or the Ubee had an obvious way of configuring it into "bridge mode".
    After a lot of searching around I found this link:
    http://www.jaredwatkins.com/2011/01/putting-the-ubee-cable-modem-from-time-warne r-in-bridge-mode/
    There are other links that provide the same information.  You should refer to more than one before you muck around with this.
    Once set in bridgemode, DHCP/NAT functionality was performed by my Apple Airport Express (Tower).  Netstat now rarely shows connections in anything other than ESTABLISHED state.
    I will be replacing my rented Ubee with an owned Motorola next week which will save me about $6/month.  The Ubee will still be here but only to provide phone service.  (Although Oceanic might provide a different kind of modem.)

  • The server for account "Gmail" returned the error "[ALERT] Too many simultaneous connections. (Failure)." Your username/password or security settings may be incorrect. Would you like to try re-entering your password?

    Continually receive this message when working - can not be on Safari and doing email at same time. I talked to Apple support and they say it is a Microsoft issue and Microsoft says it is an Apple issue, but very very painful to keep getting this message all day.
    Thanks

    http://support.google.com/mail/bin/answer.py?hl=en&answer=97150
    Long thread with several suggestions...
    https://discussions.apple.com/thread/2547839?start=15&tstart=0

  • Too many simultaneous persistent searches

    The Access Manager (2005Q1) in our deployment talks to load-balanced Directory Server instances and as recommended by Sun we have set the value of the property com.sun.am.event.connection.idle.timeout to a value lower than load-balancer timeout.
    However on enabling this property, we see the following error messages in the debug log file amEventService:
    WARNING: EventService.processResponse() - Received a NULL Response. Attempting to re-start persistent searches
    EventService.processResponse() - received DS message => [LDAPMessage] 85687 SearchResult {resultCode=51, errorMessage=too many simultaneous persistent searches}
    netscape.ldap.LDAPException: Error result (51); too many simultaneous persistent searches; LDAP server is busy
    Any idea - why this occurs?
    Do we need to modify the value associated with the attribute nsslapd-maxpsearch ?
    How many Persistent searches does Access Manager fire on the Directory Server ? Can this be controlled ?
    TIA,
    Chetan

    I am having an issue where the Access Manager does not seem to fire any persistent searches at all to the DS.
    We have disabled properties which try to disable certain types of persistent searches and hence in reality there should be lots of persistent searches being fired to the DS.
    Also, there does seem to be some communication between the DS and the Access Manager instance. ....as the AM instance we work on talks only to a particular DS instance. But they do not seem to find any persistent searches being fired from our side at all....the only time they did see some persistent searches was when I did a persistent search from the command line.
    What could be the issue??
    thanks
    anand

  • SMTP Send Mail - too many authenticated connection...

    Using Outlook on a MAC, and within this last week I have started to get this error when sending mail. I have read all the forum posts and help documents on this issue and ensured that my settings are as described and yet I am still having this problem.
    Should I be switching to IMAP to avoid this problem, and if so how do I do that without losing all my SMTP downloaded email?
    Thanks for any insight - it is causing me real issues now as I'm job hunting and can't reply to job emails!!!!

    Yes same problem for me. In the last three days, or so, I will get the random "too many authenticated connections" message. I have just phoned BT twice this afternoon and had great trouble understanding both Indian guys. One suggested he's fixed it by adjusting things at BT to accept "S Client Mail", whatever that means! That however didn't fix it. The second suggested I needed to reset password (easy option that one), until I pointed out that I am having no trouble with password use on the BT webmail page or through my phone. He then said I'd have to reload Outlook to solve the problem. Yeah right, like I'm gonna loose all my emails, settings and calendar to satisfy his theory of "if it doesn't work then reload it". There is clearly a server problem somewhere and OH, how I would love to speak to someone, (anyone), at BT who actually knows what they are talking about from a network/server angle. Anyone worth their salary in networks could trace my activity online and find out what was going on and why it was failing.
    Setting POP3 and all others checked by BT as being correct.

  • Too many authenticated connections

    I've got a customer with a BT line, sending via mail.btinternet.com.  For the last month or two they've complained that they keep getting asked for their password. 
    I've checked out the customer's system and I can see that it's not a password problem, but the SMTP server is instead coming back with "too many authenticated connections". 
    I can see that a host of BT customers on here are reporting password problems, I would guess that they are experiencing the same issue, that these are not password problems, but SMTP server issues on BT's new mail systems.  The message would suggest that the server is unable to take any more connections so some sort of resource issue at their end.
    Of-course unless you're looking under the bonnet of the SMTP connection, you won't be seeing this message, just the popup asking for your password again. It's not a password issue. If you try the connection multiple times, it will go in the end (when you get a connection that is willing to be accepted by the SMTP server. 
    I've configured the mail client to the letter, as per BT's stated configuration, and like I say, it will work on a percentage of connections. On a good run, you might get 10 out of 10 successes, other times 1 in 3.
    Please let me know if anyone is experiencing the same message.  The message could perhaps be a red-herring of some kind, perhaps not able to successfully negotiate the authentication / encryption using this particular mail client.  The customer is using Mac Mail and there do appear to be quite a few customers referencing Mac's / IOS on this forum, not many Outlook customers complaining.

    Hi Bookanengineer,
    Many thanks for your post, we have been away and asked some questions around this and the view is that this is unlikely to be an SMTP load issue. There is a limit to the number of authenticated connections we allow per user and the password pop ups being seen are more likely to be due to the customer having too many authenticated connections which could also be due to sessions not being closed correctly
    We believe that this is more likely to happen to client users as each time your client connects it opens an authenticated session. If, when you disconnect, the session does not close for whatever reason, the mail server still shows you with a session open. If that happens often you will quickly hit the limit for the number of sessions allowed per customer
    We do however need to eliminate other issues so need examples to further investigate, I appreciate that you are speaking on behalf of one of your customers, but  if you are able to send in any details to us so we can take a look that would be great. You can send in the details using the "Contact The Mods" link found in my profile.
    Thanks
    PaddyB
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • ORA-30678: too many open connections

    Hi,
    I executed this procedure..
    CREATE OR REPLACE procedure
    TRY.e_mail_message
    from_name in varchar2,
    to_name in varchar2,
    subject in varchar2,
    message in varchar2
    is
    l_mailhost VARCHAR2(64);
    l_from VARCHAR2(64);
    l_to VARCHAR2(64);
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    l_mail_conn UTL_SMTP.connection;
    mesg VARCHAR2( 4000 );
    BEGIN
    select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
    select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
    l_from := from_name;
    --UTL_SMTP.open_data(l_mail_conn);
    dbms_output.put_line('email test ');
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: <'||l_from||'>' || crlf ||
    'Subject: ' ||subject|| crlf ||
    'To: '||to_name || crlf || '' || crlf ;
    mesg:=mesg||message;
    dbms_output.put_line(mesg);
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, to_name);
    UTL_SMTP.data(l_mail_conn, mesg);
    UTL_SMTP.quit(l_mail_conn);
    exception
    when others then dbms_output.put_line(sqlerrm);
    END;
    However, email could not be sent to recipient. Below is the error message.
    Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    call email_mssg cmd 3
    email test
    Date: 23 June 10 15:11:50
    From: <>
    Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    To: [email protected]
    Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
    ORA-30678: too many open connections
    Below is the username I keyed in the email_setting table, with reference to the select username statement from the procedure as above.
    username in email_setting => [email protected]
    I also tried key in as '[email protected]' but still not working.
    Could someone suggest any solution? Thanks..

    Mr. Saubhik,
    Yes, no data passed for the From: as shown from the dbms output error message shown below:
    Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    call email_mssg cmd 3
    email test
    Date: 23 June 10 16:15:04
    From:
    Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
    To: [email protected]
    Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
    ORA-29279: SMTP permanent error: 501 5.1.7 Invalid address
    I am clueless how to settle this. I don't want to hard code the sender's email address. Please help. Thank you.

  • Too Many open connections. UTL_HTTP

    I am submiiting The URL for multiple times.
    So i am getting the too many open connections error. How to avoid the code.
    For your reference i have attached my code.
    DECLARE
      req   UTL_HTTP.REQ;
      resp  UTL_HTTP.RESP;
      value VARCHAR2(1024);
      url   VARCHAR2(4000);
      OPT   varchar2(1000);
      CURSOR MOB IS SELECT MOB FROM MOBILE_NUMBER;
    BEGIN
    -- UTL_HTTP.SET_PROXY('proxy.my-company.com', 'corp.my-company.com');
    FOR I IN MOB
    LOOP
    DBMS_OUTPUT.PUT_LINE(I.MOB);
    URL:='http://www.meru.co.in/wip/sendsms?username=11|'&'||'password=11|'&'||'to='||I.MOB||'&'||'message=this%20is%20shanmugam';
    DBMS_OUTPUT.PUT_LINE(URL);
      req := UTL_HTTP.begin_REQUEST(url);
      UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0');
      resp := UTL_HTTP.GET_RESPONSE(req);
      UTL_HTTP.READ_LINE(resp, value, TRUE);
        DBMS_OUTPUT.PUT_LINE(value);
      END LOOP;
      UTL_HTTP.END_RESPONSE(resp); 
    EXCEPTION
      WHEN UTL_HTTP.END_OF_BODY THEN
        UTL_HTTP.END_RESPONSE(resp);
    END;how to close the connection for each record????
    Can anyone help me out in this??
    Thanks in Advance.
    Cheers,
    Shan

    Move UTL_HTTP.END_RESPONSE(resp); inside the loop. I mean
    UTL_HTTP.END_RESPONSE(resp);
    END LOOP;

  • UTL_MAIL --- ORA-30678: too many open connections

    Hello,
    I have a pl/sql package that sends out emails using UTL_MAIL pkg pointing to an Exchange server, an APEX app calls this pkg.. This package used to work fine for months but I recently noticed that some emails are not being sent as expected. The package loops through a set of action items satisfying some conditions and send emails based on that ( this number is expected to grow every day ). I checked the errors log and I found this error:
    ORA-30678: too many open connections
    I think this means that I have to close the connection everytime I send en email, but UTL_MAIL does NOT have a function or a proc to close connections, right ?
    I don't know what causes this error to happen, but I suspect that this started happening right after we re-pointed the UTL_MAIL pkg from a Lotus Notes server to an Exchange server.
    I am also seeing this error:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    I know where this error comes from (usually a null email id in the FROM or TO field ), but can this be causing the first error to happen ?
    Please advise if you got this error before, is it a bug in oracle 10g as I read in some blog ? or is the second error happening make the Exchange server refuse SMTP connections ???
    Thanks,
    Sam

    Hi Sam,
    seems to be a bug in UTL_MAIL if you ask me, as you are right - there is only /send/, no option to close, so I'd expect this to be done automatically.
    Anyway, though UTL_MAIL is usable for basic mailing, I prefer using a custom mail implementation based on UTL_SMTP. The most important reason is that most mail servers don't work without authentication. And if you have done this once, you can reuse the function/procedure/package as simple as UTL_MAIL. The good news is, that there are several examples published that provide you with the functionality you have in UTL_MAIL at once - with the difference, that you definetly get your connection closed when you expect it to be closed.
    You'll also be able to handle empty addresses. Perhaps this error actually causes UTL_MAIL to "forget" to close the connection, if this exception isn't caught before in order to close an open connection before raising it to the outside.
    One example implementation for using UTL_SMTP can be found [url http://www.morganslibrary.com/reference/pkgs/utl_smtp.html]here
    -Udo

  • Too many database connections and configurator logins ?

    Hi,
    We're having some performance and/or stability problem with Oracle Waveset 8.1.1. patch 2.
    I'm not sure what the problems is yet, but two facts got my attention:
    I noticed for too many database connections waiting to be closed on the OS, varying between 600 and 1200 :
    TCP: IPv4
    Local Address Remote Address Swind Send-Q Rwind Recv-Q State
    doesburg.ic.uva.nl.33555 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33556 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33557 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33558 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    etc.
    (doesburg is our Solaris 10 server where the tomcat application server is installed, hopewell is our Oracle 10g database server )
    I also noticed numerous Configurator logins in the audit log, about 10 per second:
    Audit Event Details
    Timestamp 03/15/2011 04:37:05 PM MET
    Subject CONFIGURATOR
    Action Login
    Result Success
    Identity System Type User
    Object Name CONFIGURATOR
    Server DOESBURG.IC.UVA.NL
    Sequence Number No Value
    Interface BPE
    Resource No Value
    AccountId No Value
    Message No Value
    Changes No Value
    Organization Membership Top
    Event Parameters
    Session ID #SESS#15E4CCFDD2645B36:10C191A6:12EB99FCC85:-5A50
    Configurator logins on the BPE interface which we don't use?
    Has anyone seen something like this before? What could cause it?
    Greetings,
    Marijke

    I'm still struggling with this problem. Our database administrator did add some tracing, and we see these type of queries:
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT task.id, task.type, name, :"SYS_B_0", :"SYS_B_1", summary, :"SYS_B_2", :"SYS_B_3", xmlSize, :"SYS_B_4"
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT object.id, object.type, name FROM object WHERE object.type=:"SYS_B_0"
    SELECT tstamp, id, version, changeType FROM orgchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM rolechange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    541 seperate logon sessions by waveset in about 2 minutes.
    Has anyone seen this? What could cause it?
    Greetings,
    Marijke

  • ORA-30678: too many open connections with UTL_MAIL.send

    I'm have just recently started getting the ORA-30678: too many open connections error while calling the UTL_MAIL.send procedure to send emails via a pl/sql package. The call is made within a loop and there can be a significant number of calls made to this procedure. In fact, I received this error over 1400 times within the last three days. This was previously working until I made a change to the processing which now results in a larger number of emails/calls to this procedure. I don't see any documentation on how (or if) I can close the connection with UTL_MAIL.
    I'm using Oracle 11g. Any insight would be much appreciated.
    Thanks,
    Teri

    Looks like a bug possibly, check out this MOS Note:
    Ora-30678: Too Many Open Connections From UTL_MAIL [ID 788442.1]
    The bug note says it was fixed in 11.2. Not sure which version of 11 you are running.
    Edited by: Centinul on Apr 26, 2010 2:07 PM

  • Too many SMTP connections kills server?

    I have a client who until recently had an old G4 server running 10.2.8. This server crashed regularly, usually when they sent out their email mailshot. I recently put in a new G5 running server 10.4.5 and all seemed well until they sent out the next mailshot, and hey presto the server went down.
    The mailing goes to thousands of opt-in subscribers; it is NOT sent by the OSX server; it's sent out by one of those web-based services. However, the reply address IS to the server and they get a lot of 'out of office' type returns as well as bounces.
    The server went down within 30 minutes of the mailing going out and from the log I estimate the server had about 40 open inbound SMTP connections running all at the same time, and the last 25 entries before the crash are all 'connect from <server-name>...' (different servers) and all within about a minute of each other.
    Bearing in mind this is a dual-core G5 I don't think the loading should be too much for it. The ADSL is slow (512k) but again I don't see why that should make it unstable. Is it possible that the mail server simply can't handle more than a certain number of simultaneous connections and if so is there a place in a config file where this can be limited to a manageable number?
    Justin

    Alex - totally agree with you about mailing list management. Keep in mind here this is a customer of mine, not me - and I have already suggested to them that such a large number of bounces means they should look harder at their list management.
    Also, I'm not on site right now so there's a limit to what I can do/see but I've inserted defaultprocesslimit = 10 into main.cf and restarted the server. Assuming the majority of returns have already happened I may not know if this has helped until the next mailshot goes out. I also suggested that setting some other address than their own for the return might be a good idea - even a hotmail address. But they don't like this because 'people would see it and think we're a small business' (they are a small business). The bottom line for them is that even if they're in the wrong about that they don't see why their shiny new server should crash because there's a lot of mail coming in.
    Both spam and virus filtering is on, and it's using two real-time blacklists.
    I will try and get some snapshots of the configs tonight.
    Finally, I don't know for certain sure that the server really was past the point of no return. It certainly was 'dead to the touch' but if the customer had been prepared to wait 15 minutes I suppose it might have 'got over it'. I doubt it though; I couldn't make it respond to Timbuktu, SSL, Server Admin, Mail (as a client) or afp. (I didn't try these all at once!) The only thing that worked was ping.
    Justin

  • Too many database connections?

    I have a function that gets called repeatedly from inside a loop. The function opens a connection to the database(DriverManager.getConnection) when it is first called, and closes the connection to the database upon completetion. In addition to this, I have several "permanent" connections while the program is running. My question is, how expensive is making these connections? How many connections are too many?
    Thanks,
    cmp2

    (1) Define a class (Say) MyConnection (like):
    package general ;
    import java.lang.* ;
    import java.util.* ;
    import java.sql.* ;
    public class MyConnection
    public boolean connected = false ;
    public String user = "" ;
    public String password = "" ;
    public String URL = "" ;
    public Connection theConnection;
    public MyConnection() {
    public void getConnection(
    String parmUser,
    String parmPass,
    String parmConnection ) {
    boolean connDriver = false ;
    String connectionDriver = "oracle.jdbc.driver.OracleDriver" ;
    String URLfrount = "jdbc:oracle:thin:@" ;
    try {
    // Make the Connection
    Class.forName(connectionDriver);
    connDriver = true ;
    } catch ( ClassNotFoundException e ) {
    messages.add( "Signon Driver ClassNotFoundException: " + e );
    if ( connDriver ) {
    try {
    URL = URLfrount + parmConnection ;
    theConnection = DriverManager.getConnection(URL, parmUser, parmPass);
    theConnection.setAutoCommit( false ) ;
    connected = true ;
    user = parmUser.toUpperCase() ;
    password = parmPass ;
    } catch (SQLException e) {
    messages.add( "Signon Error: " + e );
    (2) pass this connection from class to class

  • Blocking by too many (100) connections used

    Oracle9iAS (9.0.3.0.0) Containers for J2EE (build 020927.1699)
    I have a container managed transaction and within it I get several connections from an emulated datasource. These connections are supposed to be created within the scope of the transaction and in fact they are.
    The problem takes place when the transaction has many actions to perform and OrionCMTDataSource seems to block at 100. This is tested through the following command:
    java -jar admin.jar ormi://localhost admin *** -application default -dataSourceInfoDataSource info:
    com.evermind.sql.DriverManagerXADataSource/default/jdbc/xa/OracleXADS - cached:
    4 used: 1 total: 5
    com.evermind.sql.OrionPooledDataSource/default/jdbc/OraclePooledDS - cached: 0 u
    sed: 0 total: 0
    com.evermind.sql.OrionCMTDataSource/default/jdbc/OracleDS - cached: 0 used: 100
    total: 100
    Is there a limit of 100 connections defined anywhere?
    Is it configurable?
    Why does OC4J block if number 100 is reached?
    Isn't ejb-location (which i'm using) not supposed to be pooled?
    Any help would be appreciated. My data-source follows:
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="OracleDS"
    location="jdbc/OracleCoreDS"
              pooled-location="jdbc/OraclePooledDS"
              xa-location="jdbc/xa/OracleXADS"
              ejb-location="jdbc/OracleDS"
              connection-driver="oracle.jdbc.driver.OracleDriver"
    username="1234"
    password="1234"
    url="jdbc:oracle:thin:@systelab.izasa.es:1521:matrix"
    min-connections="5"
    max-connections="10"
    stmt-cache-size="200"
              inactivity-timeout="30"
         >
                   <property name="cacheScheme" value="FIXED_WAIT_SCHEME"/>
         </data-source>
    Thanks in advance.

    1) Are you using ejb-location for your lookup? If
    not, could you try that?Yes, I am always using ejb-location as was mentioned on the first message.
    2) Could you try the non-emulated data source
    instead?Ok. I've tried the non-emulated data source.
    It forces me to remove the property from data-sources.xml:
    <property name="cacheScheme" value="FIXED_WAIT_SCHEME"/>
    Running the same blocking code with the non-emulated data source causes:
    javax.ejb.NoSuchObjectLocalException: Session has timed out
    at com.evermind.server.ejb.StatefulSessionEJBObject.throwLocalPassivisat
    ionException(StatefulSessionEJBObject.java:213)
    at RequestSession_StatefulSessionBeanWrapper2.getList(RequestSession_StatefulSessionBeanWrapper2.java:1508)
    which is strange as there is no session timeout error when using the emulated data source.
    Maybe some additional details about the bean implementation will help. The SFSB has a member which has a Connection member. This could be dangerous, but I see no problem with it as calls to the bean always force creating and closing a new connection (so, an open connection is maintained just within a single call to the bean).
    Also, I do not understand the passivation exception. I see no need for the bean to be passivated immediately after call.
    I also got dataSourceInfo after exception:
    java -jar admin.jar ormi://localhost admin admin -application default -dataSourceInfo
    DataSource info:
    com.evermind.sql.OrionCMTDataSource/default/jdbc/OracleCoreDS - cached: 0 used: 0 total: 0
    com.evermind.sql.DriverManagerXADataSource/default/jdbc/xa/OracleXADS - cached: 4 used: 1 total: 5
    com.evermind.sql.OrionPooledDataSource/default/jdbc/OraclePooledDS - cached: 0 used: 0 total: 0
    com.evermind.sql.OrionCMTDataSource/default/jdbc/OracleDS - cached: 0 used: 2 total: 2
    I have performed an additional test on this issue. I changed SFSB for SLSB. I did this before, with emulated data source, and nothing changed. Different behaviour now:
    ***Creating new Instance of SessionBean
    ***Creating new Instance of SessionBean
    ***Creating new Instance of SessionBean
    ***Creating new Instance of SessionBean
    javax.ejb.EJBException: Transaction was rolled back: javax.transaction.SystemException: com.evermind.transaction.MarshallingXAException: Error closing connection for this TX: calling setAutoCommit(true) is not allowed on a container-managed transactions Connection
    at RequestSession_StatelessSessionBeanWrapper8.getList(RequestSession_StatelessSessionBeanWrapper8.java:1431)
    I do not explicitly call setAutoCommit on my code, so I assume the call is implicit.
    Getting dataSourceInfo again:
    java -jar admin.jar ormi://localhost admin admin -application default -dataSourceInfoDataSource info:
    com.evermind.sql.OrionCMTDataSource/default/jdbc/OracleCoreDS - cached: 0 used:0 total: 0
    com.evermind.sql.DriverManagerXADataSource/default/jdbc/xa/OracleXADS - cached:1 used: 4 total: 5
    com.evermind.sql.OrionPooledDataSource/default/jdbc/OraclePooledDS - cached: 0 used: 0 total: 0
    com.evermind.sql.OrionCMTDataSource/default/jdbc/OracleDS - cached: 0 used: 8 total: 8
    Thanks for help.
    Modulab

Maybe you are looking for

  • Peer to Peer on Mobile Devices

    I am trying to develop a real-time game for mobile devices that will allow multiple players. The basic connection concept is: 1) One person puts their game in "host" mode. That causes it to listen for outside connections. 2) A player (client) fires u

  • HT204379 Why does my screen saver "zoom" in on photos from my iPhoto?  Can I stop it from doing this?

    I've recently moved up to Mtn Lion on a new MacBook Pro. I finally figure out how to connect my iPhoto images with my screen saver (the way I alswyas did on previous Macs). But the weird thing is that the Screen Saver zooms in on the photos!  Sometim

  • Looking for Info on DBMS_SHARED_POOL

    Can anyone direct me to better documentation about DBMS_SHARED_POOL (preferrably with examples) than is in the Supplied PL/SQL Packages document? It is (as one expects from Oracle Documentation) extremely terse. Thanks

  • Apache cannot create new worker thread

    My httpd error log reports one of these errors each second: (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread I have been on Google and have tried setting the ThreadsPerChild as low as 4; ulimit -s also reports a

  • QTdemo reel: Optimize for the web

    I have a demo reel of 4 minutes. I have quicktime 6.5 Pro. What can I do to get this file small enough so that it can be attached to emails (maybe 5 mb)? Naturally, I'd expect the quality to be diminished and the size of the image to be pretty small.