-
Notifications
You must be signed in to change notification settings - Fork 152
better support for JNDI URLs #186
Conversation
|
+1 |
|
+1 Taking action on this seems really necessary to me. Even without @patcheng's Pull request in datamapper/do#25. As far as I have seen there is absolutely no chance to setup a DataMapper connection without specifying an explicit adapter name in the URI scheme. But this must always be "java:" for JNDI so DM tries to require 'dm-java-adapter'. I'm not sure if it's really necessary to do all the magic for detecting the driver/adapter automatically. The following example (implementable by just 2-3 lines of code) would be fine for me too: |
|
in my case, I was using the same URI in java code, so I didn't want to decorate the URI. It's been a while, but I pretty much copy-n-paste variation the driver detection from other parts of either DataObject, dm-core or dm-migration. |
|
Any chance we could get some specs on this? |
|
Specs for JNDI based connections working on travis? That would definitely be a hard one :) I also have a Tomcat/Oracle11 Setup (but unfortunately without JNDI jet). If someone is basically willing to merge this in I could test the patch in my environment at least. |
|
Oh wow, yeah, it makes a connection to get meta data in order to determine the driver? |
|
Isn't that cool? :) |
|
@tpitale Sorry to be annoying, but this does not have any specs either. |
|
I commented on that as well below. |
|
@tpitale I think its possible to write specs for this without actually connecting a real DB, message expectations. |
|
Yeah, I could write tests which stub out the bits of the java responses. @tillsc thoughts? |
similar to changes for JNDI support in DataObjects. There might be a better way, but I didn't want to upset to much stuff