-
1. Re: Chnaging JBoss JDBC connection pool size
peterj Mar 7, 2007 11:04 PM (in response to inderjeet)Yes, you can adjust the connection pool size. When you deploy the oracle-ds.xml file, JBoss creates an MBean named jboss.jca:name=xxx,service=ManagedConnectionPool, where xxx is the name of the oracle data source. That MBean has several properties that you can use to monitor and adjust the connection pool.
To write code to access and mbean, see http://docs.jboss.com/jbossas/guides/j2eeguide/r2/en/html_single/#d0e2207 -
2. Re: Chnaging JBoss JDBC connection pool size
inderjeet Mar 7, 2007 11:59 PM (in response to inderjeet)Thanks Peter for your reply. But i would like to know that what API i need to use and where can i find that. one more thing is that how can i invoke those methods? Do we have some doc available from which i can find this info?
And what about the second problem? Can we pass the DB schema password at runtime? -
3. Re: Chnaging JBoss JDBC connection pool size
peterj Mar 8, 2007 10:06 AM (in response to inderjeet)I already gave you the link to the documentation that you need.
As far as providing the password at runtime, I do not think that there is any way to do this. -
4. Re: Chnaging JBoss JDBC connection pool size
inderjeet Mar 8, 2007 10:12 PM (in response to inderjeet)HI Peter
The link which you have given talks about the xml configuration to set up the connection pool in Jboos but it does not mention anything about API through which we can change the pool configuration at runtime.
I need the API used for runtime configuration of Connection Pool.
Thanks & Regards
Inder Jeet Singh -
5. Re: Chnaging JBoss JDBC connection pool size
peterj Mar 8, 2007 11:34 PM (in response to inderjeet)The link I provided is to a section named "1.3.2 Connecting to JMX Using RMI", in which two paragraphs later contains an example program "Example 1.12. A JMX client that uses the RMIAdaptor". The only thing missing from the example is the import statements, here they are:
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
You should be able to find the javadoc for those classes. -
6. Re: Chnaging JBoss JDBC connection pool size
inderjeet Mar 9, 2007 12:22 AM (in response to inderjeet)Thanks again peter
I will try to incorporate the suggested code in my application.
Thanks & Regards
Inder Jeet Singh -
7. Re: Chnaging JBoss JDBC connection pool size
inderjeet Mar 12, 2007 3:11 AM (in response to inderjeet)Hi
I am able to get the attributes of the ManagedConnectionPool MBean of the JBoos. eg. MinSize, MaxSize, BlockingTimeoutMillis, PreFill etc (Using the document given in the link...). But still I am unable to either read the values of these attributes or modify these values. Can someone please help me out here??? -
8. Re: Chnaging JBoss JDBC connection pool size
peterj Mar 12, 2007 10:19 AM (in response to inderjeet)Try using this when looking up the RMI Adaptor:
MBeanServerConnection mconn = (MBeanServerConnection)ctx.lookup("jmx/invoker/RMIAdaptor");
The MBeanServerConnection has all of the methods you need http://java.sun.com/j2ee/1.4/docs/api/javax/management/MBeanServerConnection.html:
getAttribute(ObjectName name, String attribute)
Gets the value of a specific attribute of a named MBean.
setAttribute(ObjectName name, Attribute attribute)
Sets the value of a specific attribute of a named MBean. -
9. Re: Chnaging JBoss JDBC connection pool size
vashistvishal Feb 28, 2008 12:17 AM (in response to inderjeet)One query - Is their any MAX limit set by JBoss 4.0.4 container on How Many Connection Pools (JDBC to Oracle) can be set.
I know we can modify oracle-ds.xml for max and min, but is their any constraint on these esp max one. -
10. Re: Chnaging JBoss JDBC connection pool size
vashistvishal Feb 28, 2008 12:27 AM (in response to inderjeet)Do we know the default settings for these two attributes...
Jboss -4.0.4
<blocking-timeout-millis>5000</blocking-timeout-millis>
The default is 30000 for the blocking timeout
<idle-timeout-minutes>15</idle-timeout-minutes>
waht about idle time out -
11. Re: Chnaging JBoss JDBC connection pool size
peterj Feb 28, 2008 11:07 AM (in response to inderjeet)I would not go over 400 or 500. You also have to adjust your database configuration to accept this number of connections, and you have to take the maximum number of connections your database can handle into account. In addition you will need a larger heap to hold that number of connections.
Finally, you should have started a new post, not appended to a post that is a year old. -
12. Re: Chnaging JBoss JDBC connection pool size
peterj Feb 28, 2008 11:16 AM (in response to inderjeet)The default for idle-time-minutes is 15.