Container Extension

Container Extension

Extension Description

Service container extension for customizing loading content.

Extension Interface

org.apache.dubbo.container.Container

Extension Configuration

  1. java org.apache.dubbo.container.Main spring jetty log4j

Known Extensions

  • org.apache.dubbo.container.spring.SpringContainer
  • org.apache.dubbo.container.spring.JettyContainer
  • org.apache.dubbo.container.spring.Log4jContainer

Extension Example

Maven project structure:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxContainer.java (implements Container interface)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.container.Container (plain text file, content: xxx=com.xxx.XxxContainer)

XxxContainer.java:

  1. package com.xxx;
  2. org.apache.dubbo.container.Container;
  3. public class XxxContainer implements Container {
  4. public Status start() {
  5. // ...
  6. }
  7. public Status stop() {
  8. // ...
  9. }
  10. }

META-INF/dubbo/org.apache.dubbo.container.Container:

  1. xxx=com.xxx.XxxContainer

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)