Does anybody know how to use the Beta 2 driver and set up a connection pool
in JBoss 2.4.x?
I'd like to see
1) Config settings and which files have to be applied
2) Java code that creates a connection from the pool
So far I have the following code and it's not working. When it tries to create a connection, it can't bind to the JNDI resource, either because it's either not bound properly or I'm referencing it improperly. I don't get any JBoss errors when the server starts.
In jboss.jcml I have
jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction
and I try to create the connection in a Java DAO like this
Context ctx = new InitialContext();
ConnectionPoolDataSource ds = (ConnectionPoolDataSource)
PooledConnection pooledConnection = ds.getPooledConnection();
Connection connection = pooledConnection.getConnection();
I get an error on the ctx.lookup() call, the error message is "MyServerPool not found". I've tried all combinations of removing and adding the "jdbc/" both in the Java code and in the jboss.jcml JndiName attribute. I've also tried "java/" as well to no avail. I'm also not sure if I have the correct ConnectionManagerProperties, I got these from a sample I found but using the Avenir JDBC driver for SQL Server sample.