I've been asked to write some code which can create multiple jboss datasource connection pools programatically upon startup.
I've done this using a shell script which generates -ds.xml files at startup, which jboss then reads, but I've been told it must be done programmatically in Java.
Of course I can create the datasources myself, that's easy enough, but we need to use a jboss connection pool with a configurable max and min pool size, bound in JNDI. I'd rather not write my own connection pool implementation...
And just to make the problem that much harder, we're using jboss 5.0.1 and no we can't upgrade it for this task.
Is this even possible?
-edit-
So I can do this:
OracleDataSource ds = new OracleDataSource();
ds.setURL(url);
ds.setUser(user);
ds.setPassword(pass);
Context ctx = JndiLookups.getInitialContext();
ctx.bind(dsName, ds);
But I don't think this gives me connection pooling, does it? I need to be able to specify a connection pool size, blocking timeout, etc
Collectioninstead of inheriting it. - fge