There are 2 problems I see.
1. Your RARDeployment depends tag is indicating that you want a minerva-wrapped jdbc 1 driver, not the cci driver. Find out what the display name sun gives the cci driver and make that tag like:
2. I strongly suspect you need some ManagedConnectionFactoryProperties to tell the cci wrapper what db driver, db, etc, to use. Look at the ra.xml with the cci adapter to find out what to set.
3. I don't know if this adapter works well with local tx. You may possibly need to use an Oracle xa driver and the xa ConnectionManagerFactory.
When you get it working, would you contribute the working configuration to our archive?
I have got it working,
Thanks David, those tidbits of info got me looking in the right place.
I am attaching the xml files that I am using:
You mention adding the files to archive. Where do I do that?
Thanks! I add the files to cvs. The pooling parameters are explained in ch 3 of the online manual.
Normally you don't change the ra.xml supplied with a resource adapter when you deploy it. Also the ra.xml you supply doesn't include the DriverClass property that you set in the service.xml. The ra.xml also has a "create=true" string at the end.
Is this the ra.xml supplied with the blackbox cci adapter? Are you using it? How?
Is the create=true string needed? should it be in the service.xml?
Is the DriverClass parameter needed? I would expect if it is not in the ra.xml it would cause an error or not be loaded.
Hope you can clarify these minor points.
Yes, these are the xml files that we are using with success.
No, the ra.xml is not as shipped.
Sun ship what they have called 'sample-adapters' which provide a CCI interface but use JDBC to do the work. As a result, the sample adapters should, in theory, be able to talk to a number of databases.
I have only modified two lines in the ra.xml that the sample adapters shipped with. They are:
[IS] <config-property-value>jdbc:oracle:thin:@alderon:1521: DB1;create=true</config-property-value>
1. It was not necessary for me change the display name. I should change it back.
2. As you can see the sample stuff has been configured for cloudscape. I changed this for Oracle - our target database.
3. I do not know if the 'create=true' is necessary for Oracle. In any case it works. I have had a quick scan of the sample adpater source code and cannot see where it might be used. I will take it out today and see if it still works. Watch this space for an update.
You mentioned the DriverClass not being specified in the ra.xml. This helps me to understand the following output from JBoss - notice the lines 'trying driver':
12:54:35,185 INFO [CciBlackBoxTx] DriverManager.getConnection("jdbc:oracle:thin:@alderon:1521: DB1")
12:54:35,185 INFO [CciBlackBoxTx] trying driver[className=org.hsqldb.jdbcDriver,org.hsqldb.jdbcDriver@2ab653]
12:54:35,185 INFO [CciBlackBoxTx] trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@253de4]
12:54:36,276 INFO [CciBlackBoxTx] getConnection returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@253de4]
Very polite of JBoss!
How do I specify the DriverClass in the ra.xml?
Finally, to answer your question of two replies ago, it was not necessary to use the XA drivers. I have not tried these.
BTW, I was going to attach the unmodified zip archive of Sun's sample adapter source code and rar's - including three versions of ra.xml [only 240Kb]. However, the web interface for the forum does not seem to be accepting attachements at the moment. It is also available from their site [somewhere :(] - free. Note, I am not using their source as is. I could not get their code to recognise my Oracle stored procedure via JDBC and have made a slight mod the CciInteraction.java code. It now works but I am not convinced they had a bug. Possibly I have made an assumption about possible values for Catalog and Schema parameters to the execute method. Unfortunately, thorough doco for the sample adapters does not exist.
You should be able to use their ra.xml unmodified, the url you supply in the ConnectionFactoryLoader config should override that in the ra.xml (In fact IMO they should not be supplying a url in ra.xml. I think it is highly misleading as to the purpose of the config params).
I think the trace you show is DriverManager looking at all the Drivers to find one that works for the URL you supplied. I don't recall seeing that before--I wonder how they got that logged!
I'm not sure we want to redistribute a modified sun adapter-I haven't looked into their licensing for one thing. Can you supply a diff or patch of your changes?