You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2003/01/06 07:09:47 UTC
cvs commit: jakarta-tomcat-5/resources mbeans.xml
costin 2003/01/05 22:09:47
Added: resources mbeans.xml
Log:
A small test file for the 'jmx-ified' config / profile.
Each component will be defined as an mbean - with explicit control
over class loaders. This version uses ant ( it's much easier ), but
a standalone version using mlet-like syntax will work the same.
Revision Changes Path
1.1 jakarta-tomcat-5/resources/mbeans.xml
Index: mbeans.xml
===================================================================
<project name="modeler-test" default="mini-tomcat" basedir=".">
<property name="base.dir" location="/usr/share/java" />
<property name="base.src" location="../.." />
<property name="tomcat.src" location=".." />
<property name="jakarta-commons" location="${base.src}/jakarta-commons" />
<property name="jmx.home" location="${base.dir}/jmx-ri_1.2" />
<property name="tomcat.home" location="${tomcat.src}/build" />
<property name="modeler.home" location="${jakarta-commons}/modeler/dist" />
<property name="commons-logging.jar" location="${jakarta-commons}/logging/dist/commons-logging.jar" />
<target name="init">
<path id="myJars" >
<fileset dir="${jmx.home}/lib" includes="*.jar"/>
<pathelement path="${commons-logging.jar}" />
<fileset dir="${modeler.home}" includes="*.jar" />
<fileset dir="${tomcat.home}/server/lib" >
<include name="catalina.jar" />
<include name="commons-digester.jar" />
<include name="commons-beanutils.jar" />
<include name="tomcat-coyote.jar" />
<include name="tomcat-http11.jar" />
<include name="tomcat-jk2.jar" />
<include name="tomcat-util.jar" />
</fileset>
<fileset dir="${tomcat.home}/common/lib">
<include name="servlet-api.jar" />
<include name="jsp-api.jar" />
<include name="jasper-runtime.jar" />
<include name="naming-common.jar" />
<include name="naming-factory.jar" />
<include name="naming-java.jar" />
<include name="naming-resources.jar" />
<include name="commons-collections.jar" />
</fileset>
</path>
<classloader classpathRef="myJars"/>
<taskdef resource="org/apache/commons/modeler/ant/ant.properties" />
</target>
<target name="jmx-console" depends="init">
<mbean code="com.sun.jdmk.comm.HtmlAdaptorServer"
name="jmx-console:type=HtmlAdaptorServer,port=9998">
</mbean>
<jmx-attribute objectName="jmx-console:type=HtmlAdaptorServer,port=9998"
attribute="Port" type="int" value="9998"/>
<jmx-operation objectName="jmx-console:type=HtmlAdaptorServer,port=9998"
operation="start" />
</target>
<!-- Minimal profile.
-->
<target name="mini-tomcat" depends="init">
<!-- ==================== Load mbeans ==================== -->
<!-- Tomcat will fill in the missing pieces - if a component is
needed default values will be created.
For example: The ajp connector will create it's own pool, while the http
connector is configured with a specific instance.
-->
<modeler code="org.apache.tomcat.util.threads.ThreadPool"
name="tomcat:type=ThreadPool,name=HttpConnectorPool" />
<mbean code="org.apache.commons.modeler.BaseModelMBean"
name="tomcat:type=HttpConnector,port=9080" >
<arg type="java.lang.String" >org.apache.coyote.http11.Http11Protocol</arg>
</mbean>
<modeler code="org.apache.catalina.core.StandardServer"
name="tomcat:type=Server" />
<modeler code="org.apache.catalina.core.StandardHost"
name="tomcat:type=Host,host=default" />
<modeler code="org.apache.catalina.core.StandardContext"
name="tomcat:type=Context,host=default,context=/" />
<!-- ==================== Customization ==================== -->
<!-- This should be made persistent - model mbean should be able to save this
( in the standalone version, not the ant file )
-->
<!--
<jmx-attribute objectName="tomcat:type=HttpConnector,port=9080"
attribute="poolName"
value="tomcat:type=ThreadPool,name=HttpConnectorPool" />
-->
<jmx-attribute objectName="tomcat:type=Host,host=default"
attribute="appBase"
value="webapps" />
<jmx-attribute objectName="tomcat:type=ThreadPool,name=HttpConnectorPool"
attribute="daemon"
type="boolean"
value="false" />
<!-- ==================== Start the server ==================== -->
<!--
-->
<jmx-operation objectName="tomcat:type=Server"
operation="start" />
<jmx-operation objectName="tomcat:type=ThreadPool,name=HttpConnectorPool"
operation="start" />
<jmx-operation objectName="tomcat:type=Server"
operation="await" />
</target>
</project>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-tomcat-5/resources mbeans.xml
Posted by Costin Manolache <cm...@yahoo.com>.
Remy Maucherat wrote:
> costin@apache.org wrote:
>> costin 2003/01/05 22:09:47
>>
>> Added: resources mbeans.xml
>> Log:
>> A small test file for the 'jmx-ified' config / profile.
>>
>> Each component will be defined as an mbean - with explicit control
>> over class loaders. This version uses ant ( it's much easier ), but
>> a standalone version using mlet-like syntax will work the same.
>
> That's probably dumb, but I couldn't find the classloader task.
Sorry - my mistake.
Requires ant1.6 ( i.e. the HEAD right now ).
The classloader task will add jars to the "core" ant loader - so you
don't have to place them in ant/lib or CLASSPATH, while avoiding
some of the problems with multiple loaders.
There is also an <import> task ( pretty obvious ) and support for
"dynamic properties" - i.e. you'll be able to use
${jmx:domain:objectname:attribute} or ${jxpath:....}. If I find some time
I'll add a ${jspel:...}.
Costin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-tomcat-5/resources mbeans.xml
Posted by Remy Maucherat <re...@apache.org>.
Costin Manolache wrote:
> Remy Maucherat wrote:
>
>
>>costin@apache.org wrote:
>>
>>>costin 2003/01/05 22:09:47
>>>
>>> Added: resources mbeans.xml
>>> Log:
>>> A small test file for the 'jmx-ified' config / profile.
>>>
>>> Each component will be defined as an mbean - with explicit control
>>> over class loaders. This version uses ant ( it's much easier ), but
>>> a standalone version using mlet-like syntax will work the same.
>>
>>That's probably dumb, but I couldn't find the classloader task.
>
>
> BTW - this won't work. It does load the components, but they're not
> registering with each other. I checked it in so other people can review
> the syntax and comment on the general idea.
>
> I need to add the code to register for registration notifications
> and call the right methods - probably next week.
Thanks for the details. As far as I'm concerned, it looks really cool :)
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-tomcat-5/resources mbeans.xml
Posted by Costin Manolache <cm...@yahoo.com>.
Remy Maucherat wrote:
> costin@apache.org wrote:
>> costin 2003/01/05 22:09:47
>>
>> Added: resources mbeans.xml
>> Log:
>> A small test file for the 'jmx-ified' config / profile.
>>
>> Each component will be defined as an mbean - with explicit control
>> over class loaders. This version uses ant ( it's much easier ), but
>> a standalone version using mlet-like syntax will work the same.
>
> That's probably dumb, but I couldn't find the classloader task.
BTW - this won't work. It does load the components, but they're not
registering with each other. I checked it in so other people can review
the syntax and comment on the general idea.
I need to add the code to register for registration notifications
and call the right methods - probably next week.
Costin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-tomcat-5/resources mbeans.xml
Posted by Remy Maucherat <re...@apache.org>.
costin@apache.org wrote:
> costin 2003/01/05 22:09:47
>
> Added: resources mbeans.xml
> Log:
> A small test file for the 'jmx-ified' config / profile.
>
> Each component will be defined as an mbean - with explicit control
> over class loaders. This version uses ant ( it's much easier ), but
> a standalone version using mlet-like syntax will work the same.
That's probably dumb, but I couldn't find the classloader task.
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>