Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why should I map the JDBC resource reference to the Data Source Alias and not to the name of the connection pool as registered in the JNDI Registry service?

0
Posted

Why should I map the JDBC resource reference to the Data Source Alias and not to the name of the connection pool as registered in the JNDI Registry service?

0

Powerful and so simple: If you map the resource reference to the Data Source Alias – rather then hard code the name of the connection pool in the deployment descriptor, as would be the case with the pure J2EE approach – not only the Java code, but also the deployment descriptors of your J2EE components can remain untouched if you decide to move the application data to another database instances/schema. That means: The whole application is easily portable across database instances/schemas. Once deployed, the whole application remains valid and is easily able to work with any database instance/schema. The redirection to another database schema has become a simple administrative task: The server administrator is simply asked to reassign the Data Source Alias your application is using to another database connection pool, namely addressing the target database schema.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123