Oki, talked with Marius and Pete. Weld invokes Object.class methods 1:1 on the 
underlying instance, exactly as we do. So I'd really just remove the log here.

What we _could_ do is to log a WARN if someone puts an InterceptorBinding 
annotation on a Object.class method like toString() or hashCode()!

wdyt?

LieGrue,
strub

--- On Thu, 9/23/10, Mark Struberg <[email protected]> wrote:

> From: Mark Struberg <[email protected]>
> Subject: Re: [DISCUSS] remove logging for "Calling method on proxy is 
> restricted except Object.toString()"
> To: [email protected]
> Date: Thursday, September 23, 2010, 3:38 PM
> Guess then I'll need to ask Pete or
> Gavin about what they meant with it. Because I don't think
> that it will do any harm for hashCode() and equals().
> Of course, the resolved contextual instance may change. But
> hashCode and equals may change also if the instances get
> changed by another thread...
> 
> LieGrue,
> strub
> 
> --- On Thu, 9/23/10, Joseph Bergmark <[email protected]>
> wrote:
> 
> > From: Joseph Bergmark <[email protected]>
> > Subject: Re: [DISCUSS] remove logging for "Calling
> method on proxy is restricted except Object.toString()"
> > To: [email protected]
> > Date: Thursday, September 23, 2010, 3:09 PM
> > I don't interpret that sentence in
> > quite the same way.
> > 
> > When it says "portable applications should not invoke
> any
> > method
> > declared by java.lang.Object, except for toString(),
> on a
> > client
> > proxy", I read that to say that this is behavior that
> the
> > spec decided
> > it couldn't define, so they are basically telling the
> user
> > not to do
> > it because they risk being broken.
> > 
> > It does appear to leave the behavior up to the
> > implementation though.
> > 
> > Sincerely,
> > 
> > Joe
> > 
> > On Thu, Sep 23, 2010 at 10:43 AM, Mark Struberg <[email protected]>
> > wrote:
> > >> The behavior of all methods declared by
> > java.lang.Object,
> > >> except for
> > >> toString(), is undefined for a client proxy.
> > Portable
> > >> applications
> > >> should not invoke any method declared by
> > java.lang.Object,
> > >> except for
> > >> toString(), on a client proxy.
> > >
> > > I'm reading this as "we should not allow the
> > interception of Object methods", because equals() and
> > hashCode() are really important to use.
> > >
> > > LieGrue,
> > > strub
> > >
> > > --- On Thu, 9/23/10, Eric Covener <[email protected]>
> > wrote:
> > >
> > >> From: Eric Covener <[email protected]>
> > >> Subject: Re: [DISCUSS] remove logging for
> "Calling
> > method on proxy is restricted except
> Object.toString()"
> > >> To: [email protected]
> > >> Date: Thursday, September 23, 2010, 2:34 PM
> > >> On Thu, Sep 23, 2010 at 10:31 AM,
> > >> Mark Struberg <[email protected]>
> > >> wrote:
> > >> > I generally doubt that this is
> > undefined/unintended!
> > >> >
> > >>
> > >> I thought this trace message and thread were
> in
> > regards to
> > >> this rule
> > >> on contextual references:
> > >>
> > >>
> > >> 5.4.2. Client proxy invocation
> > >>
> > >> Every time a method of the bean is invoked
> upon a
> > client
> > >> proxy, the
> > >> client proxy must:
> > >>
> > >> obtain a contextual instance of the bean, as
> > defined in
> > >> Section 6.5.2,
> > >> “Contextual instance of a bean”, and
> > >>
> > >> invoke the method upon this instance.
> > >>
> > >> If the scope is not active, as specified in
> > Section 6.5.1,
> > >> “The active
> > >> context object for a scope”, the client
> proxy
> > rethrows
> > >> the
> > >> ContextNotActiveException or
> > IllegalStateException.
> > >>
> > >> The behavior of all methods declared by
> > java.lang.Object,
> > >> except for
> > >> toString(), is undefined for a client proxy.
> > Portable
> > >> applications
> > >> should not invoke any method declared by
> > java.lang.Object,
> > >> except for
> > >> toString(), on a client proxy.
> > >>
> > >>
> > >>
> > >> --
> > >> Eric Covener
> > >> [email protected]
> > >>
> > >
> > >
> > >
> > >
> > 
> 
> 
> 
> 



Reply via email to