{"id":1074,"date":"2016-04-11T04:20:46","date_gmt":"2016-04-11T04:20:46","guid":{"rendered":"https:\/\/gja.rfl.mybluehost.me\/website_fd74af1b\/creating-datasource-in-weblogic-console-for-applications-to-access-database-server\/"},"modified":"2026-03-04T19:13:30","modified_gmt":"2026-03-04T19:13:30","slug":"creating-datasource-in-weblogic-console-for-applications-to-access-database-server","status":"publish","type":"post","link":"https:\/\/onwardpath.com\/intelligence\/creating-datasource-in-weblogic-console-for-applications-to-access-database-server\/","title":{"rendered":"Creating DataSource in Weblogic Console \u2013 for applications to access Database server"},"content":{"rendered":"\n<p class=\"\">Developers building applications to be deployed in WebCenter Spaces \/ Portal, WebCenter Sites will need access to the database server. &nbsp;There are two options to achieve this.<\/p>\n\n\n\n<p class=\"\"><strong>Option A:<\/strong> Create a user\/password in the database and pass it to the developer team.<\/p>\n\n\n\n<p class=\"\">This option has the following dis-advantages.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"\">The username\/password is hardcoded in the Application. So in future if there is a change in username\/password, the change has to be made in the Application.<\/li>\n\n\n\n<li class=\"\">Giving direct access to the database is not a secure option, and will compromise Database Security.<\/li>\n<\/ol>\n\n\n\n<p class=\"\">To overcome this an alternate method generally used is,<\/p>\n\n\n\n<p class=\"\"><strong>Option B:<\/strong> Create a Data Source in the Weblogic Server and grant access to this data source to the applications deployed to the WebCenter Spaces\/Portal servers.<\/p>\n\n\n\n<p class=\"\">This option has the following advantages.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"\">The application only references the data source name. All applications running on the server can use the same Data Source to securely access the database.<\/li>\n\n\n\n<li class=\"\">Any change in permissions, passwords etc., can be done centrally at the Weblogic Server Console by modifying the Data Source configuration, and the applications can remain unaffected.<\/li>\n\n\n\n<li class=\"\">This also ensures that a secure access to the Database is provided.<\/li>\n\n\n\n<li class=\"\">Moving WAR files from Development Environment to UAT and then to Production Environment can be done seamlessly without changing any application code. (To achieve this, a Data Source with the \u201csame name\u201d should be created in all (DEV, UAT, Production) environments.<\/li>\n<\/ol>\n\n\n\n<p class=\"\">Now, Let\u2019s see how to create a \u201c<strong>Data Source<\/strong>\u201d in the Weblogic server.<\/p>\n\n\n\n<p class=\"\">Login to WeblogicServer Console and select\u201c<strong>DataSources\u201d<\/strong> from the menu on the left (under \u201cDomain Structure\u201d tab \u201cServices\u201d menu). The screen on the right displays the list of Data Sources created. Click on the <strong>NEW<\/strong> button at the top (as shown in the below screen), to create a new Data Source.<\/p>\n\n\n\n<p class=\"\"><\/p>\n\n\n\n<p class=\"\">After clicking new button, select \u201cGenericDatasource\u201d from ListPopup then Specify the name for <strong>Data source,JNDI Name<\/strong>and <strong>Database type. <\/strong>In the screenshot below, we have used the following details.<\/p>\n\n\n\n<p class=\"\">Name of Data Source: <strong>Sample<\/strong><\/p>\n\n\n\n<p class=\"\">JNDI Name: <strong>jdbc\/testDS<\/strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &gt;&gt;<span style=\"color: #800000;\"> ADF Expects ALL JNDI names used by it to end with the string DS.<\/span><\/p>\n\n\n\n<p class=\"\">Database type: <strong>Oracle<\/strong> (We have chosen \u201cOracle\u201d here. But you could choose the name of the respective database used in your setup).<\/p>\n\n\n\n<p class=\"\"><\/p>\n\n\n\n<p class=\"\">then click <strong>NEXT&nbsp;<\/strong>to continue&#8230;&#8230;.<\/p>\n\n\n\n<p class=\"\"><\/p>\n\n\n\n<p class=\"\">This&nbsp;screen prompts us to enter the details for the Database connection (Oracle) chosen in the previous screen.<\/p>\n\n\n\n<p class=\"\"><strong>Database Name:<\/strong>&nbsp; The Database name given here is OWCSDB. You can replace it with the name of &nbsp;your database.<\/p>\n\n\n\n<p class=\"\"><strong>HostName:<\/strong> &#8211; &lt;IP-address&gt; or hostname<\/p>\n\n\n\n<p class=\"\"><strong>Port:<\/strong> -The default port for Oracle is 1521. This might be different for other databases.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"\">Click on \u201cNEXT\u201d button. The next screen has an option to test the configuration details entered for the Database Connection.<\/p>\n\n\n\n<p class=\"\"><\/p>\n\n\n\n<p class=\"\">Click on \u201cTest Configuration\u201d button to test the Database connection. If the Connection details entered in the previous screen are valid, and connection to database is established successfully, a success message \u201c<strong>Connection test Succeeded<\/strong>\u201d is displayed.<\/p>\n\n\n\n<p class=\"\">If there are errors, an error message is displayed. Click on \u201c<strong>Back<\/strong>\u201d button to go to the previous screen and re-enter the Database Connection Configuration details.<\/p>\n\n\n\n<p class=\"\">Once Connection test is successful, click on <strong>NEXT<\/strong> button to proceed.<\/p>\n\n\n\n<p class=\"\">The next screen, as shown above, lists all servers running in Weblogic. In this screen, select the target servers to which the Data Source needs to be deployed.<\/p>\n\n\n\n<p class=\"\"><strong>For e.g.,<\/strong> if the server \u201c<strong>WC_Spaces<\/strong>\u201d is selected, the Data Source is deployed to this server and all applications running on this server can access the database using the \u201cData Source\u201d created. Multiple servers can be selected as target servers.<\/p>\n\n\n\n<p class=\"\">The application developers need only know the Data Source Name to be included in their application, thus providing a secure access to the database.<\/p>\n\n\n\n<p class=\"\">&nbsp;<\/p>\n\n\n\n<p class=\"\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Developers building applications to be deployed in WebCenter Spaces \/ Portal, WebCenter Sites will need access to the database server. &nbsp;There are two options to achieve this. Option A: Create a user\/password in the database and pass it to the developer team. This option has the following dis-advantages. To overcome this an alternate method generally [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":4186,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[37],"tags":[85,86,87,72,47],"class_list":["post-1074","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-blog","tag-data-source","tag-database","tag-j2ee","tag-oracle","tag-weblogic"],"jetpack_featured_media_url":"https:\/\/onwardpath.com\/intelligence\/wp-content\/uploads\/2020\/09\/22-database-server.jpg","_links":{"self":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/1074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/comments?post=1074"}],"version-history":[{"count":2,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/1074\/revisions"}],"predecessor-version":[{"id":6915,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/1074\/revisions\/6915"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/media\/4186"}],"wp:attachment":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/media?parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/categories?post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/tags?post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}