question about config syntax for annotations

View: New views
8 Messages — Rating Filter:   Alert me  

question about config syntax for annotations

by Taylor Gautier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I have the following instrumentation in my tc-config:

       <include>
          <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the * is because dynamic proxy classes are being created and clustered, so the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *</class-expression>
    </include>

Should this be added?

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

--

Taylor Gautier

Product Manager

Terracotta, Inc.


Phone: +1 (415) 738-4053

Fax: +1 (415) 738-4099

Web: www.terracottatech.com


_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Taylor Gautier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I tried that syntax for kicks.  It doesn't work.

Taylor Gautier wrote:
I have the following instrumentation in my tc-config:

       <include>
          <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the * is because dynamic proxy classes are being created and clustered, so the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *</class-expression>
    </include>

Should this be added?

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

--

Taylor Gautier

Product Manager

Terracotta, Inc.


Phone: +1 (415) 738-4053

Fax: +1 (415) 738-4099

Web: www.terracottatech.com


_______________________________________________ tc-users mailing list tc-users@... http://lists.terracotta.org/mailman/listinfo/tc-users

_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Eugene Kuleshov-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Taylor,

  Few weeks ago I posted few code snippets to help to test those
matching patterns to tc-dev mailing list. You may want to dig them out
and try with those expressions.

  regards,
  Eugene


Taylor Gautier wrote:

> I have the following instrumentation in my tc-config:
>
>        <include>
>          
> <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
>        </include>
>        <include>
>          
> <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
>        </include>
>
> Is there anyway to target this using annotations?  The reason for the
> * is because dynamic proxy classes are being created and clustered, so
> the names are never the same (Bar$1, Bar$2 etc)
>
> For example, in tim-annotations, we have the following syntax:
>
>     <include>
>      
> <class-expression>@org.terracotta.modules.annotations.InstrumentedClass
> *</class-expression>
>     </include>
>
> Should this be added?
>
>     <include>
>      
> <class-expression>@org.terracotta.modules.annotations.InstrumentedClass
> *..*$*</class-expression>
>     </include>
>
> would it work?  should that be the behavior?
>

_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Taylor Gautier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I know - the tim-annotations project already makes use of those wildcard expressions, but they don't address the issue I was asking about below.


Eugene Kuleshov wrote:
Taylor,

  Few weeks ago I posted few code snippets to help to test those 
matching patterns to tc-dev mailing list. You may want to dig them out 
and try with those expressions.

  regards,
  Eugene


Taylor Gautier wrote:
  
I have the following instrumentation in my tc-config:

       <include>
          
<class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          
<class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the 
* is because dynamic proxy classes are being created and clustered, so 
the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      
<class-expression>@org.terracotta.modules.annotations.InstrumentedClass 
*</class-expression>
    </include>

Should this be added?

    <include>
      
<class-expression>@org.terracotta.modules.annotations.InstrumentedClass 
*..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

    

_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users
  

_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Tim Eck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I don’t know enough about the expression parser to answer your question about the syntax.

 

One question though – Are those “$” classes dynamic proxies (as described) or anonymous inner classes? I would think proxy classes would be named differently, would not be consistent from run to run, and also unnecessary to <include> in terracotta since we deal with proxies automagically.

 


From: tc-users-bounces@... [mailto:tc-users-bounces@...] On Behalf Of Taylor Gautier
Sent: Thursday, March 13, 2008 1:04 AM
To: tc-users@...
Subject: [tc-users] question about config syntax for annotations

 

I have the following instrumentation in my tc-config:

       <include>
          <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the * is because dynamic proxy classes are being created and clustered, so the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *</class-expression>
    </include>

Should this be added?

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

--

Taylor Gautier

Product Manager

Terracotta, Inc.

 

Phone: +1 (415) 738-4053

Fax: +1 (415) 738-4099

Web: www.terracottatech.com


_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Eugene Kuleshov-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


This reminded me that generated proxy classes may not even have have
annotations on them. But it very easy to check if you enable dumping of
all instrumented classes.

regards,
Eugene


Tim Eck wrote:

