Thanks, problem solved!Regards,
Andrej

On Jan 3, 2008 5:25 PM, Frank Budinsky <[EMAIL PROTECTED]> wrote:

> Hi Andrej,
>
> There is currently no way to remove types from a scope. Normally you would
> use two different scopes for your test. For example:
>
> HelperContext scope1 = SDOUtil.createHelperContext();
> URL url = getClass().getResource("/nl/iteye/sdoexamples/Customer.xsd");
>          scope1.getXSDHelper().define (url.openStream(), url.toString());
> // work with the dynamic types in scope1
> // ...
>
> HelperContext scope2 = SDOUtil.createHelperContext();
> StaticSdoFactory.INSTANCE.register (scope2);
> // work with the static types in scope2
> // ...
>
> Frank.
>
>
>
>
> "Andrej Koelewijn" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 01/03/2008 09:45 AM
> Please respond to
> [email protected]
>
>
> To
> [email protected]
> cc
>
> Subject
> Re: Switching from dynamic to static sdo dataobjects
>
>
>
>
>
>
> Hi Kelvin,
> I still have this issue. When i wrote the other thread i didn't understand
> what was causing the problem, now i know what it is, but i still don't
> know
> how to solve it.
> Thanks,
> Andrej
>
>
> On 1/3/08, kelvin goodson <[EMAIL PROTECTED]> wrote:
> >
> > Hi Andrej,
> >   Thanks for your notes. I think from your other thread you are sorted
> > with regards to this issue now.  Is that right?
> > Regards, Kelvin.
> >
> > On 31/12/2007, Andrej Koelewijn <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I'm trying to create some test programs with sdo, and one of the tests
> > > is
> > > that i create a datagraph using dynamic dataobjects (defined using an
> > > xsd),
> > > save the datagraph and then try to load it using static dataobjects.
> > > How do i redefine/reregister dataobjects? If i first define  the
> dynamic
> > > types like:
> > >
> > >         URL url =
> > >
> > > getClass().getResource("/nl/iteye/sdoexamples/Customer.xsd");
> > >         XSDHelper.INSTANCE.define (url.openStream(), url.toString());
> > >
> > > And later reregister the same types, but static generated from the
> same
> > > xsd:
> > >
> > >         HelperContext scope = HelperProvider.getDefaultContext();
> > >         StaticSdoFactory.INSTANCE.register (scope);
> > >
> > > I get ClassCastExceptions when using the static types:
> > >
> > >         java.lang.ClassCastException:
> > > org.apache.tuscany.sdo.impl.DynamicDataObjectImpl cannot be cast to
> > > nl.iteye.sdoexamples.ex2.Customers
> > >
> > > Is it possible to clear all type definitions?
> > >
> > > Thanks,
> > > Andrej
> > >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to