Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <tomee>
  3. <!-- If you are only going to use a single database,
  4. uncomment ONE of the datasource definitions below, and
  5. enter YOUR databasename, username and password -->
  6.  
  7. <!-- If you want to switch between databases, you can uncomment
  8. both datasource definitions, and even define more datasources
  9. provided that they all have unique names. You must insert the name
  10. of the datasource you want to use, in the jta-datasource tag in
  11. persistence.xml -->
  12.  
  13. <!-- Use this one if your database server runs on your own computer -->
  14. <Resource id='LocalhostDS' type='DataSource'>
  15. JdbcDriver com.mysql.jdbc.Driver
  16. JdbcUrl jdbc:mysql://localhost:3306/testt
  17. UserName slit
  18. Password slitpwd
  19. JtaManaged true
  20. DefaultAutoCommit false
  21. </Resource>
  22.  
  23. <!-- Use this if you run the database on boltit -->
  24. <!--
  25. <Resource id='BoltitDS' type='DataSource'>
  26. JdbcDriver com.mysql.jdbc.Driver
  27. JdbcUrl jdbc:mysql://boltit.uia.no:3306/slitdb
  28. UserName
  29. Password
  30. JtaManaged true
  31. DefaultAutoCommit false
  32. </Resource>
  33.  
  34. -->
  35.  
  36.  
  37. </tomee>
  38. <!-- The Resource tags above define database connections in TomEE.
  39.  
  40. The id attribute defines a unique name for the connection. You
  41. will use the id to refer to the connection when you want to use
  42. in the application.
  43.  
  44. The type attribute states that this is a DataSource (which is just
  45. a fancy name for database connections). Don't change it.
  46.  
  47. The JdbcDriver keyword is followed by the name of the class
  48. that TomEE will use to connect to the database. Don't change this
  49. either, unless you want to experimant with another database.
  50.  
  51. JdbcUrl tells TomEE where the database is. The url below refers
  52. to a mysql database, running on your own computer. REplace the
  53. word slitdb at the end with the name of your database (schema).
  54.  
  55. UserName and Password are credentials that TomEE will use to log on
  56. to the database.
  57.  
  58. JtaManaged must be true for the database to take part in transactions.
  59.  
  60. DefaultAutoCommit should be false, to prevent the database
  61. interfering with transactions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement