This is an automated email from the ASF dual-hosted git repository. ntimofeev pushed a commit to branch STABLE-4.2 in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.2 by this push: new 0f22329e2 Fix code blocks in docs 0f22329e2 is described below commit 0f22329e2e73bd4539e5a62dae0fd55d9fa8dbb3 Author: Nikita Timofeev <stari...@gmail.com> AuthorDate: Fri Feb 9 11:55:01 2024 +0400 Fix code blocks in docs --- .../src/docs/asciidoc/_cayenne-guide/part2/starting.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc index 31ea8f610..e0f1358e0 100644 --- a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc +++ b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc @@ -80,7 +80,7 @@ When the projects are merged, the following rules are applied: Web applications can use a variety of mechanisms to configure and start the "services" they need, Cayenne being one of such services. Configuration can be done within standard servlet specification objects like Servlets, Filters, or ServletContextListeners, or can use Spring, JEE CDI, etc. This is a user's architectural choice and Cayenne is agnostic to it and will happily work in any environment. As described above, all that is needed is to create an instance of ServerRuntime somewhere [...] -Still Cayenne includes a piece of web app configuration code that can assist in quickly setting up simple Cayenne-enabled web applications. We are talking about CayenneFilter. It is declared in web.xml: +Still Cayenne includes a piece of web app configuration code that can assist in quickly setting up simple Cayenne-enabled web applications. We are talking about `CayenneFilter`. It is declared in `web.xml`: [source, XML] ---- @@ -107,8 +107,8 @@ When the application runs, all HTTP requests matching the filter url-pattern hav ObjectContext context = BaseContext.getThreadObjectContext(); ---- -Of course, the ObjectContext scope and other behavior of the Cayenne runtime can be customized via dependency injection. For this, another filter init parameter called "extra-modules" is used. "extra-modules" is a comma- or space-separated list of class names, with each class implementing Module interface. These optional custom modules are loaded after the the standard ones, which allows users to override all standard definitions. +Of course, the ObjectContext scope and other behavior of the Cayenne runtime can be customized via dependency injection. For this, another filter init parameter called "extra-modules" is used. "extra-modules" is a comma- or space-separated list of class names, with each class implementing Module interface. These optional custom modules are loaded after the standard ones, which allows users to override all standard definitions. -For those interested in the DI container contents of the runtime created by CayenneFilter, it is the same ServerRuntime as would have been created by other means, but with an extra <code>org.apache.cayenne.configuration.web.WebModule</code> module that provides the <code>org.apache.cayenne.configuration.web.RequestHandler</code> service. This is the service to override in the custom modules if you need to provide a different ObjectContext scope, etc. +For those interested in the DI container contents of the runtime created by `CayenneFilter`, it is the same ServerRuntime as would have been created by other means, but with an extra `org.apache.cayenne.configuration.web.WebModule` module that provides the `org.apache.cayenne.configuration.web.RequestHandler` service. This is the service to override in the custom modules if you need to provide a different ObjectContext scope, etc. -NOTE: You should not think of CayenneFilter as the only way to start and use Cayenne in a web application. In fact, CayenneFilter is entirely optional. Use it if you don’t have any special design for application service management. If you do, simply integrate Cayenne into that design. +NOTE: You should not think of `CayenneFilter` as the only way to start and use Cayenne in a web application. In fact, `CayenneFilter` is entirely optional. Use it if you don’t have any special design for application service management. If you do, simply integrate Cayenne into that design.