[JBoss-user] [Installation & Configuration] - Re: Datasource Problem
Have you used JNDI View to check what is actually bound to JNDI? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852494#3852494 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852494 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: Datasource Problem
I think you can try out java:/DefaultDS instead of java:comp/env/DefaultDS. regards srinivas View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852285#3852285 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852285 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: Datasource Problem
No one has seen this problem? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852270#3852270 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852270 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
And now for your problem specfically: http://www.jboss.org/wiki/Wiki.jsp?page=WhatDoesTheMessageNoManagedConnectionsAvailableMean View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835811#3835811 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835811 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
Thank you very much to all for the quick responses :-) Now it works Frederic View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835810#3835810 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835810 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
Its also in the FAQ: http://www.jboss.org/wiki/Wiki.jsp?page=WhatDoesTheMessageDoYourOwnHousekeepingMean and http://www.jboss.org/wiki/Wiki.jsp?page=CanJBossTellMeWhenIDontCloseAConnection View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835807#3835807 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835807 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
Every time you have an SQLException you will not close the connection. Instead do all those closing in a finally block. /L View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835804#3835804 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835804 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
This is the code: package beans; import java.sql.*; import java.util.ArrayList; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; public class DbBean { private static DataSource pool; public static DataSource getPool() { return pool; } public static void makePool() throws Exception{ try{ Context env = (Context) new InitialContext().lookup("java:comp/env"); //Look up a DataSource, which represents a connection pool pool = (DataSource)env.lookup("jdbc/OracleDS"); if (pool == null) throw new Exception("'OracleDS' is an unknown DataSource"); } catch (NamingException ne){ throw new Exception(ne.getMessage()); } } //method used for fetching data (only 1 column) public ArrayList getSelect(String sql){ Statement st = null; ArrayList arrList = new ArrayList(); Connection connection = null; try { connection = pool.getConnection(); st = connection.createStatement(); } catch (SQLException e1) { e1.printStackTrace(); } try{ ResultSet rs = st.executeQuery(sql); while(rs.next()){ arrList.add(rs.getObject(1)); } rs.close(); st.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } return arrList; } //method used for checking login access public boolean getLogin(String sql) { Statement st = null; ResultSet rs = null; boolean found = false; Connection connection = null; try { connection = pool.getConnection(); st = connection.createStatement(); rs = st.executeQuery(sql); if (rs.next()) found = true; else found = false; rs.close(); st.close(); connection.close(); } catch (SQLException e1) { e1.printStackTrace(); } return found; } } When I say connection.close() , the connection is given back to the pool. Am I wrong ? How is it possible that my pool is running out of connections? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835801#3835801 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835801 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation & Configuration] - Re: DataSource problem - JBossManagedConnectionPool
I think the message is really self-explanatory: your pool is running out of connections. -marek View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835800#3835800 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835800 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user