File: packaging.xml

package info (click to toggle)
libjboss-microcontainer-java 2.0.0~Beta16-1
  • links: PTS, VCS
  • area: contrib
  • in suites: lenny
  • size: 15,416 kB
  • ctags: 14,841
  • sloc: java: 88,790; xml: 25,482; makefile: 19; sh: 14
file content (32 lines) | stat: -rw-r--r-- 1,674 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="packaging">
  <title>Packaging</title>

  <para>We had a brief discussion on the <varname>.beans</varname> archive in <xref linkend="examples"/>. In this chapter, we will go into more depth on the packaging topic. As we will see later in <xref linkend="standalone"/>, the packaging is more of a convention rather than a requirement. The convention is recommended since it allows "deployments" to be used both standalone and inside JBoss AS.</para>

  <para>The basic structure of microcontainer deployment is a <varname>.beans</varname> file (see below). The <varname>.beans</varname> can also be unpacked in a directory structure that looks the jar file. It contains a <varname>META-INF/jboss-beans.xml</varname> to describe what you want it to do. The contents of this xml file are described in <xref linkend="basics"/>. Finally, the <varname>.beans</varname> archive contains the classes and any resources just like any other jar file.</para>

  <programlisting>
example.beans/
example.beans/META-INF/jboss-beans.xml
example.beans/com/acme/SomeClass.class
  </programlisting>

  <para>If you want to include a <varname>.beans</varname> file in an <varname>.ear</varname> deployment, you will need to reference in <varname>META-INF/jboss-app.xml</varname>.</para>

  <programlisting>
&lt;?xml version='1.0' encoding='UTF-8'?&gt;

&lt;!DOCTYPE jboss-app
  PUBLIC  "-//JBoss//DTD J2EE Application 1.4//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd"
&gt;

&lt;jboss-app&gt;

   &lt;module&gt;&lt;service&gt;example.beans&lt;/service&gt;&lt;/module&gt;
   
&lt;/jboss-app&gt;
  </programlisting>

</chapter>