You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by am...@apache.org on 2003/04/28 07:19:32 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core mbeans-descriptors.xml StandardContext.java StandardWrapper.java
amyroh 2003/04/27 22:19:32
Modified: catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardContext.java
StandardWrapper.java
Log:
Add StandardWrapper mbean description and workaround for introspection.
Revision Changes Path
1.12 +43 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
Index: mbeans-descriptors.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mbeans-descriptors.xml 25 Apr 2003 22:19:47 -0000 1.11
+++ mbeans-descriptors.xml 28 Apr 2003 05:19:31 -0000 1.12
@@ -292,6 +292,18 @@
returnType="void">
</operation>
+ <operation name="findMappingObject"
+ description="Return an object which may be utilized for mapping to this component"
+ impact="INFO"
+ returnType="org.apache.catalina.Context">
+ </operation>
+
+ <operation name="findStaticResources"
+ description="Return the naming resources associated with this web application"
+ impact="INFO"
+ returnType="javax.naming.directory.DirContext">
+ </operation>
+
</mbean>
<mbean name="StandardContextValve"
@@ -604,7 +616,31 @@
<operation name="start" description="Start" impact="ACTION" returnType="void" />
<operation name="stop" description="Stop" impact="ACTION" returnType="void" />
</mbean>
-
+
+ <mbean name="StandardWrapper"
+ description="Wrapper that represents an individual servlet definition"
+ domain="Catalina"
+ group="Wrapper"
+ type="org.apache.catalina.core.StandardWrapper">
+
+ <attribute name="engineName"
+ description="Fully qualified class name of the managed object"
+ type="java.lang.String"
+ writeable="false"/>
+
+ <operation name="findMappings"
+ description="Return the mappings associated with this wrapper"
+ impact="INFO"
+ returnType="[Ljava.lang.String;">
+ </operation>
+
+ <operation name="findMappingObject"
+ description="Return an object which may be utilized for mapping to this component"
+ impact="INFO"
+ returnType="org.apache.catalina.Wrapper">
+ </operation>
+
+ </mbean>
<mbean name="StandardWrapperValve"
description="Valve that implements the default basic behavior for the
@@ -612,12 +648,12 @@
domain="Catalina"
group="Valve"
type="org.apache.catalina.core.StandardWrapperValve">
-
- <attribute name="className"
- description="Fully qualified class name of the managed object"
- type="java.lang.String"
- writeable="false"/>
-
+
+ <attribute name="className"
+ description="Fully qualified class name of the managed object"
+ type="java.lang.String"
+ writeable="false"/>
+
<attribute name="debug"
description="The debugging detail level for this component"
type="int"/>
1.47 +20 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
Index: StandardContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- StandardContext.java 25 Apr 2003 21:05:21 -0000 1.46
+++ StandardContext.java 28 Apr 2003 05:19:31 -0000 1.47
@@ -2317,6 +2317,14 @@
/**
+ * FIXME: Fooling introspection ...
+ */
+ public Context findMappingObject() {
+ return (Context) getMappingObject();
+ }
+
+
+ /**
* Return the message destination with the specified name, if any;
* otherwise, return <code>null</code>.
*
@@ -5105,6 +5113,17 @@
* Return the naming resources associated with this web application.
*/
public javax.naming.directory.DirContext getStaticResources() {
+
+ return getResources();
+
+ }
+
+
+ /**
+ * Return the naming resources associated with this web application.
+ * FIXME: Fooling introspection ...
+ */
+ public javax.naming.directory.DirContext findStaticResources() {
return getResources();
1.23 +9 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Index: StandardWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- StandardWrapper.java 5 Apr 2003 04:03:07 -0000 1.22
+++ StandardWrapper.java 28 Apr 2003 05:19:31 -0000 1.23
@@ -341,6 +341,11 @@
}
+ public String getEngineName() {
+ return ((StandardContext)getParent()).getEngineName();
+ }
+
+
/**
* Return descriptive information about this Container implementation and
* the corresponding version number, in the format
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardContext.java StandardWrapper.java
Posted by Amy Roh <am...@apache.org>.
Costin Manolache wrote:
> Amy Roh wrote:
>
>
>>Remy Maucherat wrote:
>>
>>>Amy Roh wrote:
>>>
>>>
>>>>> /**
>>>>> + * FIXME: Fooling introspection ...
>>>>> + */
>>>>> + public Context findMappingObject() {
>>>>> + return (Context) getMappingObject();
>>>>> + }
>>>>
>>>>
>>>>
>>>>getAttribute() for objects don't seem to work without this
>>>>workaround....
>>>
>>>
>>>It worked fine for me. Any idea on the root cause ?
>>
>>I was hoping Costin has better idea. I saw he had to do the same in
>>StandardWrapper. It works in standalone but not in embedded. I'm
>>thinking classloader issue. I'll try to find out the root cause in
>>modeler.
>
>
> Costin doesn't have enough info to get ideas :-)
What was the motivation for adding the workaround for introspection in
StandardWrapper? How were you able to produce the problem? I can't
reproduce the problem in standalone and it's hard to debug modeler in
embedded since I don't include modeler source in embedded.
>
> Add some debug, send me the result.
>
> Costin
>
>
>
>>Amy
>>
>>
>>>Remy
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core mbeans-descriptors.xml StandardContext.java StandardWrapper.java
Posted by Costin Manolache <cm...@yahoo.com>.
Amy Roh wrote:
> Remy Maucherat wrote:
>> Amy Roh wrote:
>>
>>>> /**
>>>> + * FIXME: Fooling introspection ...
>>>> + */
>>>> + public Context findMappingObject() {
>>>> + return (Context) getMappingObject();
>>>> + }
>>>
>>>
>>>
>>> getAttribute() for objects don't seem to work without this
>>> workaround....
>>
>>
>> It worked fine for me. Any idea on the root cause ?
>
> I was hoping Costin has better idea. I saw he had to do the same in
> StandardWrapper. It works in standalone but not in embedded. I'm
> thinking classloader issue. I'll try to find out the root cause in
> modeler.
Costin doesn't have enough info to get ideas :-)
Add some debug, send me the result.
Costin
>
> Amy
>
>>
>> Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [4.1] Backport fix for 6058
Posted by Remy Maucherat <re...@apache.org>.
Glenn Nielsen wrote:
> I am OK with this. Anything that reduces the number of bug reports!
>
> We will need a big note with the new release stating that
> all java source and compiled classes in the work dir for JSP's will need to
> be removed when upgrading.
Well, actually, that should be ok. Since Jasper won't be able to find
classes, it will just recompile them. There could be problems with IDE
(Netbeans), but otherwise, it should only improve things.
Meybe I didn't consider every situation, though.
> Another related bug for IDE users is the following bug report:
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18462
>
> We may want to apply the suggested patch which allows an attribute to
> StandardServer to disable System.out and System.err redirection.
That makes sense.
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: [4.1] Backport fix for 6058
Posted by Glenn Nielsen <gl...@mail.more.net>.
I am OK with this. Anything that reduces the number of bug reports!
We will need a big note with the new release stating that
all java source and compiled classes in the work dir for JSP's will need to
be removed when upgrading.
Another related bug for IDE users is the following bug report:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18462
We may want to apply the suggested patch which allows an attribute to
StandardServer to disable System.out and System.err redirection.
Regards,
Glenn
Remy Maucherat wrote:
> Hi,
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6058
>
> I'm proposing to port the fix for the (infamous) bug 6058 to Tomcat
> 4.1.x. The obvious risk is that it may break existing environments, and
> could pose problems with vendors which embed Tomcat. OTOH, it makes jspc
> generate the same package structure as the internal compiler, and makes
> the generated classes easier to work with and debug in IDEs (like Eclipse).
>
> Comments ?
>
> Remy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
--
----------------------------------------------------------------------
Glenn Nielsen glenn@more.net | /* Spelin donut madder |
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network | */ |
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
[4.1] Backport fix for 6058
Posted by Remy Maucherat <re...@apache.org>.
Hi,
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6058
I'm proposing to port the fix for the (infamous) bug 6058 to Tomcat
4.1.x. The obvious risk is that it may break existing environments, and
could pose problems with vendors which embed Tomcat. OTOH, it makes jspc
generate the same package structure as the internal compiler, and
makes the generated classes easier to work with and debug in IDEs (like
Eclipse).
Comments ?
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardContext.java StandardWrapper.java
Posted by Amy Roh <am...@apache.org>.
Remy Maucherat wrote:
> Amy Roh wrote:
>
>>> /**
>>> + * FIXME: Fooling introspection ...
>>> + */
>>> + public Context findMappingObject() {
>>> + return (Context) getMappingObject();
>>> + }
>>
>>
>>
>> getAttribute() for objects don't seem to work without this workaround....
>
>
> It worked fine for me. Any idea on the root cause ?
I was hoping Costin has better idea. I saw he had to do the same in
StandardWrapper. It works in standalone but not in embedded. I'm
thinking classloader issue. I'll try to find out the root cause in modeler.
Amy
>
> Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardContext.java StandardWrapper.java
Posted by Remy Maucherat <re...@apache.org>.
Amy Roh wrote:
>> /**
>> + * FIXME: Fooling introspection ...
>> + */
>> + public Context findMappingObject() {
>> + return (Context) getMappingObject();
>> + }
>
>
> getAttribute() for objects don't seem to work without this workaround....
It worked fine for me. Any idea on the root cause ?
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardContext.java StandardWrapper.java
Posted by Amy Roh <am...@apache.org>.
> /**
> + * FIXME: Fooling introspection ...
> + */
> + public Context findMappingObject() {
> + return (Context) getMappingObject();
> + }
getAttribute() for objects don't seem to work without this workaround....
Amy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org