[ 
http://issues.apache.org/jira/browse/TUSCANY-707?page=comments#action_12434586 
] 
            
Ron Gavlin commented on TUSCANY-707:
------------------------------------

In my test, I first initialize all metadata and then create a list of 2000 
dataobjects. The dataobject of choice has several Attribute properties followed 
by one Reference property. The Reference property is the one causing problems. 
After I create the dataobject list, I spawn 4 threads each of which starts at a 
different index in the dataobject list and repeatedly invokes 
DataObject.get("path") where path = "referencePropertyName/childPropertyName" 
on different dataobjects in the list.

The test succeeds on a single-processor machine but fails on a multi-processor 
machine. I don't think it is coincidental that this problem only shows up on a 
multiprocessor box (See article 
http://www.javaworld.com/jw-02-2001/jw-0209-toolbox.html). 

I suspect there are synchronization problems with the map named 
ClassImpl.propertyNameToPropertyMap. Based on the info in the article above, is 
it possible that the null-checking trick currently being used to protect the 
Map isn't sufficient on an MP box? Just for grins, I thought I would try 
synchronizing on a lock associated with the propertyNameToPropertyMap and see 
if the problem disappears. Any thoughts?


> IllegalArgumentException at 
> o.a.t.sdo.util.DataObjectUtil.getOpenFeature(DataObjectUtil.java:1782) 
> w/dual-core CPU
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-707
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-707
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-M1
>         Environment: WinXP Professional w/dual-core CPU
>            Reporter: Ron Gavlin
>            Priority: Critical
>
> I have a load test which concurrently interrogates properties from different 
> "myDataObject" instances in different threads. When the test is run on a 
> dual-core PC, several threads throw the following IllegalArgumentException 
> while other threads execute without problem. When I run the test on a 
> single-processor PC, no exception is thrown. Any suggestions?
> Thanks in advance for your assistance.
> - Ron
> java.lang.IllegalArgumentException: Class 'MyDataObject' does not have a 
> feature named 'myChildDataObject'
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil.getOpenFeature(DataObjectUtil.java:1782)
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil.getProperty(DataObjectUtil.java:2345)
> at 
> org.apache.tuscany.sdo.impl.DataObjectImpl.getProperty(DataObjectImpl.java:1284)
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.setFeatureName(DataObjectUtil.java:2032)
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.process(DataObjectUtil.java:2139)
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.init(DataObjectUtil.java:1918)
> at 
> org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(DataObjectUtil.java:1838)
> at org.apache.tuscany.sdo.util.DataObjectUtil.get(DataObjectUtil.java:739)
> at org.apache.tuscany.sdo.impl.DataObjectImpl.get(DataObjectImpl.java:213)
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to