RE: [JBoss-user] dbase is acting way to slow
Hello, This is most probably out of topic but, what happens if you try to ping these hosts: localhost, acais, cassia (with these exact spelling and by not using their IP addresses.) Just to check that you do not have a resolver issue (as you say that your lookups are also slow). Cheers, Sacha -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de G.L. Grobe Envoyé : vendredi, 27 juillet 2001 08:04 À : [EMAIL PROTECTED] Objet : [JBoss-user] dbase is acting way to slow Some new information. My problem has been that my dbase queries are extremely slow, but they work. A query through 10 records in a table w/ only 5 fields (extremely simple sql stuff) takes 10-20 seconds. The lookup()'s to the datasource are also slow. Upon run_with_tomcat.sh, I see the following output from jboss ... (I went ahead and included all the output at the end of this post). -- [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized ... [PostgresqlDB] XA Connection pool PostgresqlDB bound to java:/PostgresqlDB There are no errors or exceptions in my startup. 1. I pulled the PostgresqlDB mbean... resource (below) out of my ~/conf/tomcat/jboss.jcml file. I'm using the postgresql dbase. When I did this, I got exactly the same behavior, but my queries were still working. 2. Then I pulled the DefaultDS out of the jboss.jcml, and it took just as long, same behavior, except exceptions were being thrown and no data was returned. Note that at this point there were no dbase resources in my jboss.jcml. 3. Then the below resource (PostgresqlDB) was added back into the jboss.jcml so that it was the only DB resource in jboss.jcml and I got the same behavior as if (in step 2 above) there were no resources in the jboss.jcml. Conclusion: So my guess is that my current configuration is still not correct as I don't think my PostgresqlDB mbean ... was/is ever being used (although, like the above output, it seems to be accepted by jboss w/o problems) and long time delays are because of it having to use the DefaultDS instead of the one I've config'd it to use. Any help much appreciated. --- mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=PostgresqlDB attribute name=PoolNamePostgresqlDB/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:postgresql:acais:@localhost:5432/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUserbuild/attribute attribute name=MaxSize10/attribute attribute name=Passwordbuild/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean Here is my 'run_with_tomcat.sh' jboss output. This output is from running with the PostgresqlDB only resource in the jboss.jcml. cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 26 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing [JBossMQService] Initialized [JMSProviderLoader] Initializing [Default] queue factory name: XAQueueConnectionFactory
Re: [JBoss-user] dbase is acting way to slow
The pings report back fine to localhost and cassia (the node w/ jboss and my enterprise app), acais is just my context name to the webapp. Everything on my network is normal in this respect. I think the problem still lies somewheres in my configuration of the DataSource's. - Original Message - From: Sacha Labourey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 27, 2001 1:22 AM Subject: RE: [JBoss-user] dbase is acting way to slow Hello, This is most probably out of topic but, what happens if you try to ping these hosts: localhost, acais, cassia (with these exact spelling and by not using their IP addresses.) Just to check that you do not have a resolver issue (as you say that your lookups are also slow). Cheers, Sacha -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de G.L. Grobe Envoyé : vendredi, 27 juillet 2001 08:04 À : [EMAIL PROTECTED] Objet : [JBoss-user] dbase is acting way to slow Some new information. My problem has been that my dbase queries are extremely slow, but they work. A query through 10 records in a table w/ only 5 fields (extremely simple sql stuff) takes 10-20 seconds. The lookup()'s to the datasource are also slow. Upon run_with_tomcat.sh, I see the following output from jboss ... (I went ahead and included all the output at the end of this post). -- [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized ... [PostgresqlDB] XA Connection pool PostgresqlDB bound to java:/PostgresqlDB There are no errors or exceptions in my startup. 1. I pulled the PostgresqlDB mbean... resource (below) out of my ~/conf/tomcat/jboss.jcml file. I'm using the postgresql dbase. When I did this, I got exactly the same behavior, but my queries were still working. 2. Then I pulled the DefaultDS out of the jboss.jcml, and it took just as long, same behavior, except exceptions were being thrown and no data was returned. Note that at this point there were no dbase resources in my jboss.jcml. 3. Then the below resource (PostgresqlDB) was added back into the jboss.jcml so that it was the only DB resource in jboss.jcml and I got the same behavior as if (in step 2 above) there were no resources in the jboss.jcml. Conclusion: So my guess is that my current configuration is still not correct as I don't think my PostgresqlDB mbean ... was/is ever being used (although, like the above output, it seems to be accepted by jboss w/o problems) and long time delays are because of it having to use the DefaultDS instead of the one I've config'd it to use. Any help much appreciated. --- mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=PostgresqlDB attribute name=PoolNamePostgresqlDB/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:postgresql:acais:@localhost:5432/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUserbuild/attribute attribute name=MaxSize10/attribute attribute name=Passwordbuild/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean Here is my 'run_with_tomcat.sh' jboss output. This output is from running with the PostgresqlDB only resource in the jboss.jcml. cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 26 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing
Re: [JBoss-user] dbase is acting way too slow
Since I still don't seem to be connecting to the pool, still working on this. What should the attribute name=URL ... of the jboss.jcml file be. I don't understand the url parts. Chptr 3 says it's the JDBC URL used to connect to the data source. When making my own connections, it used to be: jdbc:postgresql:acais where 'acais' is my database name. So I have ... attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute Then I saw this example as was suggested. attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute 1. // or @ (actually tried both ways, same results, slow) 2. what's the servsoft after the port #. Also, from an example that was sent ... what is 'access' in the res-name below, where'd that come from. - resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
Hi, why do you want to use an oracle url for a postgresql DB??? If you can connect with the url you specified: attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute this is fine! what is the exception you get during startup? NPE? do you see your driver is loaded by the JDBC provider? What in't working if you use the above URL? Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 10:38 AM Subject: Re: [JBoss-user] dbase is acting way too slow Since I still don't seem to be connecting to the pool, still working on this. What should the attribute name=URL ... of the jboss.jcml file be. I don't understand the url parts. Chptr 3 says it's the JDBC URL used to connect to the data source. When making my own connections, it used to be: jdbc:postgresql:acais where 'acais' is my database name. So I have ... attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute Then I saw this example as was suggested. attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute 1. // or @ (actually tried both ways, same results, slow) 2. what's the servsoft after the port #. Also, from an example that was sent ... what is 'access' in the res-name below, where'd that come from. - resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
Have you tried writing a standalone java application that connects to the database? Perhaps the problem is in postgres' configuration. Check your pg_hba.conf file. cheers dim On Fri, 20 Jul 2001, G.L. Grobe wrote: Since I still don't seem to be connecting to the pool, still working on this. What should the attribute name=URL ... of the jboss.jcml file be. I don't understand the url parts. Chptr 3 says it's the JDBC URL used to connect to the data source. When making my own connections, it used to be: jdbc:postgresql:acais where 'acais' is my database name. So I have ... attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute Then I saw this example as was suggested. attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute 1. // or @ (actually tried both ways, same results, slow) 2. what's the servsoft after the port #. Also, from an example that was sent ... what is 'access' in the res-name below, where'd that come from. - resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] dbase is acting way too slow
I don't want to use an Oracle URL for a Postgresql DB. I'm wanting to know why the URL's ppl have suggested to me are a bit different than mine and maybe if I'm leaving something out. I can connect w/ the URL this URL from servlets: jdbc:postgresql:acais But now that I've learned w/ app-servers/jboss you don't make the connections like that, I'm using a DataSource. I don't get any errors or exceptions of any kind. But I know my queries shouldn't be this slow. 10-20 secs per query and I'm using a test dbase w/ like 10 records in it. So as was mentioned in a previous e-mail, I don't think the connection pooling is yet being used and/or conf'd correctly. I've posted the server output before. I get no errors or exceptions. I'm running on an AMD450 w/ 128Mb. I've had a slower configuration of this same application work in subsecond times on this same box w/ other app servers. So something is still wrong w/ my configuration. -Original Message- From: Burkhard Vogel [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:44 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Hi, why do you want to use an oracle url for a postgresql DB??? If you can connect with the url you specified: attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute this is fine! what is the exception you get during startup? NPE? do you see your driver is loaded by the JDBC provider? What in't working if you use the above URL? Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 10:38 AM Subject: Re: [JBoss-user] dbase is acting way too slow Since I still don't seem to be connecting to the pool, still working on this. What should the attribute name=URL ... of the jboss.jcml file be. I don't understand the url parts. Chptr 3 says it's the JDBC URL used to connect to the data source. When making my own connections, it used to be: jdbc:postgresql:acais where 'acais' is my database name. So I have ... attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute Then I saw this example as was suggested. attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute 1. // or @ (actually tried both ways, same results, slow) 2. what's the servsoft after the port #. Also, from an example that was sent ... what is 'access' in the res-name below, where'd that come from. - resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
Hi, so how do you get your connections? You are doing a lookup on a DataSource Object Using Datasource.getConnection is slow Is that what you are saying??? access IS AN EXAMPLE. name it as you like, yust make sure both occurences of access get changed to whatever you need. Procedure is: you map your db to a resource manager and use the resource manager in your beans... AND buy more RAM!!! It'll help heaps. Guess RAM on integrated Development/Server/Database machines should be 256 MB. Burkhard - Original Message - From: Grobe, Gary [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 7:16 PM Subject: RE: [JBoss-user] dbase is acting way too slow I don't want to use an Oracle URL for a Postgresql DB. I'm wanting to know why the URL's ppl have suggested to me are a bit different than mine and maybe if I'm leaving something out. I can connect w/ the URL this URL from servlets: jdbc:postgresql:acais But now that I've learned w/ app-servers/jboss you don't make the connections like that, I'm using a DataSource. I don't get any errors or exceptions of any kind. But I know my queries shouldn't be this slow. 10-20 secs per query and I'm using a test dbase w/ like 10 records in it. So as was mentioned in a previous e-mail, I don't think the connection pooling is yet being used and/or conf'd correctly. I've posted the server output before. I get no errors or exceptions. I'm running on an AMD450 w/ 128Mb. I've had a slower configuration of this same application work in subsecond times on this same box w/ other app servers. So something is still wrong w/ my configuration. -Original Message- From: Burkhard Vogel [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:44 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Hi, why do you want to use an oracle url for a postgresql DB??? If you can connect with the url you specified: attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute this is fine! what is the exception you get during startup? NPE? do you see your driver is loaded by the JDBC provider? What in't working if you use the above URL? Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 10:38 AM Subject: Re: [JBoss-user] dbase is acting way too slow Since I still don't seem to be connecting to the pool, still working on this. What should the attribute name=URL ... of the jboss.jcml file be. I don't understand the url parts. Chptr 3 says it's the JDBC URL used to connect to the data source. When making my own connections, it used to be: jdbc:postgresql:acais where 'acais' is my database name. So I have ... attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute Then I saw this example as was suggested. attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute 1. // or @ (actually tried both ways, same results, slow) 2. what's the servsoft after the port #. Also, from an example that was sent ... what is 'access' in the res-name below, where'd that come from. - resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
Hi, made by Ijonas Kisselbach: Step 1. You should have a getConnection() method that returns a java.sql.Connection object, which is retrieved through Context.lookup(). We use a base class with the following method: protected Connection getConnection() throws SQLException { Connection conn = null; Object o; String url = java:comp/env/jdbc/MyDB; if (ds == null) { try { o = ctx.lookup(url); ds = (javax.sql.DataSource) o; } catch (NamingException e) { throw new SQLException(Cannot find +url+\n+e.getMessage()); } } return ds.getConnection(); } Your ejb-jar.xml should look like this: entity ejb-nameMyBean/ejb-name homeMyBeanHome/home remoteMyBean/remote ejb-classMyBean/ejb-class persistence-typeBean/persistence-type prim-key-classjava.lang.String/prim-key-class reentrantFalse/reentrant resource-ref res-ref-namejdbc/MyDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /entity The url used in getConnection() refes to the res-ref-name entry in your ejb-jar.xml The res-ref-name is then further used in your jboss.xml resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-namejdbc/access/res-name res-jndi-namejava:/MyDB/res-jndi-name /resource-manager /resource-managers enterprise-beans entity ejb-nameMyBean/ejb-name jndi-namemy/MyBeanHome/jndi-name configuration-name/configuration-name resource-ref res-ref-namejdbc/MyDB/res-ref-name resource-namejdbc/access/resource-name /resource-ref /entity /enterprise-beans Eventually, we end up with the res-jndi-name in jboss.xml referring to the connection pool name specified in jboss.jcml mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MyDB attribute name=PoolNameMyDB/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=PropertiesURL=jdbc:oracle:thin:servsoft/servsoft@pluto:1521:servsoft /attribute attribute name=URLjdbc:oracle:thin:@pluto:1521:servsoft/attribute attribute name=JDBCUseruser/attribute attribute name=Passwordpwd/attribute /mbean Hope this helps. Let me know if you need more. Regs, Ijonas. - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 7:02 AM Subject: Re: [JBoss-user] dbase is acting way too slow I didn't know about having to do datasource's w/ app servers, but I can see how the db pooling would not have been used. Thnxs, this looks like my problem. Now I'm trying to get a proper mapping w/ a resource manager and resource reference in jboss.xml. Currently w/ this config, I get an exception of 'jdbc not bound', but I'm sure it's not all correct. Chptr 6 talks about resource refs, but using jboss-web.xml, and I'm having a hard enough time as it is w/ all these descriptors. Can someone verify my below configuration. --- MyServlet.java - (this all works and calls the session bean below correctly) ... Object result = ctx.lookup(java:comp/env/ejb/DBaseListMaps); ... --- MySessionBean.java - public Connection getConnection() throws SQLException { if (dataSource == null) { try { Context context = new InitialContext(); dataSource = (DataSource) context.lookup(java:comp/env/jdbc/PostgresqlDB); } catch (Exception e) { throw new SQLException(getConnection failed: + e.toString()); } } return dataSource.getConnection(); } --- jboss.xml -- ... resource-managers resource-manager res-namejdbc/PostgresqlDB/res-name res-typejavax.sql.DataSource/res-type res-jndi-namePostgresqlDB/res-jndi-name /resource-manager /resource-managers enterprise-beans session ejb-nameDBaseListMaps/ejb-name jndi-nameejb/DBaseListMaps/jndi-name resource-ref res-ref-namejdbc/PostgresqlDB/res-ref-name resource-namePostgresqlDB/resource-name /resource-ref /session /enterprise-beans ... --- ejb-jar.xml ... session ejb-nameDBaseListMaps/ejb-name homecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome/home remotecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch/remote ejb-classcom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchBean/ejb-cl ass session-typeStateless/session-type transaction-typeContainer/transaction-type /session ... --- jboss-web.xml
Re: [JBoss-user] dbase is acting way too slow
Hi, thats where the delay is from Your getConnection is not the way you should obtain connections in an app-server!!! you don't use the connection-pooling stuff. do: have a private DataSource _dataSource; in your class, private Connection getConnection() throws SQLException { if (_dataSource == null) { try { Context context = new InitialContext(); // Whitout a proper mapping of your datasource in jboss.xml _dataSource = (DataSource) context.lookup(java:/PostgresqlDB); // With a mapping of a resource-manager and a resource-ref in jboss.xml (see chapter 6 of docu) _dataSource = (DataSource) context.lookup(java:comp/env/jdbc/YOUR_MAPPED_NAME_HERE); } catch (Exception Ex) { throw new SQLException(getConnection failed ( + Ex.toString() + )); } } return _dataSource.getConnection(); } Using your connection should follow this pattern: Connection con=null; PreparedStatement prepStmt=null; ResultSet rs=null; try { con = makeConnection(); prepStmt = con.prepareStatement(SELECT * FROM table WHERE column1 = ? AND column2 = ?); prepStmt.setInt(1, _SomeIntegerObject.intValue()); prepStmt.setString(2, SomeStringObject); rs = prepStmt.executeQuery(); while( rs.next() ) { //do something } } catch(SQLException Ex) { // handle exceptions } finally { if( rs!=null) try { rs.close(); } catch(Exception Ex) { rs=null; } if( prepStmt!=null) try { prepStmt.close(); } catch(Exception Ex) { prepStmt=null; } if( con!=null) try { con.close(); } catch(Exception Ex) { con=null; } } See how fast that is. Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 12:07 AM Subject: Re: [JBoss-user] dbase is acting way too slow I'd like to verify the URL line, maybe this is my problem. I noticed that the name url in this post was a little different. This is the jdbc url I use to connect to my datasource ... jdbc:postgresql:acais://localhost:5432. The same url used in the dbURL of this portion of code. public Connection getConnection() throws SQLException { return DriverManager.getConnection(dbURL, myUser, myPasswd); } So my lines in the mbean's of jboss.jcml look like this. attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute 5432 is the port in my /etc/services file of postgres. acais is the name of the dbase in postgres. It all works, it's just very slow. - When the code below executes, it goes very quickly as it runs through the method, the the next time this method get's called ... there's a pause before it executes. I'm sure the code is fine, I beleive it's still a config problem. It has worked fine on other servers. Otherwise the result sets get returned very quickly. It's just there's a long pause as if it's trying to find the dbase for some reason and not accepting the config. ... try { dbConn = getConnection(); stmt = dbConn.createStatement(); String query = SELECT shell FROM Shells WHERE platform_id = + platform; System.out.println(query = + query); ResultSet rs = stmt.executeQuery(query); int cnt = 0; while (rs.next()) { shells.put(new Integer(++cnt), rs.getString(shell)); } } ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
I didn't know about having to do datasource's w/ app servers, but I can see how the db pooling would not have been used. Thnxs, this looks like my problem. Now I'm trying to get a proper mapping w/ a resource manager and resource reference in jboss.xml. Currently w/ this config, I get an exception of 'jdbc not bound', but I'm sure it's not all correct. Chptr 6 talks about resource refs, but using jboss-web.xml, and I'm having a hard enough time as it is w/ all these descriptors. Can someone verify my below configuration. --- MyServlet.java - (this all works and calls the session bean below correctly) ... Object result = ctx.lookup(java:comp/env/ejb/DBaseListMaps); ... --- MySessionBean.java - public Connection getConnection() throws SQLException { if (dataSource == null) { try { Context context = new InitialContext(); dataSource = (DataSource) context.lookup(java:comp/env/jdbc/PostgresqlDB); } catch (Exception e) { throw new SQLException(getConnection failed: + e.toString()); } } return dataSource.getConnection(); } --- jboss.xml -- ... resource-managers resource-manager res-namejdbc/PostgresqlDB/res-name res-typejavax.sql.DataSource/res-type res-jndi-namePostgresqlDB/res-jndi-name /resource-manager /resource-managers enterprise-beans session ejb-nameDBaseListMaps/ejb-name jndi-nameejb/DBaseListMaps/jndi-name resource-ref res-ref-namejdbc/PostgresqlDB/res-ref-name resource-namePostgresqlDB/resource-name /resource-ref /session /enterprise-beans ... --- ejb-jar.xml ... session ejb-nameDBaseListMaps/ejb-name homecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome/home remotecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch/remote ejb-classcom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchBean/ejb-cl ass session-typeStateless/session-type transaction-typeContainer/transaction-type /session ... --- jboss-web.xml -- ... ejb-ref ejb-ref-nameejb/DBaseListMaps/ejb-ref-name jndi-nameDBaseListMaps/jndi-name /ejb-ref ... --- web.xml --- ... ejb-ref ejb-ref-nameejb/DBaseListMaps/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome/home remotecom.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch/remote ejb-linkDBaseListMaps/ejb-link /ejb-ref ... ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] dbase is acting way too slow
attribute name=MaxActiveClientCount10/attribute attribute name=Parser / attribute name=Port8082/attribute /mbean mbean code=fw.util.gc.mbean.GC name=DefaultDomain:service=GCMonitor attribute name=PauseBetweenGC30/attribute /mbean /server -Original Message- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 3:45 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Oh yeah, psql works just fine. And the same queries from psql are sub-second. It's on the same box. I also use the 2.4.4 kernel. I'm sure it's definately a config issue that I've got wrong somewheres, but I see nothing wrong, of course, how would I know, heh ... it's my first time w/ JBoss and I've still got queues to figure out after this. I had this same configuration on Orion server so I know the code is fine. - Original Message - From: Robert Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 11:37 PM Subject: RE: [JBoss-user] dbase is acting way too slow Have you tried connecting using psql? What happens when you run the same queries? How do you connect to the database? Maybe your networking is stuffed ... is it on the same box? Try pinging ... We use postgres against jboss (standalone, no tomcat) and Linux 2.4 and it works like a dream (we did some very superficial speed comparison against oracle and the performance for our type of app was about the same) and we have tables up to 500,000 rows ... the queries we have are not particularly complex though. The select you describe should be around 10-20ms or so ... R. -Original Message- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 11:31 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Well, seems I've finally got the database configured correctly, at least it starts w/o any errors. But I'm still getting my same original behavior. The problem I started to try and fix. My dbase queries are extremely slow, but they work. I'm doing a query through *7* records in a table w/ only 5 fields and it literally takes 10-20 seconds for each query (that's 10-20 seconds for a 'select * from mytable'). I get the result sets back ok, but as I print out each query, just takes waay too long. As usual, thnxs for all the help. --- jboss output --- cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 27 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing [JBossMQService] Initialized [JMSProviderLoader] Initializing [Default] queue factory name: XAQueueConnectionFactory [Default] topic factory name: XATopicConnectionFactory [JMSProviderLoader] Initialized [ServerSessionPoolLoader] Initializing [ServerSessionPoolLoader] Initialized [J2eeDeployer] Initializing [J2eeDeployer] Initialized [RARDeployer] Initializing [RARDeployer] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [AutoDeployer] Initializing [AutoDeployer] Initialized [JMXAdaptorService] Initializing [JMXAdaptorService] Initialized [RMIConnectorService
Re: [JBoss-user] dbase is acting way too slow
So, you got it up an running, fine, now show us some code where you do your query, post relevant sections of ejb-jar.xml and jboss.xml. I can't believe JBoss is slow, as it is generally fast as hell. Burkhard -Original Message- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 11:31 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Well, seems I've finally got the database configured correctly, at least it starts w/o any errors. But I'm still getting my same original behavior. The problem I started to try and fix. My dbase queries are extremely slow, but they work. I'm doing a query through *7* records in a table w/ only 5 fields and it literally takes 10-20 seconds for each query (that's 10-20 seconds for a 'select * from mytable'). I get the result sets back ok, but as I print out each query, just takes waay too long. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
I'd like to verify the URL line, maybe this is my problem. I noticed that the name url in this post was a little different. This is the jdbc url I use to connect to my datasource ... jdbc:postgresql:acais://localhost:5432. The same url used in the dbURL of this portion of code. public Connection getConnection() throws SQLException { return DriverManager.getConnection(dbURL, myUser, myPasswd); } So my lines in the mbean's of jboss.jcml look like this. attribute name=URLjdbc:postgresql:acais://localhost:5432/attribute 5432 is the port in my /etc/services file of postgres. acais is the name of the dbase in postgres. It all works, it's just very slow. - When the code below executes, it goes very quickly as it runs through the method, the the next time this method get's called ... there's a pause before it executes. I'm sure the code is fine, I beleive it's still a config problem. It has worked fine on other servers. Otherwise the result sets get returned very quickly. It's just there's a long pause as if it's trying to find the dbase for some reason and not accepting the config. ... try { dbConn = getConnection(); stmt = dbConn.createStatement(); String query = SELECT shell FROM Shells WHERE platform_id = + platform; System.out.println(query = + query); ResultSet rs = stmt.executeQuery(query); int cnt = 0; while (rs.next()) { shells.put(new Integer(++cnt), rs.getString(shell)); } } - Original Message - From: Robert Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 17, 2001 1:38 AM Subject: RE: [JBoss-user] dbase is acting way too slow Not sure whether this helps, here is our conf, the relevant section is mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.postgresql.Driver/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNamePostgresDB/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=Properties/attribute attribute name=URLjdbc:postgresql://127.0.0.1/WMS/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUsernotTelling/attribute attribute name=MaxSize10/attribute attribute name=PasswordnotTelling/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledtrue/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean Your url jdbc:postgresql:acais://localhost:5432 is different ... if this does not cut it, run jboss without tomcat and see how this works. I am not really an expert with this, as it just worked for us ;-) R. PS Here our full conf - (jboss2.2.2, postgres 7.1.2, Linux 2.4.2-2 (standard RH7.1), Sun JDK1.3.1) JBOSS.CONF MLET CODE = org.jboss.logging.Logger ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ /MLET MLET CODE = org.jboss.util.ClassPathExtension ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ ARG TYPE=java.lang.String VALUE=../../log/ /MLET MLET CODE = org.jboss.util.ClassPathExtension ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ ARG TYPE=java.lang.String VALUE=./ /MLET MLET CODE = org.jboss.logging.ConsoleLogging ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ ARG TYPE=java.lang.String VALUE=Information,Debug,Warning,Error ARG TYPE=java.lang.String VALUE=[{2}] {4} /MLET MLET CODE = org.jboss.util.Info ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ /MLET MLET CODE = org.jboss.util.ClassPathExtension ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ ARG TYPE=java.lang.String VALUE=../../tmp/ /MLET MLET CODE = org.jboss.util.ClassPathExtension ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ ARG TYPE=java.lang.String VALUE=../../db/ /MLET MLET CODE = org.jboss.configuration.ConfigurationService ARCHIVE=jboss.jar,../xml.jar CODEBASE=../../lib/ext/ /MLET MLET CODE = org.jboss.util.Shutdown ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ /MLET MLET CODE = org.jboss.util.ServiceControl ARCHIVE=jboss.jar CODEBASE=../../lib/ext/ /MLET JBOSS.JCML ?xml version=1.0 encoding=UTF-8? server mbean code=org.jboss.web.WebService name=DefaultDomain:service=Webserver attribute name=Port8083/attribute /mbean mbean code=org.jboss.naming.NamingService name=DefaultDomain:service=Naming attribute name=Port1099/attribute /mbean mbean code=org.jboss.naming.JNDIView name=DefaultDomain:service=JNDIView / mbean code
Re: [JBoss-user] dbase is acting way too slow
On Tue, Jul 17, 2001 at 05:07:15PM -0500, G.L. Grobe wrote: ... When the code below executes, it goes very quickly as it runs through the method, the the next time this method get's called ... there's a pause before it executes. I'm sure the code is fine, I beleive it's still a config problem. It has worked fine on other servers. Otherwise the result sets get returned very quickly. It's just there's a long pause as if it's trying to find the dbase for some reason and not accepting the config. ... try { dbConn = getConnection(); stmt = dbConn.createStatement(); String query = SELECT shell FROM Shells WHERE platform_id = + platform; System.out.println(query = + query); ResultSet rs = stmt.executeQuery(query); int cnt = 0; while (rs.next()) { shells.put(new Integer(++cnt), rs.getString(shell)); } } Are you closing the result set, statement and connection? What does getConnection() do? If you've already answered these questions in this thread, I apologise, but I couldn't find any other code snippets. Toby. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
[ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [AutoDeployer] Initializing [AutoDeployer] Initialized [JMXAdaptorService] Initializing [JMXAdaptorService] Initialized [RMIConnectorService] Initializing [RMIConnectorService] Initialized [MailService] Initializing [MailService] Initialized [Service Control] Initialized 27 services [Service Control] Starting 27 MBeans [WebService] Starting [Default] Started on port 8083 [Webserver] Codebase set to http://cassia:8083/ [Webserver] Started webserver on port 8083 [WebService] Started [NamingService] Starting [NamingService] Starting jnp server [NamingService] Started jnpPort=1099, rmiPort=0, Client SocketFactory=null, Server SocketFactory=null [NamingService] InitialContext Environment: [NamingService] key=java.naming.factory.initial, value=org.jnp.interfaces.NamingContextFactory [NamingService] key=java.naming.factory.url.pkgs, value=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interface s [NamingService] Naming started on port 1099 [NamingService] Started [JNDIView] Starting [JNDIView] Started [TransactionManagerService] Starting [TransactionManagerService] Started [ClientUserTransactionService] Starting [ClientUserTransactionService] Started [JaasSecurityManagerService] Starting [Default] JAAS.startService, cachePolicy=null [Default] JAAS.startService, SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@632802 [JaasSecurityManagerService] Started [JdbcProvider] Starting [JdbcProvider] Started [XADataSourceLoader] Starting [InstantDB] XA Connection pool InstantDB bound to java:/InstantDB - Original Message - From: Burkhard Vogel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 10:17 AM Subject: Re: [JBoss-user] dbase is acting way too slow Hi, still you are completly misconfigured, I really wonder how it works anyhow... Frist: The jboss.jcml is not real xml, so comments won't allways work as expected, to be sure, make a backup-copy of the vanilla config-file and DELETE anything you don't want. Second: Make sure you are editing the right set of config-files. From you output: [EmbeddedTomcatServiceSX] Initialized i guess you do a run_with_tomcat to start the server which means you need to change the conf/tomcat files! Third: What you need to do in order to use the postgres DB through the Jboss DB-pooling system. a) Copy your driver jar into the lib/ext dir of jboss. b) include yourdriver in the JdbcProvider section: mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.postgresql.Driver/attribute /mbean looks ok, but MUST give you an output during startup: [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver and nothing else! No [JdbcProvider] Loaded JDBC-driver:org.hsql.jdbcDriver [JdbcProvider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver If you get these delete jboss-auto.jcml. c) Set up your pool: There should always be some DefaultDS: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=Properties/attribute attribute name=URLjdbc:postgresql://YOUR_SERVER_HERE/YOUR_DATABASE/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUserYOUR_USER/attribute attribute name=MaxSize10/attribute attribute name=PasswordYOUR_PASSWORD/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=PostgresqlDB attribute name=PoolNamePostgresqlDB/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=URLjdbc:postgresql://YOUR_SERVER_HERE/YOUR_DATABASE/attribute attribute name=JDBCUserYOUR_USER/attribute attribute name=PasswordYOUR_PASSWORD/attribute attribute name=MinSize0/attribute attribute name=MaxSize50/attribute attribute name=Blockingtrue/attribute attribute name=GCEnabledfalse/attribute attribute name=GCMinIdleTime120
Re: [JBoss-user] dbase is acting way too slow
Now I am getting confused again. I do not see any jboss.jcml files in ~/tomcat/conf/default nor do I see anywheres in the docs that state this. I had put my ~/jboss/conf/default/jboss.jcml into ~/tomcat/conf/default, and got those previous results, and did not delete my old ~/jboss/conf/default/jboss.jcml file, but not sure what's correct. So what set of ~/tomcat/conf files are we talking about? Thnxs. - Original Message - From: Burkhard Vogel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 10:17 AM Subject: Re: [JBoss-user] dbase is acting way too slow Hi, still you are completly misconfigured, I really wonder how it works anyhow... Frist: The jboss.jcml is not real xml, so comments won't allways work as expected, to be sure, make a backup-copy of the vanilla config-file and DELETE anything you don't want. Second: Make sure you are editing the right set of config-files. From you output: [EmbeddedTomcatServiceSX] Initialized i guess you do a run_with_tomcat to start the server which means you need to change the conf/tomcat files! Third: What you need to do in order to use the postgres DB through the Jboss DB-pooling system. a) Copy your driver jar into the lib/ext dir of jboss. b) include yourdriver in the JdbcProvider section: mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.postgresql.Driver/attribute /mbean looks ok, but MUST give you an output during startup: [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver and nothing else! No [JdbcProvider] Loaded JDBC-driver:org.hsql.jdbcDriver [JdbcProvider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver If you get these delete jboss-auto.jcml. c) Set up your pool: There should always be some DefaultDS: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=Properties/attribute attribute name=URLjdbc:postgresql://YOUR_SERVER_HERE/YOUR_DATABASE/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUserYOUR_USER/attribute attribute name=MaxSize10/attribute attribute name=PasswordYOUR_PASSWORD/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=PostgresqlDB attribute name=PoolNamePostgresqlDB/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=URLjdbc:postgresql://YOUR_SERVER_HERE/YOUR_DATABASE/attribute attribute name=JDBCUserYOUR_USER/attribute attribute name=PasswordYOUR_PASSWORD/attribute attribute name=MinSize0/attribute attribute name=MaxSize50/attribute attribute name=Blockingtrue/attribute attribute name=GCEnabledfalse/attribute attribute name=GCMinIdleTime120/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=IdleTimeout180/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=LoggingEnabledfalse/attribute /mbean Should give you the following output during startup: [DefaultDS] Starting [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS [DefaultDS] Started [PostgresqlDB] Starting [PostgresqlDB] XA Connection pool PostgresqlDBbound to java:/PostgresqlDB [PostgresqlDB] Started Now you have a XA Connection pool which can be looked up which new InitialContext.lookup(java:/PostgresqlDB). This is however not portable and you should use jboss.xml as a server-specific deployment descritor to map this resource to jdbc/YourNameHere, as described in chapter 6 of the documentation. All the above is chapter 3 of the documentation. Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:07 AM Subject: Re: [JBoss-user] dbase is acting way too slow Ok, I've found a few mis-configurations problems in my jboss.jcml, but after fixing them and now that I understand it a bit more, they still don't seem to be taking
Re: [JBoss-user] dbase is acting way too slow
At 06:45 PM 7/16/01 -0500, you wrote: Now I am getting confused again. I do not see any jboss.jcml files in ~/tomcat/conf/default nor do I see anywheres in the docs that state this. That's /jboss/conf/tomcat/jboss.jcml I believe. r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
Well, seems I've finally got the database configured correctly, at least it starts w/o any errors. But I'm still getting my same original behavior. The problem I started to try and fix. My dbase queries are extremely slow, but they work. I'm doing a query through *7* records in a table w/ only 5 fields and it literally takes 10-20 seconds for each query (that's 10-20 seconds for a 'select * from mytable'). I get the result sets back ok, but as I print out each query, just takes waay too long. As usual, thnxs for all the help. --- jboss output --- cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 27 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing [JBossMQService] Initialized [JMSProviderLoader] Initializing [Default] queue factory name: XAQueueConnectionFactory [Default] topic factory name: XATopicConnectionFactory [JMSProviderLoader] Initialized [ServerSessionPoolLoader] Initializing [ServerSessionPoolLoader] Initialized [J2eeDeployer] Initializing [J2eeDeployer] Initialized [RARDeployer] Initializing [RARDeployer] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [AutoDeployer] Initializing [AutoDeployer] Initialized [JMXAdaptorService] Initializing [JMXAdaptorService] Initialized [RMIConnectorService] Initializing [RMIConnectorService] Initialized [MailService] Initializing [MailService] Initialized [Service Control] Initialized 27 services [Service Control] Starting 27 MBeans [WebService] Starting [Default] Started on port 8083 [Webserver] Codebase set to http://cassia:8083/ [Webserver] Started webserver on port 8083 [WebService] Started [NamingService] Starting [NamingService] Starting jnp server [NamingService] Started jnpPort=1099, rmiPort=0, Client SocketFactory=null, Server SocketFactory=null [NamingService] InitialContext Environment: [NamingService] key=java.naming.factory.initial, value=org.jnp.interfaces.NamingContextFactory [NamingService] key=java.naming.factory.url.pkgs, value=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interface s [NamingService] Naming started on port 1099 [NamingService] Started [JNDIView] Starting [JNDIView] Started [TransactionManagerService] Starting [TransactionManagerService] Started [ClientUserTransactionService] Starting [ClientUserTransactionService] Started [JaasSecurityManagerService] Starting [Default] JAAS.startService, cachePolicy=null [Default] JAAS.startService, SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@687719 [JaasSecurityManagerService] Started [JdbcProvider] Starting [JdbcProvider] Started [XADataSourceLoader] Starting [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS [XADataSourceLoader] Started [XADataSourceLoader] Starting [PostgresqlDB] XA Connection pool PostgresqlDB bound to java:/PostgresqlDB [XADataSourceLoader] Started [ServerDataCollector] Starting [ServerDataCollector] JBoss Management Service 'servercollector' bound to servercollector [ServerDataCollector] Started [ContainerFactory] Starting [ContainerFactory] Started [EmbeddedTomcatServiceSX] Starting [EmbeddedTomcatSX] Starting EmbeddedTomcatSX [Default] Starting tomcat. Check
RE: [JBoss-user] dbase is acting way too slow
Have you tried connecting using psql? What happens when you run the same queries? How do you connect to the database? Maybe your networking is stuffed ... is it on the same box? Try pinging ... We use postgres against jboss (standalone, no tomcat) and Linux 2.4 and it works like a dream (we did some very superficial speed comparison against oracle and the performance for our type of app was about the same) and we have tables up to 500,000 rows ... the queries we have are not particularly complex though. The select you describe should be around 10-20ms or so ... R. -Original Message- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 11:31 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Well, seems I've finally got the database configured correctly, at least it starts w/o any errors. But I'm still getting my same original behavior. The problem I started to try and fix. My dbase queries are extremely slow, but they work. I'm doing a query through *7* records in a table w/ only 5 fields and it literally takes 10-20 seconds for each query (that's 10-20 seconds for a 'select * from mytable'). I get the result sets back ok, but as I print out each query, just takes waay too long. As usual, thnxs for all the help. --- jboss output --- cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 27 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing [JBossMQService] Initialized [JMSProviderLoader] Initializing [Default] queue factory name: XAQueueConnectionFactory [Default] topic factory name: XATopicConnectionFactory [JMSProviderLoader] Initialized [ServerSessionPoolLoader] Initializing [ServerSessionPoolLoader] Initialized [J2eeDeployer] Initializing [J2eeDeployer] Initialized [RARDeployer] Initializing [RARDeployer] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [AutoDeployer] Initializing [AutoDeployer] Initialized [JMXAdaptorService] Initializing [JMXAdaptorService] Initialized [RMIConnectorService] Initializing [RMIConnectorService] Initialized [MailService] Initializing [MailService] Initialized [Service Control] Initialized 27 services [Service Control] Starting 27 MBeans [WebService] Starting [Default] Started on port 8083 [Webserver] Codebase set to http://cassia:8083/ [Webserver] Started webserver on port 8083 [WebService] Started [NamingService] Starting [NamingService] Starting jnp server [NamingService] Started jnpPort=1099, rmiPort=0, Client SocketFactory=null, Server SocketFactory=null [NamingService] InitialContext Environment: [NamingService] key=java.naming.factory.initial, value=org.jnp.interfaces.NamingContextFactory [NamingService] key=java.naming.factory.url.pkgs, value=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interface s [NamingService] Naming started on port 1099 [NamingService] Started [JNDIView] Starting [JNDIView] Started [TransactionManagerService] Starting [TransactionManagerService] Started [ClientUserTransactionService] Starting [ClientUserTransactionService] Started [JaasSecurityManagerService] Starting [Default] JAAS.startService, cachePolicy=null [Default
Re: [JBoss-user] dbase is acting way too slow
Oh yeah, psql works just fine. And the same queries from psql are sub-second. It's on the same box. I also use the 2.4.4 kernel. I'm sure it's definately a config issue that I've got wrong somewheres, but I see nothing wrong, of course, how would I know, heh ... it's my first time w/ JBoss and I've still got queues to figure out after this. I had this same configuration on Orion server so I know the code is fine. - Original Message - From: Robert Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 11:37 PM Subject: RE: [JBoss-user] dbase is acting way too slow Have you tried connecting using psql? What happens when you run the same queries? How do you connect to the database? Maybe your networking is stuffed ... is it on the same box? Try pinging ... We use postgres against jboss (standalone, no tomcat) and Linux 2.4 and it works like a dream (we did some very superficial speed comparison against oracle and the performance for our type of app was about the same) and we have tables up to 500,000 rows ... the queries we have are not particularly complex though. The select you describe should be around 10-20ms or so ... R. -Original Message- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 11:31 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] dbase is acting way too slow Well, seems I've finally got the database configured correctly, at least it starts w/o any errors. But I'm still getting my same original behavior. The problem I started to try and fix. My dbase queries are extremely slow, but they work. I'm doing a query through *7* records in a table w/ only 5 fields and it literally takes 10-20 seconds for each query (that's 10-20 seconds for a 'select * from mytable'). I get the result sets back ok, but as I print out each query, just takes waay too long. As usual, thnxs for all the help. --- jboss output --- cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 27 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver [JdbcProvider] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing [JBossMQService] Initialized [JMSProviderLoader] Initializing [Default] queue factory name: XAQueueConnectionFactory [Default] topic factory name: XATopicConnectionFactory [JMSProviderLoader] Initialized [ServerSessionPoolLoader] Initializing [ServerSessionPoolLoader] Initialized [J2eeDeployer] Initializing [J2eeDeployer] Initialized [RARDeployer] Initializing [RARDeployer] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionManagerFactoryLoader] Initializing [ConnectionManagerFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [ConnectionFactoryLoader] Initializing [ConnectionFactoryLoader] Initialized [AutoDeployer] Initializing [AutoDeployer] Initialized [JMXAdaptorService] Initializing [JMXAdaptorService] Initialized [RMIConnectorService] Initializing [RMIConnectorService] Initialized [MailService] Initializing [MailService] Initialized [Service Control] Initialized 27 services [Service Control] Starting 27 MBeans [WebService] Starting [Default] Started on port 8083 [Webserver] Codebase set to http://cassia:8083/ [Webserver] Started webserver on port 8083 [WebService] Started [NamingService] Starting [NamingService] Starting jnp server [NamingService
Re: [JBoss-user] dbase is acting way too slow
Hi, this is general DB-config stuff. the most likely scenario is that you work with Hypersonic (DefaultDS) without noticing. The startup output indicates that your Progress-Driver isn't loaded at all, which usually happens if you alter the files in conf/default dir but do a run_with_tomcat which picks up the files in conf/tomcat dir. Moreover, if config changes do not appear to be picked up, trash the jboss-auto.jcml which is really a nuciance. I will help more if you post full DB-relevant jboss.jcml parts and relevant parts of startup output. Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 14, 2001 9:18 PM Subject: Re: [JBoss-user] dbase is acting way too slow btw - I'm using BMP, does this change anything since the docs only talk about CMP for this part of the config? - Original Message - From: G.L. Grobe To: [EMAIL PROTECTED] Sent: Saturday, July 14, 2001 1:18 AM Subject: [JBoss-user] dbase is acting way too slow My DBase queries are extremely slow, but they work. I'm doing a query through *7* records in a table and it literally takes 10-20 seconds for each query. I copied the postgresql driver into ~/lib/ext dir. I also added the following to my jboss.jcml file. --- jboss.jcml (JDBC section) - mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.postgresql.Driver/attribute /mbean I *DO NOT* see the messages that should look similiar to this in the jboss output. --- [JDBC] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver [JDBC] Could not load driver:com.sybase.jdbc2.jdbc.SybDriver Any help much appreciated. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
application acais-1.0.ear [J2EE Deployer Default] inflate and install module acais-web.war [J2EE Deployer Default] install module acais-ejb.jar [J2EE Deployer Default] add all ejb jar files to the common classpath [Container factory] Deploying:file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/a cais-1.0.ear [Verifier] Verifying file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acais-1.0.e ar/ejb1004.jar [Container factory] Deploying BuildKit [Container factory] Deploying Account [Container factory] Deploying ConfigureBuild [Container factory] Deploying DBaseListMaps [Container factory] Deploying ConfigureTools [Container factory] Deploying InitializeBuild [Bean Cache] Cache policy scheduler started [Container factory] Deployed application: file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acais-1.0.e ar [J2EE Deployer Default] Starting module acais-web.war [Auto deploy] deploy, ctxPath=/acais, warUrl=file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acai s-1.0.ear/web1003/ 2001-07-15 01:50:31 - ContextManager: Adding context Ctx( /acais ) [Auto deploy] AbstractWebContainer.parseWebAppDescriptors, Begin [Auto deploy] addEnvEntries [Auto deploy] linkResourceRefs [Auto deploy] linkEjbRefs [Auto deploy] Linking ejb-ref: ejb/InitializeBuild to JNDI name: InitializeBuild [Auto deploy] Linking ejb-ref: ejb/DBaseListMaps to JNDI name: DBaseListMaps [Auto deploy] Linking ejb-ref: ejb/ConfigureTools to JNDI name: ConfigureTools [Auto deploy] Linking ejb-ref: ejb/ConfigureBuild to JNDI name: ConfigureBuild [Auto deploy] linkSecurityDomain [Auto deploy] Binding security/securityMgr to NullSecurityManager [Auto deploy] AbstractWebContainer.parseWebAppDescriptors, End [Auto deploy] Initialized: {WebApplication: /u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acais-1.0.ear/we b1003/, URL: file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acais-1.0.e ar/web1003/, classLoader: AdaptiveClassLoader( ):8279839} [J2EE Deployer Default] J2EE application: file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/deploy/acais-1.0.ear is deployed. [Auto deploy] Started [RARDeployer] Starting [RARDeployer] Started [MinervaNoTransCMFactory] Starting [MinervaNoTransCMFactory] Connection manager factory 'MinervaNoTransCMFactory bound to 'java:/MinervaNoTransCMFactory' [MinervaNoTransCMFactory] Started [MinervaSharedLocalCMFactory] Starting [MinervaSharedLocalCMFactory] Connection manager factory 'MinervaSharedLocalCMFactory bound to 'java:/MinervaSharedLocalCMFactory' [MinervaSharedLocalCMFactory] Started [MinervaXACMFactory] Starting [MinervaXACMFactory] Connection manager factory 'MinervaXACMFactory bound to 'java:/MinervaXACMFactory' [MinervaXACMFactory] Started [BlackBoxDS] Starting [BlackBoxDS] Started [JMX RMI Adaptor] Starting [JMX RMI Adaptor] Started [JMX RMI Connector] Starting [JMX RMI Connector] Started [Mail Service] Starting [Mail Service] DEBUG: not loading system providers in java.home/lib [Mail Service] DEBUG: not loading optional custom providers file: /META-INF/javamail.providers [Mail Service] DEBUG: successfully loaded default providers [Mail Service] DEBUG: Tables of loaded providers [Mail Service] DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun. mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap .IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3 .POP3Store,Sun Microsystems, Inc]} [Mail Service] DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]} [Mail Service] DEBUG: not loading optional address map file: /META-INF/javamail.address.map [Mail Service] Mail Service 'Mail' bound to java:/Mail [Mail Service] Started [Service Control] Started 25 services [Default] JBoss 2.2.2 Started in 0m:41s - Original Message - From: Burkhard Vogel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 15, 2001 9:08 AM Subject: Re: [JBoss-user] dbase is acting way too slow Hi, this is general DB-config stuff. the most likely scenario is that you work with Hypersonic (DefaultDS) without noticing. The startup output indicates that your Progress-Driver isn't loaded at all, which usually happens if you alter the files in conf/default dir but do a run_with_tomcat which picks up the files in conf/tomcat dir. Moreover, if config changes do not appear to be picked up, trash the jboss-auto.jcml which is really a nuciance. I will help more if you post full DB-relevant jboss.jcml parts and relevant parts of startup output. Burkhard - Original Message - From: G.L. Grobe [EMAIL PROTECTED
Re: [JBoss-user] dbase is acting way too slow
Ok, I've found a few mis-configurations problems in my jboss.jcml, but after fixing them and now that I understand it a bit more, they still don't seem to be taking. My postgresql database still works, but is very, very, very slow. --- jboss.jcml --- !-- -- !-- -- !-- -- mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.postgresql.Driver/attribute /mbean !-- mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver/att ribute /mbean -- !-- mbean code=org.jboss.jdbc.HypersonicDatabase name=DefaultDomain:service=Hypersonic attribute name=Port1476/attribute attribute name=Silenttrue/attribute attribute name=Databasedefault/attribute attribute name=Tracefalse/attribute /mbean -- mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=InstantDB attribute name=PoolNameInstantDB/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:idb:../conf/default/instantdb.properties/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUser / attribute name=MaxSize10/attribute attribute name=Password / attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:HypersonicSQL:hsql://localhost:1476/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUsersa/attribute attribute name=MaxSize10/attribute attribute name=Password / attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean --- jboss output cassia(build):/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/bin$ ./run_with_tomcat.sh JBOSS_CLASSPATH=:/u/public/jdk1.3/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [root] Started Log4jService, config=file:/u/public/JBoss-2.4.0_Tomcat-3.2.2/jboss/conf/tomcat/log4j.prope rties [Info] Java version: 1.3.0,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc. [Info] System: Linux 2.4.4,i386 [Shutdown] Shutdown hook added [Service Control] Initializing 28 MBeans [WebService] Initializing [WebService] Initialized [NamingService] Initializing [NamingService] Initialized [JNDIView] Initializing [JNDIView] Initialized [TransactionManagerService] Initializing [TransactionManagerService] Initialized [ClientUserTransactionService] Initializing [ClientUserTransactionService] Initialized [JaasSecurityManagerService] Initializing [JaasSecurityManagerService] Initialized [JdbcProvider] Initializing [JdbcProvider] Loaded JDBC-driver:org.hsql.jdbcDriver [JdbcProvider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver [JdbcProvider] Initialized [HypersonicDatabase] Initializing [HypersonicDatabase] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [XADataSourceLoader] Initializing [XADataSourceLoader] Initialized [ServerDataCollector] Initializing [ServerDataCollector] Initialized [ContainerFactory] Initializing [ContainerFactory] Initialized [EmbeddedTomcatServiceSX] Initializing [EmbeddedTomcatServiceSX] Initialized [JBossMQService] Initializing ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] dbase is acting way too slow
btw- I'm using BMP, does this change anything since the docs only talk about CMP for this part of the config? - Original Message - From: G.L. Grobe To: [EMAIL PROTECTED] Sent: Saturday, July 14, 2001 1:18 AM Subject: [JBoss-user] dbase is acting way too slow My DBase queries are extremely slow, but they work. I'm doing a query through *7* records in a table and it literally takes 10-20 seconds for each query.I copied the postgresql driver into ~/lib/ext dir. I also added the following to my jboss.jcml file.--- jboss.jcml (JDBC section) -mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider"attribute name="Drivers"org.postgresql.Driver/attribute/mbeanI *DO NOT* see the messages that should look similiar to this in the jboss output.---[JDBC] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver [JDBC] Could not load driver:com.sybase.jdbc2.jdbc.SybDriverAny help much appreciated.