|
Home > Archive > Apache JDO Project > September 2005 > Testing persistent interfaces
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Testing persistent interfaces
|
|
| Craig Russell 2005-09-05, 2:45 am |
| | |
| karan malhi 2005-09-05, 2:45 am |
| Hi Craig,
_the wiki still shows the following :_
is changed to become
<bean id="company1" class="org.apache.jdo.tck.pc.company.CompanyFactoryImpl"
factory-method="newCompany">
_
Whereas your previous email mentioned that the above should now be_
is changed to become
{{{
- *<bean id="company1" class="org.apache.jdo.tck.pc.company.CompanyFactoryImpl"*
+ <bean id="company1" factory-bean="companyFactory"
- factory-method="newCompany">
+ factory-method="newCompany">
Craig Russell wrote
> Javadogs,
>
> Please check out the Wiki page
> http://wiki.apache.org/jdo/PersistentInterfaces and this patch.
>
> I've tested the companyNoRelationships.xml but haven't updated the
> other testdata files, pending a review. The idea is to replace the
> testdata xml files with the factory concept so they can be used by the
> standard CompletenessTest as well as the interface test.
>
> Craig
>
>
> ------------------------------------------------------------------------
>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
Karan Singh
| |
| Craig Russell 2005-09-05, 2:45 am |
| | |
| karan malhi 2005-09-05, 2:45 am |
| Craig:
It shows up correctly now. I had clicked on the link you had sent which
i guess showed the previous version of the page .
Craig Russell wrote:
> Hi Karan,
>
> Did you refresh the page in your browser?
>
> Thanks,
>
> Craig
>
> On Sep 4, 2005, at 7:12 PM, karan malhi wrote:
>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
Karan Singh
| |
| Michael Bouschen 2005-09-05, 5:45 pm |
| Hi Craig,
I like the idea of using the xml bean factory instance pattern instead
of the static bean factory. I was not aware that I can add a bean
instance to the CompanyModelReader using an API such as addSingleton
instead of defining in xml. This solves the problem of attaching the
current pm to the company factory which is then used by the
CompanyModelReader when creating pc instances.
A few remarks about the patch:
- Today CompanyFactoryRegistry.registerFactory takes the name of the
company factory class as an argument. This means all the callers need to
get the value of the system property jdo.tck.mapping.companyfactory and
pass this to the call. Would it make sense to add another method
registerFactory taking just the PM:
public static final String companyFactoryClassName =
System.getProperty("jdo.tck.mapping.companyfactory");
public static void registerFactory(PersistenceManager pm) {
registerFactory(companyFactoryClassName,
pm);
}
This keeps the handling of the property jdo.tck.mapping.companyfactory
local in class CompanyFactoryRegistry.
- Class CompanyModelReader should define a constant for the name of the
companyFactory bean in the xml:
public static final String COMPANY_FACTORY_BEAN = "companyFactory";
It is used in the addSingleton call in method configureFactory.
- The patch includes a changed version of derby.property where you
uncommented the special Mac property for derby. I guess you are not
going to check in this change, correct?
Regards Michael
> Javadogs,
>
> Please check out the Wiki page
> http://wiki.apache.org/jdo/PersistentInterfaces and this patch.
>
> I've tested the companyNoRelationships.xml but haven't updated the other
> testdata files, pending a review. The idea is to replace the testdata
> xml files with the factory concept so they can be used by the standard
> CompletenessTest as well as the interface test.
>
> Craig
>
> =
> ------------------------------------------------------------------------
>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
| |
| Craig Russell 2005-09-05, 5:45 pm |
| | |
| Michael Bouschen 2005-09-05, 5:45 pm |
| Hi Craig,
looks good!
Two minors:
- The patch file misses a newline at the end of the file which causes
problems when applying the patch. Could you please check whether file
companyNoRelationships.xml has a newline at the end?
- Do we use upper case letters for names of constants? If yes you might
want to change the name of factoryPropertyName and
defaultFactoryClassName in class CompanyFactoryRegistry.
Regards Michael
> Hi Michael,
>
> Thanks for the comments. A final code review is attached. I'll send
> the xml file updates as a separate review.
>
> ------------------------------------------------------------------------
>
>
> On Sep 5, 2005, at 9:39 AM, Michael Bouschen wrote:
>
>
>
> Good.
>
>
>
> Right.
>
>
>
> Correct.
>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
> =
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
| |
| Craig Russell 2005-09-05, 8:51 pm |
| |
|
|
|
|