{"id":28963833,"url":"https://github.com/crowdcode-de/jndi-properties-factory","last_synced_at":"2025-07-24T21:18:22.095Z","repository":{"id":6781452,"uuid":"8028609","full_name":"crowdcode-de/jndi-properties-factory","owner":"crowdcode-de","description":"Small helper classes to inject Properties objects into the jndi tree of JBoss AS 7.","archived":false,"fork":false,"pushed_at":"2013-02-12T15:38:01.000Z","size":177,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-24T04:12:45.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crowdcode-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-05T12:27:58.000Z","updated_at":"2013-12-04T21:25:19.000Z","dependencies_parsed_at":"2022-08-26T06:01:50.775Z","dependency_job_id":null,"html_url":"https://github.com/crowdcode-de/jndi-properties-factory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crowdcode-de/jndi-properties-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fjndi-properties-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fjndi-properties-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fjndi-properties-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fjndi-properties-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crowdcode-de","download_url":"https://codeload.github.com/crowdcode-de/jndi-properties-factory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fjndi-properties-factory/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266904581,"owners_count":24004128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T04:12:44.075Z","updated_at":"2025-07-24T21:18:22.013Z","avatar_url":"https://github.com/crowdcode-de.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PropertiesFactory \n           \nJNDI-Properties provides two simple JNDI ObjectFactory classes that enable you to bind a properties file as a Properties object into the jndi tree of JBoss AS 7.\nThese Properties objects can easily be accessed via the `@Resource` annotation.\n\n    @Resource(mappedName=\"java:/app-config\") \n    private java.util.Properties properties;\n\nYou can choose between `PropertiesFileFactory` or `PropertiesClasspathFactory` class. \n`PropertiesFileFactory` loads the properties from the filesystem via an absolute or relative path. The `PropertiesClasspathFactory` class loads the properties from classpath.     \n\n\n###JBoss AS 7 Setup:\n                                                    \nFor setting up a JBoss AS7 module put into the modules folder a subfolder structure like `de/crowdcode/jndi/properties/main`. And in the main folder place the `jndi-properties.jar` and a `module.xml` file. You can also place your properties files in here too. \n\nThe `module.xml` should look like this:\n\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003cmodule xmlns=\"urn:jboss:module:1.1\" name=\"de.crowdcode.jndi.properties\"\u003e\n\t    \u003cresources\u003e\n\t\t    \u003cresource-root path=\".\"/\u003e\n\t\t    \u003cresource-root path=\"jndi-properties.jar\"/\u003e\n\t    \u003c/resources\u003e  \n\t    \u003cdependencies\u003e\n\t  \t    \u003cmodule name=\"javax.api\" /\u003e\n        \u003c/dependencies\u003e\n    \u003c/module\u003e\n\n####Configuring of `PropertyFileFactory`\n\nDefine the JNDI Binding in the `standalone.xml`:\n\n    \u003csubsystem xmlns=\"urn:jboss:domain:naming:1.1\"\u003e\n        \u003cbindings\u003e\n            \u003cobject-factory \n                name=\"java:/app-config\" \n                module=\"de.crowdcode.jndi.properties\" class=\"de.crowdcode.jndi.properties.PropertiesFileFactory\"/\u003e\n        \u003c/bindings\u003e\n    \u003c/subsystem\u003e                                                                                                                                              \n\nAnd as JBoss AS 7.1.1 doesn't support configuration of ObjectFactories, you need to define a system property with the jndi name as key name.\n\n    \u003csystem-properties\u003e\n        \u003cproperty name=\"java:/app-config\" value=\"/absolute/path/to/the/file/application.properties\"/\u003e\n    \u003c/system-properties\u003e\n\n#####Configuring of `PropertyClasspathFactory`\n\n    \u003csubsystem xmlns=\"urn:jboss:domain:naming:1.1\"\u003e\n        \u003cbindings\u003e\n            \u003cobject-factory \n                name=\"java:/app-config\" \n                module=\"de.crowdcode.jndi.properties\" class=\"de.crowdcode.jndi.properties.PropertiesClasspathFactory\"/\u003e\n        \u003c/bindings\u003e\n    \u003c/subsystem\u003e                                                                                                                                              \n\t\nAdd your properties files into the de/crowdcode/jndi/properties folder. For instance a app-config.properties file. The `PropertyClasspathFactory` provides two options to define the properties file. First, the jndi name ends with the properties filename. So the jndi name `java:/app-config` leads to `app-config.properties`. Second, you define a system property `java:/app-config` that contain the properties file name.  \n\n##License\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"\u003e\n\t\u003cimg alt=\"Creative Commons Lizenzvertrag\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" /\u003e\n\u003c/a\u003e\n\u003cbr /\u003e   \n\n\u003csubsystem xmlns=\"urn:jboss:domain:naming:1.1\"\u003e\n    \u003cbindings\u003e\n        \u003cobject-factory name=\"java:/property-config\" module=\"de.crowdcode.jndi.properties\" class=\"de.crowdcode.jndi.properties.PropertiesFactory\"/\u003e\n    \u003c/bindings\u003e\n\u003c/subsystem\u003e\n\n\u003cspan xmlns:dct=\"http://purl.org/dc/terms/\" href=\"http://purl.org/dc/dcmitype/Text\" property=\"dct:title\" rel=\"dct:type\"\u003e\n\tjndi-properties-factory\n\u003c/span\u003e \nby \n\u003cspan xmlns:cc=\"http://creativecommons.org/ns#\" property=\"cc:attributionName\"\u003eIngo Düppe\u003c/span\u003e \nis licensed under the \n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"\u003eCreative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)\u003c/a\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdcode-de%2Fjndi-properties-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrowdcode-de%2Fjndi-properties-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdcode-de%2Fjndi-properties-factory/lists"}