Thanks David, according to what I found on SyBooks Online:
"Connection libraries and XA resource libraries for Windows (CR #399593) The
XA resource library for JDBC database driver should be
com.sybase.jdbc3.jdbc.SybXADataSource."
and
"The value for the Driver property (DLL or Class Name) to configure the
connection cache should be com.sybase.jdbc3.jdbc.SybXADataSource.
"
so I was presuming that it would implement this.
Also, I tried the non-XA class "com.sybase.jdbc3.jdbc.SybDriver" which gives
the same results.
Looks like I may have found part of the fix:
<bean id="xaDataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.sybase.jdbc3.jdbc.SybXADataSource"/>
<property name="url" value="jdbc:sybase:Tds:machine:port/dbname"/>
<property name="user" value="nnnn"/>
<property name="password" value="nnnn"/>
<property name="defaultTransactionIsolation" value="2"/>
</bean>
Now I'm getting that:
ERROR: Bundle datasource-sybase.xml [84] Error starting
blueprint:file:/C:/JavaApps/apache-karaf-2.2.5/apache-karaf-2.2.5/deploy/dat
asource-sybase.xml (org.osgi.framework.BundleException: Unresolved
constraint in bundle datasource-sybase.xml [84]: Unable to resolv
e 84.3: missing requirement [84.3] package;
(package=org.apache.commons.dbcp))
org.osgi.framework.BundleException: Unresolved constraint in bundle
datasource-sybase.xml [84]: Unable to resolve 84.3: missing requ
irement [84.3] package; (package=org.apache.commons.dbcp)
I tried to do the:
karaf@root> osgi:install
mvn:org.apache.servicemix.bundles.commons-dbcp/1.4_1
^C
java.lang.RuntimeException: URL
[mvn:org.apache.servicemix.bundles.commons-dbcp/1.4_1] could not be
resolved.
so it looks like something is up with my maven settings, but at least I got
past the original error.
If anyone has any ideas as to why I can't resolve the url here, I'd
appreciate it (I haven't worked much with maven, so still trying to get
everything setup correctly -- I may just install the jar/pom manually in my
m2 repository).
--
View this message in context:
http://karaf.922171.n3.nabble.com/deploying-a-database-source-as-service-in-Karaf-2-2-5-tp3814097p3816086.html
Sent from the Karaf - User mailing list archive at Nabble.com.