sample.xml 1.4 KB

123456789101112131415161718192021222324252627
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <datasources>
  3. <{{ ift ( value .XBRLGEN_DS_XA true ) "xa-datasource" "datasource" }} jta="{{ value .XBRLGEN_DS_JTA .XBRLGEN_DS_XA true }}" jndi-name="{{ value .XBRLGEN_DS_JNDI "java:/xbrl-gen" }}" pool-name="{{ value .XBRLGEN_DS_POOLNAME "xbrl-gen" }}" use-java-context="{{ value .XBRLGEN_DS_USE_JAVA_CTX true }}" use-ccm="{{ value .XBRLGEN_DS_USE_CCM true }}">
  4. {{- if ( value .XBRLGEN_DS_XA true ) }}
  5. <xa-datasource-property name="URL">{{ value .XBRLGEN_DS_URL "java:mysql://mysql:3306/xbrlgen" }}</xa-datasource-property>
  6. {{- else }}
  7. <connection-url>{{ value .XBRLGEN_DS_URL "java:mysql://mysql:3306/xbrlgen" }}</connection-url>
  8. {{- end }}
  9. {{ if .XBRLGEN_DS_DRIVER -}}
  10. <driver>{{ .XBRLGEN_DS_DRIVER }}</driver>
  11. {{ else -}}
  12. <driver>{{ index ( split ( value .XBRLGEN_DS_URL "java:mysql://mysql:3306/xbrlgen" ) ":" ) 1 }}</driver>
  13. {{ end -}}
  14. <security>
  15. <user-name>{{ value .XBRLGEN_DS_USER "root" }}</user-name>
  16. <password>{{ value .XBRLGEN_DS_PASSWORD "p4ssw0rd" }}</password>
  17. </security>
  18. <timeout>
  19. <blocking-timeout-millis>30000</blocking-timeout-millis>
  20. <idle-timeout-minutes>5</idle-timeout-minutes>
  21. </timeout>
  22. <statement>
  23. <prepared-statement-cache-size>100</prepared-statement-cache-size>
  24. <share-prepared-statements>true</share-prepared-statements>
  25. </statement>
  26. </{{ ift ( value .XBRLGEN_DS_XA true ) "xa-datasource" "datasource" }}>
  27. </datasources>