{"id":5092,"date":"2013-05-15T13:29:59","date_gmt":"2013-05-15T18:29:59","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=5092"},"modified":"2013-12-03T16:44:00","modified_gmt":"2013-12-03T22:44:00","slug":"understanding-the-data-source-configuration-file-for-web-2-0-templates-2","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/m-power-admin\/understanding-the-data-source-configuration-file-for-web-2-0-templates-2","title":{"rendered":"Data Source Configuration file for m-Power"},"content":{"rendered":"<h1 class=\"MsoNormal\">Data Source Configuration file for m-Power Templates<\/h1>\n<p class=\"MsoNormal\">The Data Source Configuration option allows developers to control how their\u00a0<b>run-time<\/b> applications connect to the back-end database. This file is a global file, meaning that it is applicable across every data dictionary on the system. This file works in conjunction with its sister file, the Servlet Properties file. More information about the Servlet Properties file can be found <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/m-power-admin\/understanding-the-servlet-properties-file-for-web-2-0-templates\">here<\/a>.<\/p>\n<p class=\"MsoNormal\">This file can be accessed via the &quot;Admin Menu&quot;. Next, click \u201cEdit Dictionary Files\u201d. From here, select \u201cData Source Configuration\u201d.<\/p>\n<p class=\"MsoNormal\"><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/NewGUIdataSource.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"626\" class=\"alignnone  wp-image-5102\" alt=\"NewGUIdataSource\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/NewGUIdataSource.jpg\" srcset=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/NewGUIdataSource.jpg 899w, https:\/\/www.mrc-productivity.com\/legacy\/images\/NewGUIdataSource-150x104.jpg 150w, https:\/\/www.mrc-productivity.com\/legacy\/images\/NewGUIdataSource-300x208.jpg 300w\" sizes=\"auto, (max-width: 899px) 100vw, 899px\" \/><\/a><\/p>\n<p class=\"MsoNormal\">The next window allows you to setup all the properties to connect to the database. For the purposes of this document, we will cover the AS400 Remote Database connection.<\/p>\n<p class=\"MsoNormal\">The configuration window will look like this:<\/p>\n<p class=\"MsoNormal\"><span style=\"mso-no-proof: yes;\">\u00a0<a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1158\" height=\"868\" class=\"alignnone size-full wp-image-5108\" alt=\"mrc-spring-context-new\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new.jpg\" srcset=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new.jpg 1158w, https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new-150x112.jpg 150w, https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new-300x224.jpg 300w, https:\/\/www.mrc-productivity.com\/legacy\/images\/mrc-spring-context-new-900x674.jpg 900w\" sizes=\"auto, (max-width: 1158px) 100vw, 1158px\" \/><\/a><\/span><\/p>\n<p class=\"MsoNormal\">The values that are important to note are as follows:<\/p>\n<p class=\"MsoNormal\">On the Data Source column, there is an id. It is set to \u201cas400_remote1\u2033. This specifically ties to a value in the \u201cOthers\u201d tab within the Servlet Properties file. This serves as the <b>unique identifier<\/b> for this section.<\/p>\n<p class=\"MsoNormal\">On the URL row, there is the following text: jdbc:as400\/\/xxx.xxx.x.xxx;libraries=;translate binary=true;prompt=false<\/p>\n<p class=\"MsoNormal\">The IP address tells the connection <b>where<\/b> to physically find the database.<\/p>\n<p class=\"MsoNormal\">The \u201clibraries\u201d section specifies a <b>library list<\/b>. This library list is useful for one of two reasons.<\/p>\n<p style=\"padding-left: 30px;\">1) If calling an RPG external object and tables you are chaining to outside of your current RPG library must be referenced here.<br \/>\n2) If you wish to not include the schema name that the application was developed with, at runtime the servlet will attempt to use the schemas off this list in order to find the appropriate tables.<\/p>\n<p class=\"MsoNormal\">In either case, similar to an AS400 Library List, the servlet will attempt to work left to right, in order, to find a valid table.<\/p>\n<p class=\"MsoNormal\">Lastly, there are a Username and Password rows, respectively. You must enter a <b>valid<\/b> username and password so that the Java Database Connection can properly authenticate against your system. Without these valid values, your applications will not run correctly as your database will not allow unauthorized access. <b>Note:<\/b> mrc strongly recommends setting your database username and password to never expire, as an expired password can cause problems when attempting to access the interface.<\/p>\n<p class=\"MsoNormal\"><b>Note:<\/b> Since this file is global, this will serve as a master connection list. It is possible to connect to multiple databases at runtime, so long as the proper information has been filled out within this file.<\/p>\n<p class=\"MsoNormal\"><b>Note:<\/b> If you wish to connect to two or more of the same type of database connection (i.e. two remote AS400 DBs), simply copy the connection by clicking the \u201cCopy\u201d button, and give the newly copied connection a unique <b>id <\/b><span style=\"mso-bidi-font-weight: bold;\">(i.e. AS400_remote2)<\/span>. That way you can reference this ID within the Servlet Properties file.<\/p>\n<p class=\"MsoNormal\"><b>Note:<\/b> This file can be found in this location on your system\u2019s drive: \\m-power\\mrcjava\\WEB-INF\\classes\\mrc-spring-context.xml<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data Source Configuration file for m-Power Templates The Data Source Configuration option allows developers to control how their\u00a0run-time applications connect to the back-end database. This file is a global file, meaning that it is applicable across every data dictionary on the system. This file works in conjunction with its sister file, the Servlet Properties file. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1161,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5092","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=5092"}],"version-history":[{"count":29,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5092\/revisions"}],"predecessor-version":[{"id":7205,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/5092\/revisions\/7205"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1161"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=5092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}