persistence@glassfish.java.net

Re: Strings duplications in TopLink code

From: Tom Ware <tom.ware_at_oracle.com>
Date: Tue, 14 Mar 2006 13:14:32 -0500

Hi Marina,

  Lets make it 2 issues.

  The updates that remove the duplication will be in the next
entity-persistence drop.

-Tom

Marina Vatkina wrote:

>Hi Tom,
>
>You can make the change. Will you rename the hints 'toplink...' at the
>same time?
>
>Should we split the issue in 2 or you would prefer to fix it all together
>on your side?
>
>While looking at the other strings listed in the issue, it seems to me that
>there is no need to support both names - the current ones and the 'toplink....'
>as all the strings are defined and used in EJB 3.0 related classes.
>
>What do you think?
>
>thanks,
>-marina
>
>Tom Ware wrote:
>
>
>>Hi Marina,
>>
>> Thanks for pointing this issue out. If it is ok with you, we'll make
>>the change here. The hint-related constants will now be on:
>>oracle.toplink.essentials.ejb.cmp3.EJBQuery
>>
>>Thanks again,
>>-Tom
>>
>>
>>Marina Vatkina wrote:
>>
>>
>>
>>>Tom,
>>>
>>>While trying to fix the issue 327
>>>(https://glassfish.dev.java.net/issues/show_bug.cgi?id=327)
>>>I saw that some strings are defined in 2 classes, and used
>>>directly in the 3rd. For example:
>>>
>>>- In EJBQueryImpl: as the string itself, e.g.
>>> if (hintName.equals("cacheUsage"))
>>>
>>>- In EntityMappingsXMLWriter as
>>> private static final String CACHE_USAGE = "cacheUsage";
>>>
>>>- In XMLConstants as
>>> static final String CACHE_USAGE
>>>
>>>Do you see any problems with combining such cases into a single
>>>place and making them public? Will XMLConstants be the right place?
>>>
>>>thanks,
>>>-marina
>>>
>>>
>>>
>>>
>>>
>
>
>

-- 
Tom Ware
Principal Software Engineer
Oracle Canada Inc.
Direct: (613) 783-4598
Email: tom.ware_at_oracle.com