Setting the Environment for a Thirdy-Party JDBC Driver for more information on how to install these drivers.Concepts of JDBC ResourcesWe should also learn one difference between the concept of JDBC Resources in GlassFish 3 versus WebLogic 12c. In GlassFish, there are two types of JDBC Resources:JDBC Connection PoolsJDBC Resources (aka DataSources)On the other hand, WebLogic treats JDBC Resources as one single thing: Data Sources. The connection pool is part of the data source definition where in GlassFish, the Data Source is a separate artifact, which allows enabling/disabling the object, and also provides the JNDI name to a specific Connection Pool. In few words, when migrating a data source from GlassFish to WebLogic, you will only care about the JDBC Connection Pool and the JNDI name given at the JDBC Resource item.Listing JDBC Resources from a GlassFish domainFirst, let's list all JDBC Resources (datasources) in our GlassFish server. Connect with asadmin and execute the list-jdbc-resources command:asadmin> list-jdbc-resourcesjdbc/__TimerPooljdbc/__defaultjdbc/gf2wlsCommand list-jdbc-resources executed successfully.Let's focus on our example: the jdbc/gf2wls datasource. This will be the DataSource we will migrate from GlassFish to WebLogic. Now let's list all Connection Pools in this GlassFish domain by using asadmin list-jdbc-connection-pools:asadmin> list-jdbc-connection-pools__TimerPoolDerbyPoolmysql_gf2wls_gf2wlsPoolCommand list-jdbc-connection-pools executed successfully.Now of course in case you have dozens of connection pools created in your GlassFish domain, it would be easier to issue a command that shows you which connection pool is associated to the Data Source you want to migrate. To do this, let's use the asadmin get command:asadmin> get resources.jdbc-resource.jdbc/gf2wls.*resources.jdbc-resource.jdbc/gf2wls.enabled=trueresources.jdbc-resource.jdbc/gf2wls.jndi-name=jdbc/gf2wlsresources.jdbc-resource.jdbc/gf2wls.object-type=userresources.jdbc-resource.jdbc/gf2wls.pool-name=mysql_gf2wls_gf2wlsPoolWe not only got which connection pool is associated to this data source but also its JNDI name, because the name of the resource may not be exactly the same as the JNDI name. Extracting GlassFish's JDBC Connection Pool dataNext step is to get all properties of your Connection Pool. Let's issue the asadmin get command again:asadmin> get resources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.*resources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.portNumber=3306resources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.serverName=localhostresources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.databaseName=gf2wlsresources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.User=gf2wlsresources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.URL=jdbc:mysql://localhost:3306/gf2wls?zeroDateTimeBehavior=convertToNullresources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.driverClass=com.mysql.jdbc.Driverresources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.Password=gf2wls... see full outputCommand get executed successfully.Easy, isn't? Now, let's focus on the minimum required properties we need to create this DataSource in WebLogic 12c. They are under resources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.* , so if you want to list only these, change the asadmin method above to the following: asadmin get resources.jdbc-connection-pool.mysql_gf2wls_gf2wlsPool.property.*Create the Data Source in WebLogic using WLSTTo help you witht he final step, I've created a sample WLST script to create a Data Source in WebLogic. In this script, there are a few variables you must define. To call this script, go to your WebLogic installation directory and, if you are on Linux, call $ source setDomainEnv.sh (or the proper script for your environment). Then execute the WLST script: $ java weblogic.WLST ds_gf2wls.pyYou should see the following output:$ java weblogic.WLST ds_gf2wls.pyInitializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandsConnecting to t3://localhost:7001 with userid weblogic ......Starting an edit session ...Started edit session, please be sure to save and activate your changes once you are done.Saving all your changes ...Saved all your changes successfully.Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed.Activation completedThat's it. Check your WebLogic