You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Patrick Linskey <pl...@bea.com> on 2006/10/31 10:28:16 UTC

@Strategy

Hi,

@Strategy allows the specification of a custom class name in string
form. However, class names inside quotes don't refactor all that well. I
think we should add an @StrategyClass annotation that allows
specification of a strongly-typed Class instance. What say ye?

We should make a similar decision for other annotations as well; I
haven't sorted through the annotations just yet.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

RE: @Strategy

Posted by Patrick Linskey <pl...@bea.com>.
> > @Strategy allows the specification of a custom class name in string
> > form. However, class names inside quotes don't refactor all that  
> > well. I
> > think we should add an @StrategyClass annotation that allows
> > specification of a strongly-typed Class instance. What say ye?
> 
> I'm not voting either way; I just want to point out that the reason  
> for the String value was twofold:
> 1. To allow the use of aliases for built-in strategies.
> 2. To allow the use of plugin strings to configure the strategy, for  
> example: "com.xyz.MyStrategy(foo=1, bar=2)"
> 
> These might be pretty weak reasons, but they're worth mentioning.

The reasons make sense. And FTR, I'm not proposing that we get rid of
the existing @Strategy, but rather that we add a new @StrategyClass that
can be strongly-typed. This might lead us down the
too-many-config-options path, though.

-Patrick

Re: @Strategy

Posted by Abe White <aw...@bea.com>.
> @Strategy allows the specification of a custom class name in string
> form. However, class names inside quotes don't refactor all that  
> well. I
> think we should add an @StrategyClass annotation that allows
> specification of a strongly-typed Class instance. What say ye?

I'm not voting either way; I just want to point out that the reason  
for the String value was twofold:
1. To allow the use of aliases for built-in strategies.
2. To allow the use of plugin strings to configure the strategy, for  
example: "com.xyz.MyStrategy(foo=1, bar=2)"

These might be pretty weak reasons, but they're worth mentioning.

Re: @Strategy

Posted by Marc Prud'hommeaux <mp...@apache.org>.
That sounds like a good idea, but rather than adding a new  
"StrategyClass" annotation, why not just add a "strategyClass"  
element to the existing "Strategy" annotation?


On Oct 31, 2006, at 1:28 AM, Patrick Linskey wrote:

> Hi,
>
> @Strategy allows the specification of a custom class name in string
> form. However, class names inside quotes don't refactor all that  
> well. I
> think we should add an @StrategyClass annotation that allows
> specification of a strongly-typed Class instance. What say ye?
>
> We should make a similar decision for other annotations as well; I
> haven't sorted through the annotations just yet.
>
> -Patrick
>
> -- 
> Patrick Linskey
> BEA Systems, Inc.
>
> ______________________________________________________________________ 
> _
> Notice:  This email message, together with any attachments, may  
> contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> affiliated
> entities,  that may be confidential,  proprietary,  copyrighted   
> and/or
> legally privileged, and is intended solely for the use of the  
> individual
> or entity named in this message. If you are not the intended  
> recipient,
> and have received this message in error, please immediately return  
> this
> by email and then delete it.

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.