{"action":"created","comment":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/comments/25856595","id":25856595,"diff_hunk":"@@ -0,0 +1,489 @@\n+/*\n+ * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com\n+ * The software in this package is published under the terms of the CPAL v1.0\n+ * license, a copy of which has been included with this distribution in the\n+ * LICENSE.txt file.\n+ */\n+package org.mule.config.spring;\n+\n+import static org.mule.config.i18n.MessageFactory.createStaticMessage;\n+import org.mule.api.MuleContext;\n+import org.mule.api.MuleRuntimeException;\n+import org.mule.api.context.MuleContextAware;\n+import org.mule.api.lifecycle.Initialisable;\n+import org.mule.api.registry.ObjectLimbo;\n+import org.mule.api.registry.ObjectLimboLocator;\n+import org.mule.api.registry.RegistrationException;\n+import org.mule.api.transaction.TransactionFactory;\n+import org.mule.api.transformer.DataType;\n+import org.mule.api.transformer.DiscoverableTransformer;\n+import org.mule.api.transformer.Transformer;\n+import org.mule.config.bootstrap.BootstrapException;\n+import org.mule.config.bootstrap.BootstrapObjectFactory;\n+import org.mule.config.bootstrap.ClassPathRegistryBootstrapDiscoverer;\n+import org.mule.config.bootstrap.RegistryBootstrapDiscoverer;\n+import org.mule.config.i18n.CoreMessages;\n+import org.mule.config.spring.factories.BootstrapObjectFactoryBean;\n+import org.mule.config.spring.factories.FixedFactoryBean;\n+import org.mule.transformer.TransformerUtils;\n+import org.mule.transformer.types.DataTypeFactory;\n+import org.mule.util.ClassUtils;\n+import org.mule.util.ExceptionUtils;\n+import org.mule.util.OrderedProperties;\n+import org.mule.util.PropertiesUtils;\n+import org.mule.util.UUID;\n+\n+import java.lang.reflect.InvocationTargetException;\n+import java.util.LinkedHashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Map.Entry;\n+import java.util.Properties;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.springframework.beans.factory.support.BeanDefinitionBuilder;\n+import org.springframework.beans.factory.support.BeanDefinitionRegistry;\n+\n+/**\n+ * This object will generate bean definitions for entries defined in a file called <code>registry-bootstrap.properties</code>.\n+ * This allows modules and transports to make certain objects available by default.  The most common use case is for a\n+ * module or transport to load stateless transformers into the registry.\n+ * For this file to be located it must be present in the modules META-INF directory under\n+ * <pre>META-INF/services/org/mule/config/</pre>\n+ * <p/>\n+ * The format of this file is a simple key / value pair. i.e.\n+ * <pre>\n+ * myobject=org.foo.MyObject\n+ * </pre>\n+ * Will register an instance of MyObject with a key of 'myobject'. If you don't care about the object name and want to\n+ * ensure that the object gets a unique name you can use -\n+ * <pre>\n+ * object.1=org.foo.MyObject\n+ * object.2=org.bar.MyObject\n+ * </pre>\n+ * or\n+ * <pre>\n+ * myFoo=org.foo.MyObject\n+ * myBar=org.bar.MyObject\n+ * </pre>\n+ * It's also possible to define if the entry must be applied to a domain, an application, or both by using the parameter applyToArtifactType.\n+ * <pre>\n+ * myFoo=org.foo.MyObject will be applied to any mule application since the parameter applyToArtifactType default value is app\n+ * myFoo=org.foo.MyObject;applyToArtifactType=app will be applied to any mule application\n+ * myFoo=org.foo.MyObject;applyToArtifactType=domain will be applied to any mule domain\n+ * myFoo=org.foo.MyObject;applyToArtifactType=app/domain will be applied to any mule application and any mule domain\n+ * </pre>\n+ * Loading transformers has a slightly different notation since you can define the 'returnClass' with optional mime type, and 'name'of\n+ * the transformer as parameters i.e.\n+ * <pre>\n+ * transformer.1=org.mule.transport.jms.transformers.JMSMessageToObject,returnClass=byte[]\n+ * transformer.2=org.mule.transport.jms.transformers.JMSMessageToObject,returnClass=java.lang.String:text/xml, name=JMSMessageToString\n+ * transformer.3=org.mule.transport.jms.transformers.JMSMessageToObject,returnClass=java.util.Hashtable)\n+ * </pre>\n+ * Note that the key used for transformers must be 'transformer.x' where 'x' is a sequential number.  The transformer name will be\n+ * automatically generated as JMSMessageToXXX where XXX is the return class name i.e. JMSMessageToString unless a 'name'\n+ * parameter is specified. If no 'returnClass' is specified the default in the transformer will be used.\n+ * <p/>\n+ * Note that all objects defined have to have a default constructor. They can implement injection interfaces such as\n+ * {@link MuleContextAware} and lifecycle interfaces such as {@link Initialisable}.\n+ *\n+ * @since 3.7.0\n+ */\n+public class SpringRegistryBootstrap implements MuleContextAware","path":"modules/spring-config/src/main/java/org/mule/config/spring/SpringRegistryBootstrap.java","position":93,"original_position":93,"commit_id":"ed062cddcfbe1617b076ba4e7f07a8aa63c19bfc","original_commit_id":"ed062cddcfbe1617b076ba4e7f07a8aa63c19bfc","user":{"login":"dfeist","id":380765,"avatar_url":"https://avatars.githubusercontent.com/u/380765?v=3","gravatar_id":"","url":"https://api.github.com/users/dfeist","html_url":"https://github.com/dfeist","followers_url":"https://api.github.com/users/dfeist/followers","following_url":"https://api.github.com/users/dfeist/following{/other_user}","gists_url":"https://api.github.com/users/dfeist/gists{/gist_id}","starred_url":"https://api.github.com/users/dfeist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfeist/subscriptions","organizations_url":"https://api.github.com/users/dfeist/orgs","repos_url":"https://api.github.com/users/dfeist/repos","events_url":"https://api.github.com/users/dfeist/events{/privacy}","received_events_url":"https://api.github.com/users/dfeist/received_events","type":"User","site_admin":false},"body":"Worth adding RegistyBootstrap interface in mule-core registry package?  I would.","created_at":"2015-03-05T11:24:24Z","updated_at":"2015-03-05T11:24:24Z","html_url":"https://github.com/mulesoft/mule/pull/1462#discussion_r25856595","pull_request_url":"https://api.github.com/repos/mulesoft/mule/pulls/1462","_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments/25856595"},"html":{"href":"https://github.com/mulesoft/mule/pull/1462#discussion_r25856595"},"pull_request":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/1462"}}},"pull_request":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/1462","id":30471440,"html_url":"https://github.com/mulesoft/mule/pull/1462","diff_url":"https://github.com/mulesoft/mule/pull/1462.diff","patch_url":"https://github.com/mulesoft/mule/pull/1462.patch","issue_url":"https://api.github.com/repos/mulesoft/mule/issues/1462","number":1462,"state":"open","locked":false,"title":"[DO NOT MERGE - FOR REVIEW ONLY] Spring lifecycle","user":{"login":"marianogonzalez","id":1272771,"avatar_url":"https://avatars.githubusercontent.com/u/1272771?v=3","gravatar_id":"","url":"https://api.github.com/users/marianogonzalez","html_url":"https://github.com/marianogonzalez","followers_url":"https://api.github.com/users/marianogonzalez/followers","following_url":"https://api.github.com/users/marianogonzalez/following{/other_user}","gists_url":"https://api.github.com/users/marianogonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/marianogonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianogonzalez/subscriptions","organizations_url":"https://api.github.com/users/marianogonzalez/orgs","repos_url":"https://api.github.com/users/marianogonzalez/repos","events_url":"https://api.github.com/users/marianogonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/marianogonzalez/received_events","type":"User","site_admin":false},"body":"IF YOU MERGE -> YOU BRING PASTRIES","created_at":"2015-03-04T14:53:21Z","updated_at":"2015-03-05T11:24:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"080c4fccd3061052e9e322a50c1db9013a168f82","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mulesoft/mule/pulls/1462/commits","review_comments_url":"https://api.github.com/repos/mulesoft/mule/pulls/1462/comments","review_comment_url":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mulesoft/mule/issues/1462/comments","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/ed062cddcfbe1617b076ba4e7f07a8aa63c19bfc","head":{"label":"mulesoft:spring-lifecycle","ref":"spring-lifecycle","sha":"ed062cddcfbe1617b076ba4e7f07a8aa63c19bfc","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"name":"mule","full_name":"mulesoft/mule","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","created_at":"2012-12-07T19:23:06Z","updated_at":"2015-03-04T21:15:50Z","pushed_at":"2015-03-04T21:15:52Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":405392,"stargazers_count":164,"watchers_count":164,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"open_issues_count":14,"forks":227,"open_issues":14,"watchers":164,"default_branch":"mule-3.x"}},"base":{"label":"mulesoft:mule-3.x","ref":"mule-3.x","sha":"0ad318b7eaa88cfc4c6535694fd810005227ae0f","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"name":"mule","full_name":"mulesoft/mule","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","created_at":"2012-12-07T19:23:06Z","updated_at":"2015-03-04T21:15:50Z","pushed_at":"2015-03-04T21:15:52Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":405392,"stargazers_count":164,"watchers_count":164,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"open_issues_count":14,"forks":227,"open_issues":14,"watchers":164,"default_branch":"mule-3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/1462"},"html":{"href":"https://github.com/mulesoft/mule/pull/1462"},"issue":{"href":"https://api.github.com/repos/mulesoft/mule/issues/1462"},"comments":{"href":"https://api.github.com/repos/mulesoft/mule/issues/1462/comments"},"review_comments":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/1462/comments"},"review_comment":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/1462/commits"},"statuses":{"href":"https://api.github.com/repos/mulesoft/mule/statuses/ed062cddcfbe1617b076ba4e7f07a8aa63c19bfc"}}}}