To create a datasource and a connection pool to help you use databases in your project, edit the $TOMEE_HOME/conf/tomee.xml file.
Inside the <tomee> node, insert a child node like this one:
<Resource id="MyDataSouceDs" type="javax.sql.DataSource">
jdbcDriver = org.postgresql.Driver
jdbcUrl = jdbc:postgresql://[host]:[port]/[database]
jtaManaged = true
maxActive = 20
maxIdle = 20
minIdle = 0
userName = user
password = password
</Resource>
The example targets PostgreSQL, so you will need to perform some changes for another database. Of course, you will also need to change the other parameters according to your needs.