Connecting Cassandra to JNDI in WildFly: A Guide for Integration with cassandra-jdbc-wrapper-4.11.0.jar #47
Replies: 8 comments 3 replies
-
Hello @Arjunguptha98, I´m not sure to understand your question. And you can refer to this page for driver and connection URL settings. |
Beta Was this translation helpful? Give feedback.
-
Hi @maximevw |
Beta Was this translation helpful? Give feedback.
-
Hello @Arjunguptha98 First of all, I will convert this to a discussion as your question is not an issue related to the JDBC driver. :) I have no expertise with Wildfly, but based on the following sources (here and there), I think you should do something like this: (UPDATED on base of the next comments)
<module xmlns="urn:jboss:module:1.9" name="com.ing.data">
<resources>
<resource-root path="cassandra-jdbc-wrapper-4.11.0-bundle.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="org.apache.logging.log4j.api"/>
</dependencies>
</module>
<datasource jndi-name="java:jboss/datasources/cassandraDS" pool-name="cassandraDS" enabled="true">
<connection-url>{JDBC URL}</connection-url>
<driver>cassandra</driver>
<security user-name="{username}" password="{password}" />
</security>
</datasource>
<driver name="cassandra" module="com.ing.data">
<driver-class>com.ing.data.cassandra.jdbc.CassandraDriver</driver-class>
</driver>
There is no guarantee it works exactly like this, I just deduced that from various documentation found on the Internet and I never tested this. I really encourage you to consult the WildFly Admin guide for further details on JDBC datasource configuration. |
Beta Was this translation helpful? Give feedback.
-
Hi @maximevw. Thanks for the response. |
Beta Was this translation helpful? Give feedback.
-
It seems it doesn't find the driver. At step 2, I think there is a mistake and the directory should be |
Beta Was this translation helpful? Give feedback.
-
Hi @maximevw . |
Beta Was this translation helpful? Give feedback.
-
Thank you for your insightful feedback. The details you shared were instrumental in resolving the issues I encountered with the setup. |
Beta Was this translation helpful? Give feedback.
-
Hi @maximevw |
Beta Was this translation helpful? Give feedback.
-
Hi team,
I've developed this project and obtained the cassandra-jdbc-wrapper-4.11.0.jar. With this JAR, I've successfully executed a Java JDBC program. Currently, I'm attempting to establish a connection between Cassandra and JNDI (using WildFly). Could you provide guidance on achieving this use case if it's possible?
Beta Was this translation helpful? Give feedback.
All reactions