1. Add the database driver package to the glassfishv3 \ glassfish \ Domains \ domain1 \ Lib \ ext directory of the existing instance on the server.
2. Create a database connection pool
3. Create data as a connection Resource
4. Publish an application
Note: In earlier versions of glassfish V3, if you did not add a database driver package to glassfishv3, glassfish, domains, domain1, Lib, or ext before deploying an EJB application, however, an error is reported when the customer connects (the error cannot be understood, and it will be confusing ), A higher version will prompt this verification error during deployment and the deployment fails. Therefore, if you deploy a database driver package that references it, you must first deploy the database driver package.
Note: If you forget to put the data driver package in the glassfish directory and then put it in, remember to restart glassfish (which can be started in netbeans ),