[CVS jcontainer] Remove old docs as they are folded into main loom site
Peter Donald <pdonald-yCVjj/[email protected]> Wed, 31 Mar 2004 22:40:20 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffd=
d}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" rules=3D"cols">
<tr class=3D"head"><td colspan=3D"4">Commit in <b><tt>jcontainer/loom/sup=
port/classman/xdocs</tt></b><span id=3D"info"> on MAIN</span></td></tr>
<tr><td><tt><a href=3D"#file1"><span id=3D"removed">ClassLoader.txt</span=
></a></tt></td><td></td><td align=3D"right" id=3D"removed">-171</td><td n=
owrap=3D"nowrap"><a href=3D"http://xstream.cvs.codehaus.org/jcontainer/lo=
om/support/classman/xdocs/ClassLoader.txt?rev=3D1.4&content-type=3Dte=
xt/vnd.viewcvs-markup">1.4</a> removed</td></tr>
<tr class=3D"alt"><td><tt><a href=3D"#file2"><span id=3D"removed">embeddi=
ng.xml</span></a></tt></td><td></td><td align=3D"right" id=3D"removed">-1=
7</td><td nowrap=3D"nowrap"><a href=3D"http://xstream.cvs.codehaus.org/jc=
ontainer/loom/support/classman/xdocs/embedding.xml?rev=3D1.5&content-=
type=3Dtext/vnd.viewcvs-markup">1.5</a> removed</td></tr>
<tr><td><tt><a href=3D"#file3"><span id=3D"removed">index.xml</span></a><=
/tt></td><td></td><td align=3D"right" id=3D"removed">-51</td><td nowrap=3D=
"nowrap"><a href=3D"http://xstream.cvs.codehaus.org/jcontainer/loom/suppo=
rt/classman/xdocs/index.xml?rev=3D1.7&content-type=3Dtext/vnd.viewcvs=
-markup">1.7</a> removed</td></tr>
<tr class=3D"alt"><td><tt><a href=3D"#file4"><span id=3D"removed">sample.=
xml</span></a></tt></td><td></td><td align=3D"right" id=3D"removed">-146<=
/td><td nowrap=3D"nowrap"><a href=3D"http://xstream.cvs.codehaus.org/jcon=
tainer/loom/support/classman/xdocs/sample.xml?rev=3D1.4&content-type=3D=
text/vnd.viewcvs-markup">1.4</a> removed</td></tr>
<tr><td></td><td></td><td align=3D"right" id=3D"removed">-385</td><td></t=
d></tr>
</table>
<small id=3D"info">4 removed files</small><br />
<pre class=3D"comment">
Remove old docs as they are folded into main loom site
</pre>
<hr /><a name=3D"file1" /><div class=3D"file">
<span class=3D"pathname" id=3D"removed"><a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer">jcontainer</a>/<a href=3D"http://xstream.cvs.codeha=
us.org/jcontainer/loom">loom</a>/<a href=3D"http://xstream.cvs.codehaus.o=
rg/jcontainer/loom/support">support</a>/<a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer/loom/support/classman">classman</a>/<a href=3D"http:=
//xstream.cvs.codehaus.org/jcontainer/loom/support/classman/xdocs">xdocs<=
/a><br /></span>
<div class=3D"fileheader" id=3D"removed"><big><b>ClassLoader.txt</b></big=
> <small id=3D"info">removed after <a href=3D"http://xstream.cvs.codehaus=
.org/jcontainer/loom/support/classman/xdocs/ClassLoader.txt?rev=3D1.4&=
;content-type=3Dtext/vnd.viewcvs-markup">1.4</a></small></div>
<pre class=3D"diff"><small id=3D"info">diff -N ClassLoader.txt
--- ClassLoader.txt 21 Mar 2004 23:45:45 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,171 +0,0 @@
</small></pre><pre class=3D"diff" id=3D"removed">-This is the mail in whi=
ch the <classloaders/> section in
-environment.xml was proposed.
-
-From: Peter Donald
-To: Avalon Development <dev-vjxjseedVqFd/SJB6HiN2Ni2O/[email protected]>
-Subject: [phoenix] ClassLoader section in environment.xml
-Date: Sat, 1 Dec 2001 15:07:28 +1100
-
-Hi,
-
-Heres some thoughts about a possible way to define ClassLoader structure=
in
-the environment.xml file. Tell us what you think
-
-<classloaders default=3D"*application*">
- <classloader name=3D"foo" parent=3D"*api*">
- <entry location=3D"sar:/some/dir/classes"/>
- <entry location=3D"sar:/some/dir/mypackage.jar"/>
- <entry url=3D"http://spice.codehaus.org/some.jar"/>
- </classloader>
-
- <classloader name=3D"bar" parent=3D"*system*">
- <extension>
- <name>javax.servlet</name>
- <specification-version>2.3</specification-version>
- <vendor-id>org.apache.jakarta</vendor-id>
- <vendor-version>1.2.3.4</vendor-version>
- </extension>
- </classloader>
-
- <join name=3D"baz">
- <classloader name=3D"foo">
- <classloader name=3D"bar">
- </join>
-
- <classloader name=3D"common" parent=3D"bar">
- <entry location=3D"sar:/some/more/classes"/>
- </classloader>
-
-</classloaders>
-
-So in this case we have explicitly defined 4 classloaders; foo, bar, baz=
and
-common. The names of these classloaders are completely arbitrary. You wi=
ll
-notice that I also refer to other predefined classloaders. These special
-classloaders can not be overiden and are defined by system. They are
-
-o *system* (The System classloader)
-
-o *api* (The classloader for phoenix API - will just contain framework.j=
ar
-and phoenix-client.jar in future but now contains a wealth of other jars=
)
-
-o *common* (The classloader that is shared between apps and container - =
empty
-now but will contain things like excalibur classes)
-
-o *application* (Contains contents of SAR-INF/lib/*.jar + SAR-INF/classe=
s. I
-am not sure if this is strictly needed though ...)
-
-The <join/> classloader assumes that each classloader that it is m=
ade up of
-has a disjoint set of classes/resources contained in it. So it was the
-"aggregator" ClassLoader I was talking about.
-
-You will also notice the "default" attribute of <classloaders/> se=
ction. This
-specifies the ClassLoader via which the blocks are loaded. The only
-requirement being that one of it's parent classloaders must be "*api*".
-
-So if/when this is implemented what does it mean ? Well we could finally
-implement a spec complaint servlet engine without jumping through loops.=
See
-below for a sample of how I would do it. We could also support nested
-"applications" like Stephen wanted. Woohoo!
-
-<classloaders default=3D"servlet-container">
-
- <classloader name=3D"jndi-api" parent=3D"*system*">
- <entry location=3D"sar:SAR-INF/ext/jndi.jar"/>
- </classloader>
-
- <classloader name=3D"servlet-api" parent=3D"*system*">
- <extension>
- <name>javax.servlet</name>
- <specification-version>2.3</specification-version>
- <vendor-id>org.apache.jakarta</vendor-id>
- <vendor-version>1.2.3.4</vendor-version>
- </extension>
- </classloader>
-
- <join name=3D"common">
- <classloader name=3D"servlet-api"/>
- <classloader name=3D"jndi-api"/>
- </join>
-
- <classloader name=3D"servlet-container" parent=3D"common">
- <entry location=3D"sar:SAR-INF/lib/*.jar"/>
- <entry location=3D"sar:SAR-INF/classes/"/>
- </classloader>
-
-</classloaders>
-
-Anyways - thoughts?
-
---
-Cheers,
-
-Pete
-
-*----------------------------------------------*
-| The best defense against logic is ignorance. |
-*----------------------------------------------*
-
---
-To unsubscribe, e-mail: <mailto:[email protected]=
he.org>
-For additional commands, e-mail: <mailto:[email protected]=
he.org>
-
-
-Re: [phoenix] ClassLoader section in environment.xml
-Date: Sat, 1 Dec 2001 15:36:21 +1100
-From: Peter Donald
- To: "Avalon Developers List" <dev-vjxjseedVqFd/SJB6HiN2Ni2O/[email protected]>
-Reply to: "Avalon Developers List" <dev-vjxjseedVqFd/SJB6HiN2Ni2O/[email protected]>
-
- Hi,
-
-One thing I forgot to mention was how Blocks aquire the ClassLoaders. I
-propose that we add another method to BlockContext interface, namely
-
-ClassLoader getClassLoader(String name)
-
-This raises an interesting question though. How should a Block declare t=
hat
-it needs a ClassLoader named "foo" and "foo" must contain classes X, Y a=
nd Z?
-Should it declare that?
-
-My initial though was that you could add another section to the BlockInf=
o
-file like
-
-<classloaders>
-=A0 <classloader name=3D"foo">
-=A0 =A0 =A0<description>
-=A0 =A0 =A0 =A0 This ClassLoader must contain classes X, Y and Z. It is
-=A0=A0=A0=A0=A0=A0=A0=A0part of the foo API and we use it to do "Somethi=
ng".
-=A0 =A0 =A0</description>
-=A0 =A0 =A0 <required classname=3D"com.biz.ClassToCheckFor"/>
-=A0 </classloader>
-</classloaders>
-
-Then I realized - what would happen if 2 Blocks declared that they depen=
ded
-on ClassLoaders named "foo" but which had different contents. So in this=
case
-it would be required that you map the application-wide name into a
-block-local name ... which seems like overkill/flexability syndrome.
-
-So options that I could think of are;
-1. ignore the issue and make it a requirement that Block writers documen=
t it
-so that assemblers can build it
-2. have basic structures in blockinfo but keep names global
-3. Same as 3 but we map classloader names from global namespace to
-application local namespace.
-
-Thoughts?
-
---
-Cheers,
-
-Pete
-
----------------------------------------------
-=A0We shall not cease from exploration, and the
-=A0 end of all our exploring will be to arrive
-=A0where we started and know the place for the
-=A0 =A0 =A0 =A0 first time -- T.S. Eliot
----------------------------------------------
-
---
-To unsubscribe, e-mail: =A0 <mailto:[email protected]=
ache.org>
-For additional commands, e-mail: <mailto:[email protected]=
he.org>
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre></div>
<hr /><a name=3D"file2" /><div class=3D"file">
<span class=3D"pathname" id=3D"removed"><a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer">jcontainer</a>/<a href=3D"http://xstream.cvs.codeha=
us.org/jcontainer/loom">loom</a>/<a href=3D"http://xstream.cvs.codehaus.o=
rg/jcontainer/loom/support">support</a>/<a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer/loom/support/classman">classman</a>/<a href=3D"http:=
//xstream.cvs.codehaus.org/jcontainer/loom/support/classman/xdocs">xdocs<=
/a><br /></span>
<div class=3D"fileheader" id=3D"removed"><big><b>embedding.xml</b></big> =
<small id=3D"info">removed after <a href=3D"http://xstream.cvs.codehaus.o=
rg/jcontainer/loom/support/classman/xdocs/embedding.xml?rev=3D1.5&con=
tent-type=3Dtext/vnd.viewcvs-markup">1.5</a></small></div>
<pre class=3D"diff"><small id=3D"info">diff -N embedding.xml
--- embedding.xml 21 Mar 2004 23:38:18 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
</small></pre><pre class=3D"diff" id=3D"removed">-<?xml version=3D"1.0=
"?>
-
-<document>
- <properties>
- <title>ClassMan - Embedding HOWTO</title>
- <author>Peter Donald</author>
- </properties>
- <body>
- <section name=3D"Introduction">
- <p>This document will describe how you embed the Class=
Man
- tolkit into your own application code. There are two differe=
nt
- modes for embedding ClassMan, one is as an application
- container and one is as a regular application.</p>
- <p>TODO: Finish code then finish guide.</p>
- </section>
- </body>
-</document>
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre></div>
<hr /><a name=3D"file3" /><div class=3D"file">
<span class=3D"pathname" id=3D"removed"><a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer">jcontainer</a>/<a href=3D"http://xstream.cvs.codeha=
us.org/jcontainer/loom">loom</a>/<a href=3D"http://xstream.cvs.codehaus.o=
rg/jcontainer/loom/support">support</a>/<a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer/loom/support/classman">classman</a>/<a href=3D"http:=
//xstream.cvs.codehaus.org/jcontainer/loom/support/classman/xdocs">xdocs<=
/a><br /></span>
<div class=3D"fileheader" id=3D"removed"><big><b>index.xml</b></big> <sma=
ll id=3D"info">removed after <a href=3D"http://xstream.cvs.codehaus.org/j=
container/loom/support/classman/xdocs/index.xml?rev=3D1.7&content-typ=
e=3Dtext/vnd.viewcvs-markup">1.7</a></small></div>
<pre class=3D"diff"><small id=3D"info">diff -N index.xml
--- index.xml 21 Mar 2004 23:38:18 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
</small></pre><pre class=3D"diff" id=3D"removed">-<?xml version=3D"1.0=
"?>
-
-<document>
- <properties>
- <title>ClassMan - Overview</title>
- <author>Peter Donald</author>
- </properties>
- <body>
- <section name=3D"Introduction">
- <p>The ClassMan toolkit is a set of utility classes th=
at enable
- ClassLoader hierarchies to be constructed from xml configura=
tions.
- The toolkit supports hierarchial ClassLoaders and ClassLoade=
rs defined
- by directed graphs via the use of "Join" ClassLoaders that c=
an have
- multiple parents. This results in construction of a ClassLoa=
der lattice.</p>
- <p>Each non-Join ClassLoader can be defined in terms o=
f;</p>
- <ul>
- <li>Entrys: URLs designating either a directory or=
a file</li>
- <li><a href=3D"apidocs/org/realityforge/classma=
n/metadata/FileSetMetaData.html">
- FileSets</a>: Sets of files defined in a manner si=
milar to Ants Filests.</li>
- <li><a href=3D"http://jakarta.apache.org/avalon=
/excalibur/extension/api/org/apache/avalon/excalibur/extension/Extension.=
html">
- Extensions</a>: Definitions of Extensions, aka "Op=
tional Packages".</li>
- </ul>
- <p>Each ClassLoader also has a name and a parent. The =
parent is the
- name of the parent ClassLoader. Usually the parent ClassLoad=
ers are
- one of the predefined ClassLoaders. The predefined are passe=
d into
- the ClassMan toolkit from external application code.</p&g=
t;
- <p>The predefined ClassLoaders are generally named acc=
ording to
- a pattern that places the '*' at start and end of name. ie
- "*myPredefinedClassLoader*". Many containers pass in the fol=
lowing
- predefined Classloaders.</p>
- <ul>
- <li>*system*: The System ClassLoader.</li>
- <li>*common*: Common between container and client =
code.</li>
- <li>*shared*: Shared between all client code.</=
li>
- </ul>
- <p>For an example ClassLoader hierarchy see the websit=
e for
- <a href=3D"http://jakarta.apache.org/ant/myrmidon/classlo=
ader.html">
- Myrmidon</a>, an Ant2 proposal.</p>
- <p>The commented <a href=3D"classloader.dtd">DTD=
</a> describes the descriptor
- format explicitly. However if you prefer to learn by example=
then you can
- look at a <a href=3D"sample.html">sample</a> des=
criptor and its explanation.</p>
- <p>If you need to embed the Toolkit in your own applic=
ation it is recomended
- that you look over the <a href=3D"embedding.html">Embe=
dding HOWTO</a>.</p>
- <p>
- All Spice jars are held in the=20
- <a href=3D"http://spice.sf.net/maven">http://spice.sf.=
net/maven</a>=20
- repository for Maven usage.
- </p>
- </section>
- </body>
-</document>
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre></div>
<hr /><a name=3D"file4" /><div class=3D"file">
<span class=3D"pathname" id=3D"removed"><a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer">jcontainer</a>/<a href=3D"http://xstream.cvs.codeha=
us.org/jcontainer/loom">loom</a>/<a href=3D"http://xstream.cvs.codehaus.o=
rg/jcontainer/loom/support">support</a>/<a href=3D"http://xstream.cvs.cod=
ehaus.org/jcontainer/loom/support/classman">classman</a>/<a href=3D"http:=
//xstream.cvs.codehaus.org/jcontainer/loom/support/classman/xdocs">xdocs<=
/a><br /></span>
<div class=3D"fileheader" id=3D"removed"><big><b>sample.xml</b></big> <sm=
all id=3D"info">removed after <a href=3D"http://xstream.cvs.codehaus.org/=
jcontainer/loom/support/classman/xdocs/sample.xml?rev=3D1.4&content-t=
ype=3Dtext/vnd.viewcvs-markup">1.4</a></small></div>
<pre class=3D"diff"><small id=3D"info">diff -N sample.xml
--- sample.xml 21 Mar 2004 23:37:19 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,146 +0,0 @@
</small></pre><pre class=3D"diff" id=3D"removed">-<?xml version=3D"1.0=
"?>
-
-<document>
- <properties>
- <title>ClassMan - Example</title>
- <author>Peter Donald</author>
- </properties>
- <body>
- <section name=3D"Introduction">
- <p>This describes a simple example of ClassMan descrip=
tor.
- Let us assume that
- <a href=3D"http://avalon.apache.org/phoenix">Phoenix&l=
t;/a>
- has been integrated with ClassMan and that the snippet defin=
ing
- classloader is included in Phoenixes deployment format (the
- .sar file).</p>
- <p>Let us also assume that we want to host a servlet c=
ontainer
- (like Catalina, Jo! or Jetty) in Phoenix. The servlet
- specification requires that the servlets are capable of
- "seeing" the servlet API but recomends strongly that no serv=
let
- should be able to access any container specific classes.<=
/p>
- <p>To satisfy this requirement we decided to place the
- Servlet API classes in a parent ClassLoader to the Container=
s
- ClassLoader and each Web Applications ClassLoader. ie</p&=
gt;
-<pre>
- Servlet API CL
- |
- +------+------+
- | |
- Servlet WebApp
-Container CL
- CL
-</pre>
- <p>This way, both the Container and the WebApp ClassLo=
aders will
- load the Servlet API from the same ClassLoader.</p>
- <p>Unfortunately, in our case Phoenix already assemble=
s the
- Servlet Container CL by default and does not give us the
- opportunity to construct the Servlet API CL as a parent Clas=
sLoader.
- Luckily we can overide this using the ClassMan toolkit using=
the
- following configuration file.</p>
-<source>
- <![CDATA[
-<classloaders default=3D"container" version=3D"1.0">
-
- <!-- needed to run under earlier JVMs that do not include JNDI --&g=
t;
- <classloader name=3D"jndi-api" parent=3D"*system*">
- <entry location=3D"sar:SAR-INF/ext/jndi.jar"/>
- </classloader>
-
- <!--
- The actual Servlet API classLoader. Note that this does not specify
- a physical location but instead defines an extension. This allows
- the container to search for the library that best satisfies this
- extension. Usually all the extensions are stored in a central direct=
ory
- and Phoenix will search through the jars in central to find the serv=
let
- jar. This allows several applications to share the same jar.
- -->
- <classloader name=3D"servlet-api" parent=3D"*system*">
- <extension>
- <name>javax.servlet</name>
- <specification-version>2.3</specification-version>
- <vendor-id>org.apache.jakarta</vendor-id>
- <vendor-version>1.2.3.4</vendor-version>
- </extension>
- </classloader>
-
- <!--
- This is a special ClassLoader that merges two other
- ClassLoaders together. When you try to load a class from
- this ClassLoader, the ClassLoader will first try to load
- the class from servlet-api ClassLoader and then try to
- load the class from the jndi-api ClassLoader. This works
- fine if the ClassLoaders define disjoint sets of classes.
- ie No class should be loadable from both the servlet-api
- ClassLoader and the jndi-api ClassLoader (with the exception
- of Classes Loaded from System ClassLoader).
- -->
- <join name=3D"common">
- <classloader-ref name=3D"servlet-api"/>
- <classloader-ref name=3D"jndi-api"/>
- </join>
-
- <!--
- This classloader is needed to join the Phoenix API
- and the Servlet API into one ClassLoader. This is needed
- because the container is built using Phoenix APIs
- but needs to share the Servlet APIs with the WebApps.
- -->
- <join name=3D"container-base">
- <classloader-ref name=3D"common"/>
- <classloader-ref name=3D"*phoenix.api*"/>
- </join>
-
- <!--
- This classloader is the one used to actually load the
- Servlet Container. We know this as it is specified as the
- default ClassLoader in <classloaders/> element.
- -->
- <classloader name=3D"container" parent=3D"container-base">
- <entry location=3D"sar:SAR-INF/classes/"/>
- <fileset dir=3D"sar:SAR-INF/lib/">
- <include name=3D"*.jar"/>
- </fileset>
- </classloader>
-
-</classloaders>
-]]></source>
- <p>The first thing you notice about this is that
- the ClassLoader hierarchy is much more complicated.
- In fact the diagram now looks like;</p>
-<pre>
- "servlet-api" "jndi-api"
- CL CL
- | |
- +------+------+
- |
- "*phoenix.api*" "common" CL
- | |
- +----+ +------+------+
- | | |
- "container- WebApp
- base" CL
- CL (This is constructed
- | by Container but
- "container" shown for completeness)
- CL
-</pre>
- <p>In reality we could have merged "servlet-api" and
- "jndi-api" into "common" but we separated them for
- illustration purposes.</p>
- <p>One thing you should notice is that Phoenix
- exposes two predefined ClassLoaders;</p>
- <ul>
- <li><b>*system*</b>: The system ClassL=
oader</li>
- <li><b>*phoenix.api*</b>: The ClassLoa=
der that
- Phoenix uses to communicate with it's hosted
- components.</li>
- </ul>
- <p>The above demonstrates one of the most complex exam=
ples
- that you are likely to come across. This arose because there
- was multiple "containers" hosted in same ClassLoader
- hierarchy. The Servlet API specification requires that
- implementation classes not be visible to API clients.
- The Phoenix API specification requires the same thing.</p=
>
- </section>
- </body>
-</document>
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre></div>
<center><small><a href=3D"http://www.badgers-in-foil.co.uk/projects/cvssp=
am/" title=3D"commit -> email">CVSspam</a> 0.2.8</small></center>
</body></html>