db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Bengtson <e...@jpox.org>
Subject Re: TCK completeness interface
Date Thu, 06 Apr 2006 00:44:19 GMT
More specific:

CompletenessPCClassTest works great because you have classes with constructors.
When you invoke spring it instantiates the classes by calling the constructors
and passing the arguments from the XML file

For CompletenessInterfaceTest you use the same "beans", but in this case the
implementation does not have constructors with arguments because the
implementation was generated from interfaces by JPOX.

Is it clear?

    <bean id="emp2" factory-bean="companyFactory"
factory-method="newFullTimeEmployee">
        <constructor-arg index="0"
type="long"><value>2</value></constructor-arg>
        <constructor-arg index="1"
type="java.lang.String"><value>emp2First</value></constructor-arg>
        <constructor-arg index="2"
type="java.lang.String"><value>emp2Last</value></constructor-arg>
        <constructor-arg index="3"
type="java.lang.String"><value>emp2Middle</value></constructor-arg>
        <constructor-arg index="4"
type="java.util.Date"><value>22/Dec/1975</value></constructor-arg>
        <constructor-arg index="5"
type="org.apache.jdo.tck.pc.company.IAddress"><ref
local="addr2"/></constructor-arg>
        <constructor-arg index="6"
type="java.util.Date"><value>1/Jul/2003</value></constructor-arg>
        <constructor-arg index="7"
type="double"><value>10000</value></constructor-arg>
        <property name="weeklyhours"><value>40</value></property>
        <property name="medicalInsurance"><ref bean="medicalIns2"/></property>


Quoting Craig L Russell <Craig.Russell@Sun.COM>:

> Hi Erik,
>
> All of the fields that need to be set in the instances should be
> declared in the properties data file.
>
> Please be more specific, and file a bug with the details.
>
> Which data file are you using and which null values are incorrect?
>
> Thanks,
>
> Craig
>
> On Apr 5, 2006, at 5:21 PM, Erik Bengtson wrote:
>
> >
> >
> > Hi,
> >
> > The completeness test uses Spring for creating instances. Spring
> > sets values
> > using the constructors, but for the interface test the generated
> > implementations have only a default constructor, so instances will be
> > constructed with null values.
> >
> > Later the JDO vendor impl will attempt to store instances in not
> > null columns,
> > and this fails.
> >
> > Regards,
>
> 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!
>
>




Mime
View raw message