Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-25 Thread Simon Laws

On 6/20/07, Pete Robbins [EMAIL PROTECTED] wrote:


oh.. they are freed later on in the ParsedLocations destructor ??? OK. I
clearly need to look at this when more awake :-(

On 20/06/07, Pete Robbins [EMAIL PROTECTED] wrote:

 Having just browsed the code in parseIfNot I would be inclined to
rewrite
 it! It looks like it is over complex and news up a SDOSchemaSax2Parser
that
 is never freed. I'll maybe take a look at getting that into shape in the
 next week.

 Cheers,


 On 20/06/07, Simon Laws [EMAIL PROTECTED] wrote:
 
  OK, thanks Pete, I'll take a look.
 



 --
 Pete




--
Pete


Pete, a quick update,  I've just upgraded the PHP SDO implementation to
Tuscany revision 550411. I'm just investigating a test failure around
namespace short names I'm now seeing. I'll post again when I know more.

Simon


[C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Simon Laws

Posting to tuscany and php lists

I raised a bug (http://issues.apache.org/jira/browse/TUSCANY-1362) as we
noticed in PHP that C++ SDO was going out across the network to find schema
identified by namespace alone even when the schema had already been read.
The problem is that the list that is used to check whether the schema has
been seen already is based on the location of the schema. So when something
later tries to read the schema based on namespace it can't tell it's seen
it.

I have a fix which involves storing a second list of namespaces seen before
to sit alongside the locations seen before list. This list can then be
checked as well. Now the worry I have in implementing this is that I believe
if we check schema loads against the previous seen namespaces it means that
we can't load types for a namespace from more than one file. Is this a
scenario that is important to support?

Regards

Simon


Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Pete Robbins

Tricky one. My understanding is that imports should be for unique
namespaces. include adds types to the same namespace. So I think if you
restrict this logic to the import elements you should be ok.

Cheers,


On 20/06/07, Simon Laws [EMAIL PROTECTED] wrote:


Posting to tuscany and php lists

I raised a bug (http://issues.apache.org/jira/browse/TUSCANY-1362) as we
noticed in PHP that C++ SDO was going out across the network to find
schema
identified by namespace alone even when the schema had already been read.
The problem is that the list that is used to check whether the schema has
been seen already is based on the location of the schema. So when
something
later tries to read the schema based on namespace it can't tell it's seen
it.

I have a fix which involves storing a second list of namespaces seen
before
to sit alongside the locations seen before list. This list can then be
checked as well. Now the worry I have in implementing this is that I
believe
if we check schema loads against the previous seen namespaces it means
that
we can't load types for a namespace from more than one file. Is this a
scenario that is important to support?

Regards

Simon





--
Pete


Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Pete Robbins

I just added a comment to the Jira on how I think it should be fixed.

Cheers,


On 20/06/07, Pete Robbins [EMAIL PROTECTED] wrote:


Tricky one. My understanding is that imports should be for unique
namespaces. include adds types to the same namespace. So I think if you
restrict this logic to the import elements you should be ok.

Cheers,


 On 20/06/07, Simon Laws [EMAIL PROTECTED] wrote:

 Posting to tuscany and php lists

 I raised a bug ( http://issues.apache.org/jira/browse/TUSCANY-1362) as
 we
 noticed in PHP that C++ SDO was going out across the network to find
 schema
 identified by namespace alone even when the schema had already been
 read.
 The problem is that the list that is used to check whether the schema
 has
 been seen already is based on the location of the schema. So when
 something
 later tries to read the schema based on namespace it can't tell it's
 seen
 it.

 I have a fix which involves storing a second list of namespaces seen
 before
 to sit alongside the locations seen before list. This list can then be
 checked as well. Now the worry I have in implementing this is that I
 believe
 if we check schema loads against the previous seen namespaces it means
 that
 we can't load types for a namespace from more than one file. Is this a
 scenario that is important to support?

 Regards

 Simon




--
Pete





--
Pete


Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Simon Laws

OK, thanks Pete, I'll take a look.


Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Pete Robbins

Having just browsed the code in parseIfNot I would be inclined to rewrite
it! It looks like it is over complex and news up a SDOSchemaSax2Parser that
is never freed. I'll maybe take a look at getting that into shape in the
next week.

Cheers,


On 20/06/07, Simon Laws [EMAIL PROTECTED] wrote:


OK, thanks Pete, I'll take a look.





--
Pete


Re: [C++] SDO - preventing SDO from loading schema across the network

2007-06-20 Thread Pete Robbins

oh.. they are freed later on in the ParsedLocations destructor ??? OK. I
clearly need to look at this when more awake :-(

On 20/06/07, Pete Robbins [EMAIL PROTECTED] wrote:


Having just browsed the code in parseIfNot I would be inclined to rewrite
it! It looks like it is over complex and news up a SDOSchemaSax2Parser that
is never freed. I'll maybe take a look at getting that into shape in the
next week.

Cheers,


On 20/06/07, Simon Laws [EMAIL PROTECTED] wrote:

 OK, thanks Pete, I'll take a look.




--
Pete





--
Pete