Hello everyone,
After having (successfully) Marshalled and Unarshalled data from XML to Java
and from Java to XML, I'm now trying to make things a bit harder: I'm adding
the relational database.
That is, I'm trying to pass data from an XML (or java, doesn't matter) to a
relational database.
I did the following (conforming to the doc):
- Adding the JPA annotations to my class (Person.java)
- Implementing the CastorDaoSupport with its interface (the same way it has
been done in the doc)
- Creating a spring-config.xml
- Creating a jdo-conf.xml
But in the doc it is said I have to add this piece of code :
*JDOClassDescriptorResolver resolver = new JDOClassDescriptorResolverImpl();
resolver.addClass(org.castor.jpa.Single.class);
// or alternatively you can add the package:
resolver.addPackage("org.castor.jpa");
InputSource jdoConfiguration = ...;
JDOManager.loadConfiguration(jdoConfiguration, null, null, resolver);
JDOManager jdoManager = JDOManager.createInstance("jpa-extensions");
*
The only point is: where do I have to add it ???
It seems to be Java code but in wich class file do I have to put it ?
If anyone could help me, that would be very appreciated !
Best regards,
Jorrit Wortel