I'm exploring the possibility of using some tools with Modeshape that expect JDBC connectivity. I've been searching forum posts and so forth, but I haven't been able to get a clear picture of the best road forward, so I"m going to ask some questions that I fear may be duplicative. My apologies in advance if that is so...
1) Is MODE's supported JDBC connectivity still limited to supplying "DB" metadata?
I'm not sure what you're asking. We do have a JDBC Metadata Connector that can project/federate metadata from one or more databases into the workspace as a structure of nodes, but that's really federation and not an API.
On the other hand, ModeShape does have a JDBC driver that can be used by local or remote JDBC-aware clients to issue JCR-SQL2 queries to ModeShape. JCR-SQL2 is close enough to SQL that most properly written JDBC clients can deal with it pretty easily, especially if they use JDBC's DatabaseMetaData interface to determine the identifier quote string, the escape strings, and other source-specific variations. (Note that Microsoft SQLServer is different enough w/r/t identifier quote strings that many generic JDBC clients tend to do pretty well.) The driver also exposes database metadata to allow JDBC clients to dynamically examine the "schema", which in ModeShape's case is built from the set of node types. (The Teiid Designer tool uses JDBC's DatabaseMetaData to build a model of a database's schema, and we know it works with ModeShape's driver.)
We actually have two JDBC drivers, and they should be similar to other JDBC drivers. The first is a JAR for a local JDBC driver that will talk to ModeShape in the same JVM process; it lacks the communication libraries and is pretty small. The second is a JAR for a remote JDBC driver that will talk via the RESTful API to ModeShape running in a different JVM; this JAR is a bit bigger because it contains the REST client.
If you are using JBoss EAP with ModeShape installed as a subsystem, you can easily set up a data source using the local driver. Of course, the process is basically the same for setting up a data source in JBoss EAP that talks to a remote ModeShape; the only difference is to install the JDBC driver module and to use the correct driver class.
2) Is it currently possible to use Teiid to supply full JDBC functionality for MODE, or would that require some work to write or update a connector? I did find some MODE code relating to a Teiid sequencer, but it appears to deal with Teiid-related metadata and it's not clear to me how a sequencer would provide any info to Teiid, anyway...
Yes, Teiid is well-integrated with ModeShape and can use it as a source. In fact, ModeShape and Teiid form the bulk of the supported JBoss Data Virtualization platform (formerly called JBoss Enterprise Data Services, or EDS). I mentioned above that Teiid Designer can use ModeShape's JDBC driver to import a Teiid model for a repository, but Teiid also has a ModeShape translator that uses ModeShape's JDBC driver.
I'm sorry the question wasn't clear-- but you managed to answer it helpfully anyway.
I was indeed asking about the path through JCR-SQL2. I'm very happy to learn that it is ready to try. I will start there, and depending on whether the other software with which I am proposing to integrate is well-behaved (in the way you describe above) that might be enough. Otherwise, I'll switch over to Teiid.
Maybe we could add a note to:
to let people know about the JDBC drivers? Should I file a documentation issue for that?