-
1. Re: JCA in 2.4.4
davidjencks May 16, 2002 9:15 AM (in response to falk)As I recall, the PoolName attribute indicates the jndi name to look up the connection factory, in this case a DataSource.
DataSource ds = (DataSource)new InitialContext().lookup("java:/MinervaDS");
Connection c = ds.getConnection(); -
2. Re: JCA in 2.4.4
falk May 17, 2002 4:13 AM (in response to falk)Thank you David!
So I tried it with this:
java.sql.Connection connection=null;
javax.naming.Context ctx = new InitialContext(p);
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:/MinervaDS");
connection = ds.getConnection();
but I've got the exception:
[INFO,MinervaDS] Unable to create
ManagedConnection: javax.resource.ResourceException: Unable to
create DB connection: java.sql.SQLException: No suitable driver
Looking in the logfile, there were some output during
startup the jca-connector-mbean:
[09:36:10,344,MinervaDS] Not setting config
property 'Driver'
[09:36:10,354,MinervaDS] Not setting config
property 'Password'
[09:36:10,354,MinervaDS] Not setting config
property 'UserName'
I tried to set these Properties:
...
ConnectionURL=jdbc:HypersonicSQL:hsql://localhost:1476
Driver=org.hsqldb.jdbcDriver
UserName=sa
Password=
The output "not setting config" didn't appear again.
But I've got also the exception:
[INFO,MinervaDS] Unable to create ManagedConnection: javax.resource.ResourceException: Unable to create DB connection: java.sql.SQLException: No suitable driver
Do I have to configure something more (I'm using JBoss 2.4.4)???
Maybe the Driver org.hsqldb.jdbcDriver is not suitable? -
3. Re: JCA in 2.4.4
davidjencks May 17, 2002 9:05 AM (in response to falk)try with url jdbc:hsqldb:hsql://localhost:1476
I think a more recent version of hypersonic comes with 2.4.4 than was available when the example config was written. -
4. Re: JCA in 2.4.4
falk May 17, 2002 9:06 AM (in response to falk)ok, I solved the Problem.
The URL was wrong.
wrong one: jdbc:HypersonicSQL:hsql://localhost:1476
right one: jdbc:hsqldb:hsql://localhost:1476
with this configuration it works in 2.4.4
<!-- Connection factory for the Minerva JDBC resource adapter. This
points at the same database as DefaultDS. -->
MinervaDS
JCA:service=RARDeployer
Minerva JDBC LocalTransaction ResourceAdapter
ConnectionURL=jdbc:hsqldb:hsql://localhost:1476
Driver=org.hsqldb.jdbcDriver
UserName=sa
Password=
MinervaSharedLocalCMFactory
<!-- See the documentation for the specific connection manager
implementation you are using for the properties you can set -->
# Pool type - uncomment to force, otherwise it is the default
#PoolConfiguration=per-factory
# Connection pooling properties - see
# org.jboss.pool.PoolParameters
MinSize=2
MaxSize=7
Blocking=false
GCEnabled=false
IdleTimeoutEnabled=false
InvalidateOnError=false
TrackLastUsed=false
GCIntervalMillis=120000
GCMinIdleMillis=1200000
IdleTimeoutMillis=1800000
MaxIdleTimeoutPercent=1.0
<!-- Principal mapping configuration -->
org.jboss.resource.security.ManyToOnePrincipalMapping
userName=sa
password=