Skip to content

Commit

Permalink
Merge pull request #918 from grails/merge-6.1.x-into-6.2.x
Browse files Browse the repository at this point in the history
Merge 6.1.x into 6.2.x
  • Loading branch information
jamesfredley authored Nov 11, 2024
2 parents 812e104 + 1fee37d commit d1cc2c0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/en/guide/conf/dataSource/multipleDatasources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ If you have a `Foo` domain class in `dataSource1` and a `Bar` domain class in `d

Grails does not by default try to handle transactions that span multiple data sources.

You can enable Grails to use the Best Effort 1PC pattern for handling transactions across multiple datasources. To do so you must set the `grails.transaction.chainedTransactionManagerPostProcessor.enabled` setting to `true` in `application.yml`:
You can enable Grails to use the Best Effort 1PC pattern for handling transactions across multiple datasources. To do so you must set the `grails.transaction.chainedTransactionManager.enabled` setting to `true` in `application.yml`:

[source,yaml]
----
grails:
transaction:
chainedTransactionManagerPostProcessor:
chainedTransactionManager:
enabled: true
----

Expand All @@ -272,7 +272,7 @@ You can exclude transaction manager beans from the BE1PC implementation with thi
----
grails:
transaction:
chainedTransactionManagerPostProcessor:
chainedTransactionManager:
enabled: true
blacklistPattern: '.*'
----
Expand Down
31 changes: 31 additions & 0 deletions src/en/ref/Command Line/create-job.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
== create-job

=== Purpose


The `create-job` command creates a new scheduled job for the given base name.


=== Examples

----
grails create-job Scheduled
grails create-job com.example.Scheduled
----

=== Description


Creates a new Quartz scheduled job with an empty 'execute' method. The argument is required.

The name of the job can include a Java package, such as `com.example` in the last example above, but if one is not provided a default is used. So the first example will create the file `grails-app/jobs/<appname>/ScheduledJob.groovy` whereas the second one will create `grails-app/jobs/com/example/ScheduledJob.groovy`. Note that the first letter of the job name is always upper-cased when determining the class name.

If you want the command to default to a different package for jobs, provide a value for `grails.project.groupId` in the link:{guidePath}/conf.html#config[runtime configuration].

Note that this command is just for convenience and you can also create jobs in your favourite text editor or IDE if you choose.

Usage:
[source,groovy]
----
grails create-job <<name>>
----

0 comments on commit d1cc2c0

Please sign in to comment.