diff --git a/src/en/guide/conf/dataSource/multipleDatasources.gdoc b/src/en/guide/conf/dataSource/multipleDatasources.gdoc index b689073b0d3..6b457697dfa 100644 --- a/src/en/guide/conf/dataSource/multipleDatasources.gdoc +++ b/src/en/guide/conf/dataSource/multipleDatasources.gdoc @@ -31,49 +31,52 @@ environments: initialSize: 5 {code} -This configures a single @DataSource@ with the Spring bean named @dataSource@. To configure extra @DataSource@s, add a @dataSources@ block (at the top level, in an environment block, or both, just like the standard @DataSource@ definition) with a custom name, separated by an underscore. For example, this configuration adds a second @DataSource@, using MySQL in the development environment and Oracle in production: +This configures a single @DataSource@ with the Spring bean named @dataSource@. To configure extra @DataSource@s, add a @dataSources@ block (at the top level, in an environment block, or both, just like the standard @DataSource@ definition) with a custom name. For example, this configuration adds a second @DataSource@, using MySQL in the development environment and Oracle in production: {code} --- -dataSources: - dataSource: - pooled: true - jmxExport: true - driverClassName: org.h2.Driver - username: sa - password: - dataSource_lookup: - dialect: org.hibernate.dialect.MySQLInnoDBDialect - driverClassName: com.mysql.jdbc.Driver - username: lookup - password: secret - url: jdbc:mysql://localhost/lookup - dbCreate: update +dataSources: + dataSource: + pooled: true + jmxExport: true + driverClassName: org.h2.Driver + username: sa + password: + lookup: + dialect: org.hibernate.dialect.MySQLInnoDBDialect + driverClassName: com.mysql.jdbc.Driver + username: lookup + password: secret + url: jdbc:mysql://localhost/lookup + dbCreate: update environments: development: - dataSource: - dbCreate: create-drop - url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE + dataSources: + dataSource: + dbCreate: create-drop + url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE test: - dataSource: - dbCreate: update - url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE + dataSources: + dataSource: + dbCreate: update + url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE production: - dataSource: - dbCreate: update - url: jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE - properties: - jmxEnabled: true - initialSize: 5 - ... - dataSource_lookup: - dialect: org.hibernate.dialect.Oracle10gDialect - driverClassName: oracle.jdbc.driver.OracleDriver - username: lookup - password: secret - url: jdbc:oracle:thin:@localhost:1521:lookup - dbCreate: update + dataSources: + dataSource: + dbCreate: update + url: jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE + properties: + jmxEnabled: true + initialSize: 5 + ... + lookup: + dialect: org.hibernate.dialect.Oracle10gDialect + driverClassName: oracle.jdbc.driver.OracleDriver + username: lookup + password: secret + url: jdbc:oracle:thin:@localhost:1521:lookup + dbCreate: update {code} You can use the same or different databases as long as they're supported by Hibernate. diff --git a/src/en/ref/Tags/javascript.gdoc b/src/en/ref/Tags/javascript.gdoc index 77d32b895a6..4edcb547c98 100644 --- a/src/en/ref/Tags/javascript.gdoc +++ b/src/en/ref/Tags/javascript.gdoc @@ -2,9 +2,7 @@ h1. javascript h2. Purpose -Includes JavaScript libraries and scripts as well as providing a shorthand for inline JavaScript. Specifying a library indicates to the Ajax tags which JavaScript provider to use. - -This tag is [Resources plugin|http://grails.org/plugin/resources] aware, and will defer to the plugin to generate links to JavaScript as appropriate. It does this by including a resource module with the same name as the library you specify. +Includes JavaScript libraries and scripts as well as providing a shorthand for inline JavaScript. h2. Examples @@ -12,24 +10,19 @@ h2. Examples // actually imports '/app/js/myscript.js' -// imports all the necessary js for the scriptaculous library - - alert('hello') {code} h2. Description -If you do not include a "library" or "src" attribute but instead provide a body, the result is an inline script. +If you do not include a "src" attribute but instead provide a body, the result is an inline script. If you use this tag to render inline JavaScript code, it is recommended that you use the Resources plugin's tag to produce inline script that is included at the end of the body, or in the head if necessary - rather than inline. For more control use the Resources plugin's "":http://grails-plugins.github.com/grails-resources/ref/Tags/script.html tag directly. Attributes * @contextPath@ (optional) - the context path to use (relative to the application context path). Defaults to "" or path to the plugin for a plugin view or template. -* @library@ (optional) - The name of the library to include. Typical values include "jquery", "prototype", "scriptaculous", "yahoo" or "dojo" but plugins can contribute new providers. If the Resources plugin is installed, no link to the library will be rendered immediately. Rather, it will include the resource module with the same name as the library and let Resources do the rest. This means you must have a resource module declared with the same name, as if you had used an @@ tag. * @src@ (optional) - The name of the JavaScript file to import. Will look in /appname/js directory -* @base@ (optional) - specifies the full base url to prepend to the library name * @plugin@ (optional) - The plugin to look for the JavaScript in h2. Source