>
> I don’t know enough about the expression parser to answer your
> question about the syntax.
>
> One question though – Are those “$” classes dynamic proxies (as
> described) or anonymous inner classes? I would think proxy classes
> would be named differently, would not be consistent from run to run,
> and also unnecessary to <include> in terracotta since we deal with
> proxies automagically.
>
> ------------------------------------------------------------------------
>
> *From:* tc-users-bounces@...
> [mailto:tc-users-bounces@...] *On Behalf Of *Taylor
> Gautier
> *Sent:* Thursday, March 13, 2008 1:04 AM
> *To:* tc-users@...
> *Subject:* [tc-users] question about config syntax for annotations
>
> I have the following instrumentation in my tc-config:
>
> <include>
> <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
> </include>
> <include>
> <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
> </include>
>
> Is there anyway to target this using annotations? The reason for the *
> is because dynamic proxy classes are being created and clustered, so
> the names are never the same (Bar$1, Bar$2 etc)
>
> For example, in tim-annotations, we have the following syntax:
>
> <include>
> <class-expression>@org.terracotta.modules.annotations.InstrumentedClass
> *</class-expression>
> </include>
>
> Should this be added?
>
> <include>
> <class-expression>@org.terracotta.modules.annotations.InstrumentedClass
> *..*$*</class-expression>
> </include>
>
> would it work? should that be the behavior?
>

_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Taylor Gautier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I don't know, but I suspect they are dynamic proxies.  Here is a typical name:

org.terracotta.sample.guice.Foo$$FastClassByGuice$$f9f3fb0


----- Original Message -----
From: "Tim Eck" <teck@...>
To: tc-users@...
Sent: Thursday, March 13, 2008 12:55:49 PM (GMT-0800) America/Los_Angeles
Subject: Re: [tc-users] question about config syntax for annotations

I don’t know enough about the expression parser to answer your question about the syntax.

 

One question though – Are those “$” classes dynamic proxies (as described) or anonymous inner classes? I would think proxy classes would be named differently, would not be consistent from run to run, and also unnecessary to <include> in terracotta since we deal with proxies automagically.

 


From: tc-users-bounces@... [mailto:tc-users-bounces@...] On Behalf Of Taylor Gautier
Sent: Thursday, March 13, 2008 1:04 AM
To: tc-users@...
Subject: [tc-users] question about config syntax for annotations

 

I have the following instrumentation in my tc-config:

       <include>
          <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the * is because dynamic proxy classes are being created and clustered, so the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *</class-expression>
    </include>

Should this be added?

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

--

Taylor Gautier

Product Manager

Terracotta, Inc.

 

Phone: +1 (415) 738-4053

Fax: +1 (415) 738-4099

Web: www.terracottatech.com


_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: question about config syntax for annotations

by Tim Eck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I don’t know for sure, but I’d guess that guice is generating that class somehow (as opposed to java.lang.reflect.Proxy). It might be a lot like a dynamic proxy, just maybe not a standard java one.

 

So I’m guessing that type does have a runtime annotation on it that could be used for selecting it for instrumentation? I’m not asking about the Foo class, I’m wondering about the funny named class J

 

From: tc-users-bounces@... [mailto:tc-users-bounces@...] On Behalf Of Taylor Gautier
Sent: Thursday, March 13, 2008 4:50 PM
To: tc-users@...
Subject: Re: [tc-users] question about config syntax for annotations

 

I don't know, but I suspect they are dynamic proxies.  Here is a typical name:

org.terracotta.sample.guice.Foo$$FastClassByGuice$$f9f3fb0


----- Original Message -----
From: "Tim Eck" <teck@...>
To: tc-users@...
Sent: Thursday, March 13, 2008 12:55:49 PM (GMT-0800) America/Los_Angeles
Subject: Re: [tc-users] question about config syntax for annotations


I don’t know enough about the expression parser to answer your question about the syntax.

 

One question though – Are those “$” classes dynamic proxies (as described) or anonymous inner classes? I would think proxy classes would be named differently, would not be consistent from run to run, and also unnecessary to <include> in terracotta since we deal with proxies automagically.

 


From: tc-users-bounces@... [mailto:tc-users-bounces@...] On Behalf Of Taylor Gautier
Sent: Thursday, March 13, 2008 1:04 AM
To: tc-users@...
Subject: [tc-users] question about config syntax for annotations

 

I have the following instrumentation in my tc-config:

       <include>
          <class-expression>org.terracotta.sample.guice.Bar$*</class-expression>
       </include>
       <include>
          <class-expression>org.terracotta.sample.guice.Foo$*</class-expression>
       </include>

Is there anyway to target this using annotations?  The reason for the * is because dynamic proxy classes are being created and clustered, so the names are never the same (Bar$1, Bar$2 etc)

For example, in tim-annotations, we have the following syntax:

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *</class-expression>
    </include>

Should this be added?

    <include>
      <class-expression>@org.terracotta.modules.annotations.InstrumentedClass *..*$*</class-expression>
    </include>

would it work?  should that be the behavior?

--

Taylor Gautier

Product Manager

Terracotta, Inc.

 

Phone: +1 (415) 738-4053

Fax: +1 (415) 738-4099

Web: www.terracottatech.com


_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users
LightInTheBox - Buy quality products at wholesale price