Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <tomee>
- <!-- If you are only going to use a single database,
- uncomment ONE of the datasource definitions below, and
- enter YOUR databasename, username and password -->
- <!-- If you want to switch between databases, you can uncomment
- both datasource definitions, and even define more datasources
- provided that they all have unique names. You must insert the name
- of the datasource you want to use, in the jta-datasource tag in
- persistence.xml -->
- <!-- Use this one if your database server runs on your own computer -->
- <Resource id='LocalhostDS' type='DataSource'>
- JdbcDriver com.mysql.jdbc.Driver
- JdbcUrl jdbc:mysql://localhost:3306/testt
- UserName slit
- Password slitpwd
- JtaManaged true
- DefaultAutoCommit false
- </Resource>
- <!-- Use this if you run the database on boltit -->
- <!--
- <Resource id='BoltitDS' type='DataSource'>
- JdbcDriver com.mysql.jdbc.Driver
- JdbcUrl jdbc:mysql://boltit.uia.no:3306/slitdb
- UserName
- Password
- JtaManaged true
- DefaultAutoCommit false
- </Resource>
- -->
- </tomee>
- <!-- The Resource tags above define database connections in TomEE.
- The id attribute defines a unique name for the connection. You
- will use the id to refer to the connection when you want to use
- in the application.
- The type attribute states that this is a DataSource (which is just
- a fancy name for database connections). Don't change it.
- The JdbcDriver keyword is followed by the name of the class
- that TomEE will use to connect to the database. Don't change this
- either, unless you want to experimant with another database.
- JdbcUrl tells TomEE where the database is. The url below refers
- to a mysql database, running on your own computer. REplace the
- word slitdb at the end with the name of your database (schema).
- UserName and Password are credentials that TomEE will use to log on
- to the database.
- JtaManaged must be true for the database to take part in transactions.
- DefaultAutoCommit should be false, to prevent the database
- interfering with transactions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement