[
https://issues.apache.org/jira/browse/JDO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630443#action_12630443
]
Richard Schilling commented on JDO-582:
---------------------------------------
I had initially set up the test with two configuration files, just like you
suggested, but I didn't understand by looking at the code and the XML file how
both class names get added to the search list.
So, I think I just need more information on how to setup the .xml files and
actually make the call.
On my first attempt I tried using one configuration file with two persistence
manager factories defined. I got an error - something about not being able to
have duplicate properties defined. Here's what I had in one file:
<persistence-manager-factory>
<property
name="javax.jdo.PersistenceManagerFactoryClass"
value="bad.class.negative9a.1"/> <!-- name is arbitrary class
name -->
</persistence-manager-factory>
<persistence-manager-factory>
<property
name="javax.jdo.PersistenceManagerFactoryClass"
value="bad.class.negative9a.2"/> <!-- name is arbitrary class
name -->
</persistence-manager-factory>
Then I tried using the two configuration files as you suggest, putting the
definition for each PMF in a separate file. But, I got an error there as well,
with the following code being executed in the test method:
ClasspathHelper.addFile(
JDOCONFIG_CLASSPATH_PREFIX + "/Negative09/09a", loader);
ClasspathHelper.addFile(
JDOCONFIG_CLASSPATH_PREFIX + "/Negative09/09b", loader);
// call getPersistenceManagerFactory(classloader);
So, how do I specify the class names in the .xml files?
Also, I didn't expect to be actually using a real class name as you suggets
(e.g. javax.jdo.JDOHelperTest.BadPMFNoGetPMFMethod).
Can you explain this a little more please? Would be very helpful in my
understanding of PMF internal behavior...
Thanks.
> Test case needed for JDOFatalUserException nested exception argument needs
> cast to Throwable[]
> ----------------------------------------------------------------------------------------------
>
> Key: JDO-582
> URL: https://issues.apache.org/jira/browse/JDO-582
> Project: JDO
> Issue Type: Bug
> Components: api2, api2-legacy
> Reporter: Erik Bengtson
> Assignee: Richard Schilling
> Fix For: JDO 2 maintenance release 2
>
> Attachments: 20080710-jdo-582.diff, 20080710-jdo-582.diff,
> 20080911-jdo-582-JDOHelper.patch, 20080911-jdo-582-JDOHelperConfigTest.patch,
> 20080911-jdo-582-Negative09.patch, 20080911-jdo-582.patch,
> 20080911-jdo-582.patch, estedExceptionJDOHelper.patch, Negative09.zip
>
>
> After collecting exceptions from invoking getPersistenceManagerFactory on all
> implementations, if no implementation has succeeded in returning a
> PersistenceManagerFactory, an exception is thrown, and the argument should be
> a Throwable[]. Otherwise, it's treated as a failed object instead of nested
> exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.