Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Cargo
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h3>Definition</h3><table class="wysiwyg-macro" data-macro-name="excerpt" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2V4Y2VycHQ6YXRsYXNzaWFuLW1hY3JvLW91dHB1dC10eXBlPUJMT0NLfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>Create a container instance</p></td></tr></table><h3>Support Matrix</h3><table class="confluenceTable"><tbody><tr><th class="confluenceTh"><p>Java</p></th><th class="confluenceTh"><p>Ant</p></th><th class="confluenceTh"><p>Maven2</p></th></tr><tr><td class="confluenceTd"><p><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></p></td><td class="confluenceTd"><p><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></p></td><td class="confluenceTd"><p><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></p></td></tr></tbody></table><h3>Java API</h3><p>If you're using the Java API there are 2 solutions to instantiate a container:</p><ul><li>by instantiating the Java object implementing the container and passing a <a class="confluence-link" href="/display/CARGO/Configuration" data-linked-resource-id="13113" data-linked-resource-type="page" data-linked-resource-default-alias="Configuration" data-base-url="http://docs.codehaus.org">Configuration</a> object to it. For example:</li></ul><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>Container container = new Orion2xLocalContainer(configuration); [...] Container container = new Resin3xLocalContainer(configuration); [...] Container container = new Weblogic8xLocalContainer(configuration); [...] Container container = new TomcatRemoteContainer(configuration); </pre></td></tr></table><ul><li>by using the <code>DefaultContainerFactory</code> class. The advantage is that you can instantiate the container by name and thus your code can be generic which is nice if you plan to run the same code with different containers. For example, to instantiate a Resin 3.x <a class="confluence-link" href="/display/CARGO/Installed+Container" data-linked-resource-id="13094" data-linked-resource-type="page" data-linked-resource-default-alias="Installed Container" data-base-url="http://docs.codehaus.org">installed local container</a>:</li></ul><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>ContainerFactory factory = new DefaultContainerFactory(); Container container = factory.createContainer("resin3x", ContainerType.INSTALLED, configuration); </pre></td></tr></table><p>In general we recommend that you use the factory method to instantiate a container as this makes your code more flexible.</p><p>The class or container id to use for instantiating a container can be found on each container's documentation page:</p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2NoaWxkcmVuOnBhZ2U9Q29udGFpbmVyc30&locale=en_GB&version=2" data-macro-name="children" data-macro-parameters="page=Containers"></p><h3>Example using Cargo extensions</h3><p>If you're using a Cargo <a class="confluence-link" href="/display/CARGO/Extensions" data-linked-resource-id="37524" data-linked-resource-type="page" data-linked-resource-default-alias="Extensions" data-base-url="http://docs.codehaus.org">extension</a> you'll use the way defined by the extension to instantiate a container. Underneath, all extensions use the factory method to instantiate containers.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced