{"action":"created","comment":{"url":"https://api.github.com/repos/jdbi/jdbi/pulls/comments/43667887","id":43667887,"diff_hunk":"@@ -0,0 +1 @@\n+org.jdbi.v3.guava.GuavaPlugin","path":"guava/src/main/resources/META-INF/services/org.jdbi.v3.spi.JdbiPlugin","position":1,"original_position":1,"commit_id":"c04853b7ba91f3734b1a8225d11d96e10ab7bb54","original_commit_id":"c04853b7ba91f3734b1a8225d11d96e10ab7bb54","user":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"body":"easy to register with the `ServiceLoader`","created_at":"2015-11-02T19:14:34Z","updated_at":"2015-11-02T19:14:34Z","html_url":"https://github.com/jdbi/jdbi/pull/217#discussion_r43667887","pull_request_url":"https://api.github.com/repos/jdbi/jdbi/pulls/217","_links":{"self":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/comments/43667887"},"html":{"href":"https://github.com/jdbi/jdbi/pull/217#discussion_r43667887"},"pull_request":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/217"}}},"pull_request":{"url":"https://api.github.com/repos/jdbi/jdbi/pulls/217","id":49472238,"html_url":"https://github.com/jdbi/jdbi/pull/217","diff_url":"https://github.com/jdbi/jdbi/pull/217.diff","patch_url":"https://github.com/jdbi/jdbi/pull/217.patch","issue_url":"https://api.github.com/repos/jdbi/jdbi/issues/217","number":217,"state":"open","locked":false,"title":"Add Plugin System to JDBI","user":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"body":"hi @qualidafial @brianm @arteam I am thinking about how we might make it easy to extend jdbi with a plugin like system.  Already, we have some obvious use cases -- Guava support without linking directly against Guava, SQLObject hooking into core, etc.\r\n\r\nI have made a test branch here which adds support for automatic discovery of `JdbiPlugin`s via the classpath by a `ServiceLoader`.  This is little more than an idea at this point, but there are two in-tree use cases that are already interesting --\r\n* Guava plugin can register itself with all DBI instances just by being present on classpath\r\n* `HandleTrackerDBI` used in a test case can be a composable plugin, rather than needing to subclass `DBI`\r\n\r\nWhat do you guys think of going down this direction?  I think it would be entirely optional, and the automatic registration should be used only for plugins which are transparent if not used.  For example adding support for custom types (Guava, joda-time) is OK as an automatic plugin, but replacing default transaction semantics would not be.\r\n\r\nThe diff is cluttered a bit because I converted DBI constructors to factory methods.  I'll try to annotate the interesting bits.","created_at":"2015-11-02T19:12:30Z","updated_at":"2015-11-02T19:14:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"faa72b550c4775e37f1b009f8f2eec3ee3712104","assignee":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/jdbi/jdbi/milestones/2","html_url":"https://github.com/jdbi/jdbi/milestones/JDBI%203","labels_url":"https://api.github.com/repos/jdbi/jdbi/milestones/2/labels","id":382959,"number":2,"title":"JDBI 3","description":"Bucket for issues that should be in JDBI 3","creator":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":10,"state":"open","created_at":"2013-07-20T23:48:16Z","updated_at":"2015-11-02T19:12:30Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jdbi/jdbi/pulls/217/commits","review_comments_url":"https://api.github.com/repos/jdbi/jdbi/pulls/217/comments","review_comment_url":"https://api.github.com/repos/jdbi/jdbi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jdbi/jdbi/issues/217/comments","statuses_url":"https://api.github.com/repos/jdbi/jdbi/statuses/c04853b7ba91f3734b1a8225d11d96e10ab7bb54","head":{"label":"stevenschlansker:dbi-factory","ref":"dbi-factory","sha":"c04853b7ba91f3734b1a8225d11d96e10ab7bb54","user":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"repo":{"id":3213293,"name":"jdbi","full_name":"stevenschlansker/jdbi","owner":{"login":"stevenschlansker","id":129097,"avatar_url":"https://avatars.githubusercontent.com/u/129097?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenschlansker","html_url":"https://github.com/stevenschlansker","followers_url":"https://api.github.com/users/stevenschlansker/followers","following_url":"https://api.github.com/users/stevenschlansker/following{/other_user}","gists_url":"https://api.github.com/users/stevenschlansker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenschlansker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenschlansker/subscriptions","organizations_url":"https://api.github.com/users/stevenschlansker/orgs","repos_url":"https://api.github.com/users/stevenschlansker/repos","events_url":"https://api.github.com/users/stevenschlansker/events{/privacy}","received_events_url":"https://api.github.com/users/stevenschlansker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenschlansker/jdbi","description":"jDBI is designed to provide convenient tabular data access in Java(tm). It uses the Java collections framework for query results, provides a convenient means of externalizing sql statements, and provides named parameter support for any database being used.","fork":true,"url":"https://api.github.com/repos/stevenschlansker/jdbi","forks_url":"https://api.github.com/repos/stevenschlansker/jdbi/forks","keys_url":"https://api.github.com/repos/stevenschlansker/jdbi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenschlansker/jdbi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenschlansker/jdbi/teams","hooks_url":"https://api.github.com/repos/stevenschlansker/jdbi/hooks","issue_events_url":"https://api.github.com/repos/stevenschlansker/jdbi/issues/events{/number}","events_url":"https://api.github.com/repos/stevenschlansker/jdbi/events","assignees_url":"https://api.github.com/repos/stevenschlansker/jdbi/assignees{/user}","branches_url":"https://api.github.com/repos/stevenschlansker/jdbi/branches{/branch}","tags_url":"https://api.github.com/repos/stevenschlansker/jdbi/tags","blobs_url":"https://api.github.com/repos/stevenschlansker/jdbi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenschlansker/jdbi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenschlansker/jdbi/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenschlansker/jdbi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenschlansker/jdbi/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenschlansker/jdbi/languages","stargazers_url":"https://api.github.com/repos/stevenschlansker/jdbi/stargazers","contributors_url":"https://api.github.com/repos/stevenschlansker/jdbi/contributors","subscribers_url":"https://api.github.com/repos/stevenschlansker/jdbi/subscribers","subscription_url":"https://api.github.com/repos/stevenschlansker/jdbi/subscription","commits_url":"https://api.github.com/repos/stevenschlansker/jdbi/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenschlansker/jdbi/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenschlansker/jdbi/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenschlansker/jdbi/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenschlansker/jdbi/contents/{+path}","compare_url":"https://api.github.com/repos/stevenschlansker/jdbi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenschlansker/jdbi/merges","archive_url":"https://api.github.com/repos/stevenschlansker/jdbi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenschlansker/jdbi/downloads","issues_url":"https://api.github.com/repos/stevenschlansker/jdbi/issues{/number}","pulls_url":"https://api.github.com/repos/stevenschlansker/jdbi/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenschlansker/jdbi/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenschlansker/jdbi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenschlansker/jdbi/labels{/name}","releases_url":"https://api.github.com/repos/stevenschlansker/jdbi/releases{/id}","created_at":"2012-01-18T22:52:48Z","updated_at":"2015-06-16T01:37:43Z","pushed_at":"2015-11-02T19:00:13Z","git_url":"git://github.com/stevenschlansker/jdbi.git","ssh_url":"git@github.com:stevenschlansker/jdbi.git","clone_url":"https://github.com/stevenschlansker/jdbi.git","svn_url":"https://github.com/stevenschlansker/jdbi","homepage":"http://jdbi.org/","size":12999,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"jdbi:jdbi3","ref":"jdbi3","sha":"f05ae0aa3c9e0fdc53a94c865d5c413000295c92","user":{"login":"jdbi","id":9668860,"avatar_url":"https://avatars.githubusercontent.com/u/9668860?v=3","gravatar_id":"","url":"https://api.github.com/users/jdbi","html_url":"https://github.com/jdbi","followers_url":"https://api.github.com/users/jdbi/followers","following_url":"https://api.github.com/users/jdbi/following{/other_user}","gists_url":"https://api.github.com/users/jdbi/gists{/gist_id}","starred_url":"https://api.github.com/users/jdbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdbi/subscriptions","organizations_url":"https://api.github.com/users/jdbi/orgs","repos_url":"https://api.github.com/users/jdbi/repos","events_url":"https://api.github.com/users/jdbi/events{/privacy}","received_events_url":"https://api.github.com/users/jdbi/received_events","type":"Organization","site_admin":false},"repo":{"id":229738,"name":"jdbi","full_name":"jdbi/jdbi","owner":{"login":"jdbi","id":9668860,"avatar_url":"https://avatars.githubusercontent.com/u/9668860?v=3","gravatar_id":"","url":"https://api.github.com/users/jdbi","html_url":"https://github.com/jdbi","followers_url":"https://api.github.com/users/jdbi/followers","following_url":"https://api.github.com/users/jdbi/following{/other_user}","gists_url":"https://api.github.com/users/jdbi/gists{/gist_id}","starred_url":"https://api.github.com/users/jdbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdbi/subscriptions","organizations_url":"https://api.github.com/users/jdbi/orgs","repos_url":"https://api.github.com/users/jdbi/repos","events_url":"https://api.github.com/users/jdbi/events{/privacy}","received_events_url":"https://api.github.com/users/jdbi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jdbi/jdbi","description":"jDBI is designed to provide convenient tabular data access in Java(tm). It uses the Java collections framework for query results, provides a convenient means of externalizing sql statements, and provides named parameter support for any database being used.","fork":false,"url":"https://api.github.com/repos/jdbi/jdbi","forks_url":"https://api.github.com/repos/jdbi/jdbi/forks","keys_url":"https://api.github.com/repos/jdbi/jdbi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdbi/jdbi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdbi/jdbi/teams","hooks_url":"https://api.github.com/repos/jdbi/jdbi/hooks","issue_events_url":"https://api.github.com/repos/jdbi/jdbi/issues/events{/number}","events_url":"https://api.github.com/repos/jdbi/jdbi/events","assignees_url":"https://api.github.com/repos/jdbi/jdbi/assignees{/user}","branches_url":"https://api.github.com/repos/jdbi/jdbi/branches{/branch}","tags_url":"https://api.github.com/repos/jdbi/jdbi/tags","blobs_url":"https://api.github.com/repos/jdbi/jdbi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdbi/jdbi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdbi/jdbi/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdbi/jdbi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdbi/jdbi/statuses/{sha}","languages_url":"https://api.github.com/repos/jdbi/jdbi/languages","stargazers_url":"https://api.github.com/repos/jdbi/jdbi/stargazers","contributors_url":"https://api.github.com/repos/jdbi/jdbi/contributors","subscribers_url":"https://api.github.com/repos/jdbi/jdbi/subscribers","subscription_url":"https://api.github.com/repos/jdbi/jdbi/subscription","commits_url":"https://api.github.com/repos/jdbi/jdbi/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdbi/jdbi/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdbi/jdbi/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdbi/jdbi/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdbi/jdbi/contents/{+path}","compare_url":"https://api.github.com/repos/jdbi/jdbi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdbi/jdbi/merges","archive_url":"https://api.github.com/repos/jdbi/jdbi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdbi/jdbi/downloads","issues_url":"https://api.github.com/repos/jdbi/jdbi/issues{/number}","pulls_url":"https://api.github.com/repos/jdbi/jdbi/pulls{/number}","milestones_url":"https://api.github.com/repos/jdbi/jdbi/milestones{/number}","notifications_url":"https://api.github.com/repos/jdbi/jdbi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdbi/jdbi/labels{/name}","releases_url":"https://api.github.com/repos/jdbi/jdbi/releases{/id}","created_at":"2009-06-17T16:36:36Z","updated_at":"2015-10-30T22:36:35Z","pushed_at":"2015-11-02T19:12:31Z","git_url":"git://github.com/jdbi/jdbi.git","ssh_url":"git@github.com:jdbi/jdbi.git","clone_url":"https://github.com/jdbi/jdbi.git","svn_url":"https://github.com/jdbi/jdbi","homepage":"http://jdbi.org/","size":17721,"stargazers_count":529,"watchers_count":529,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":123,"mirror_url":null,"open_issues_count":36,"forks":123,"open_issues":36,"watchers":529,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/217"},"html":{"href":"https://github.com/jdbi/jdbi/pull/217"},"issue":{"href":"https://api.github.com/repos/jdbi/jdbi/issues/217"},"comments":{"href":"https://api.github.com/repos/jdbi/jdbi/issues/217/comments"},"review_comments":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/217/comments"},"review_comment":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/217/commits"},"statuses":{"href":"https://api.github.com/repos/jdbi/jdbi/statuses/c04853b7ba91f3734b1a8225d11d96e10ab7bb54"}}}}