-
1. Re: Multiple datasources over single connection pool
davidjencks Apr 25, 2003 11:25 PM (in response to trygvis)The current jboss connection pools don't support this. Why would you want this? The connections aren't going to be interchangeable, so I don't really see the point in putting them in a single pool. Please explain.
-
2. Re: Multiple datasources over single connection pool
trygvis Apr 26, 2003 5:38 AM (in response to trygvis)Wath I want to do is to deploy a set of .ears, each possilbly containing more that one bean. I regard all these .ears for a component and each component has its own set of tables to manage. So, I use a datasource with the same name of the component like:
/com///DataSource
But as im writing this, i realize that I can trick this when deploying the ejb. But im pretty shure that at least weblogic and sun one can to this.
Trygvis.. -
3. Re: Multiple datasources over single connection pool
davidjencks Apr 26, 2003 8:43 AM (in response to trygvis)If all the tables are in the same database, use the same pool for all the ejbs. You can use resource-refs to give each bean its appropriate local datasource name in the java:/comp/env space, but map these all to the same global jndi java:/realdatasourcename.
What additional useful functionality would you get from having connections from multiple datasources in the same pool? -
4. Re: Multiple datasources over single connection pool
jogura May 7, 2003 1:17 PM (in response to trygvis)What if you wanted to have one JBoss server connect to multiple datasource depending on the user? Think of a data center hosting may different company/users environments.
How would you setup the environment so that one instance of the server can host multiple users that use different databases?
Then, if this could successfully be done, you can cluster the JBoss servers to use multiple datasources, thus improving performance, scalability, etc.
Thoughts? Comments? -
5. Re: Multiple datasources over single connection pool
bkbonner May 7, 2003 4:14 PM (in response to trygvis)David, how do I perform the mapping of a resource-ref in my web.xml file (that I don't want to change because my code uses it) to an existing data source specified in jboss. Let's say for example that I want to map the resource:
<resource-ref>
JDBC
<res-ref-name>jdbc/TestSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>CONTAINER</res-auth>
</resource-ref>
to a datasource named java:DataSource?
In websphere (which I'm more familiar), I do this association at deployment.
Thanks. -
6. Re: Multiple datasources over single connection pool
bkbonner May 7, 2003 7:14 PM (in response to trygvis)From the Jboss 3.0 docs on page 93 and 103/106. I suppose it's the jboss-web.xml that I need to bundle with web.xml in the WEB-INF directory of the war? Can someone confirm this?
-
7. Re: Multiple datasources over single connection pool
davidjencks May 8, 2003 9:32 PM (in response to trygvis)That's correct. For ejbs, you perform a similar mapping in jboss.xml
-
8. Re: Multiple datasources over single connection pool
bkbonner May 9, 2003 7:41 AM (in response to trygvis)Thank you.