Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Conversation

@patcheng
Copy link
Contributor

similar to changes for JNDI support in DataObjects. There might be a better way, but I didn't want to upset to much stuff

@carlhoerberg
Copy link

+1

@tillsc
Copy link

tillsc commented Dec 7, 2012

+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:

DataMapper.setup(:default, 'java:/comp/env/jdbc/upb?scheme=oracle') 

@patcheng
Copy link
Contributor Author

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.

@tpitale
Copy link
Member

tpitale commented Mar 26, 2015

Any chance we could get some specs on this?

@tillsc
Copy link

tillsc commented Mar 26, 2015

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.

@tpitale
Copy link
Member

tpitale commented Mar 26, 2015

Oh wow, yeah, it makes a connection to get meta data in order to determine the driver?

@tillsc
Copy link

tillsc commented Mar 26, 2015

Isn't that cool? :)

@tpitale tpitale merged commit fc68d0e into datamapper:master May 24, 2016
@mbj
Copy link
Member

mbj commented May 24, 2016

@tpitale Sorry to be annoying, but this does not have any specs either.

@tpitale
Copy link
Member

tpitale commented May 24, 2016

I commented on that as well below.

@mbj
Copy link
Member

mbj commented May 24, 2016

@tpitale I think its possible to write specs for this without actually connecting a real DB, message expectations.

@tpitale
Copy link
Member

tpitale commented May 24, 2016

Yeah, I could write tests which stub out the bits of the java responses. @tillsc thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants