Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Trouble with overrideLoader
Trouble with overrideLoader [message #41809] Fri, 22 February 2008 00:14 Go to next message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
Hello,

I am currently developing a bundle of plug-ins to provide Ingres support
for DTP.

At the moment I have two questions regarding to the catalog loading.

1. JDBC loader

To provide additional catalog information for DTP, I use the
"overrideLoader" extension point. This way I did not have to implement
the entire catalog structure. After all I'm a bit unsure if I use the
API as it is meant to be used. After testing the implementation of a
table loader (it just replaces the view and the table factory), I have
seen an unexpected result. The following steps were done in the data
source explorer.

1. Loading table A's columns
2. Loading table B's columns
3. Refreshing table A's columns

To my surprise I have seen the columns of table B as columns of table A
(the effect occurs only when using an override loader).

After having a closer look at the source code, I found out that

* There is always exactly one instance of a specific override loader
* The loader's instance is shared between all requesting objects (e.g.
tables)
* A loader has a catalog object that depends on the requesting object
(e.g. the JDBCTableColumnLoader expects the catalog object to be an
instance of Table)

When a object uses its cached loader, the loader is sometimes
initialized with the wrong catalog object (due to sharing). Are the
loaders meant to be used in a stateless way? If so, can you provide an
example?

2. ProcedureColumnLoader and TableColumnLoader

JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
uses both the EClass of Column to find possible override loaders.
Because of casting the result to the according loader (in JDBCProcedure
and JDBCTable), I get some class cast exceptions when trying to retrieve
table columns or procedure columns.

Thanks in advance,

Enrico Schenk

Software Engineer
Ingres Germany GmbH - European Technology Center

PS: It's planned to contribute the plug-ins (including the source code)
to the eclipse foundation. Can you point me in the right direction for
the required steps?
Re: Trouble with overrideLoader [message #41848 is a reply to message #41809] Fri, 22 February 2008 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Hi Enrico...

Sorry I didn't get back to your mailing list posting earlier, but glad you
reposted here.

That's definitely an odd behavior you found with (1). I know that there has
been some discussion of having multiple levels of override loaders with
priorities and such to allow for a hierarchy, so that may clear up this
issue in Ganymede.

Can you provide some example code perhaps using Derby or one of the other
profiles to reproduce this issue? I'd be happy to look at it. Obviously it
warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.

As for (2), yeah, I wondered about that when I wrote that code in the first
place. Because of the way those are structured, you'd have to actually
override the routine loader or the table loader and provide your own column
loader below them to avoid that problem. At this point I don't have a
better solution other than implementing the whole catalog loader down the
line.

As for contributing your Ingres code, we'd love to have that in the
Enablement project part of DTP. Please contact John Graham
(john.graham@sybase.com) and he can help point you in the right direction.

--Brian Fitzpatrick
Sybase, Inc.
Sr. Software Engineer
DataTools Connectivity Lead

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fpl453$t64$1@build.eclipse.org...
> Hello,
>
> I am currently developing a bundle of plug-ins to provide Ingres support
> for DTP.
>
> At the moment I have two questions regarding to the catalog loading.
>
> 1. JDBC loader
>
> To provide additional catalog information for DTP, I use the
> "overrideLoader" extension point. This way I did not have to implement the
> entire catalog structure. After all I'm a bit unsure if I use the API as
> it is meant to be used. After testing the implementation of a table loader
> (it just replaces the view and the table factory), I have seen an
> unexpected result. The following steps were done in the data source
> explorer.
>
> 1. Loading table A's columns
> 2. Loading table B's columns
> 3. Refreshing table A's columns
>
> To my surprise I have seen the columns of table B as columns of table A
> (the effect occurs only when using an override loader).
>
> After having a closer look at the source code, I found out that
>
> * There is always exactly one instance of a specific override loader
> * The loader's instance is shared between all requesting objects (e.g.
> tables)
> * A loader has a catalog object that depends on the requesting object
> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
> instance of Table)
>
> When a object uses its cached loader, the loader is sometimes initialized
> with the wrong catalog object (due to sharing). Are the loaders meant to
> be used in a stateless way? If so, can you provide an example?
>
> 2. ProcedureColumnLoader and TableColumnLoader
>
> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
> uses both the EClass of Column to find possible override loaders. Because
> of casting the result to the according loader (in JDBCProcedure and
> JDBCTable), I get some class cast exceptions when trying to retrieve table
> columns or procedure columns.
>
> Thanks in advance,
>
> Enrico Schenk
>
> Software Engineer
> Ingres Germany GmbH - European Technology Center
>
> PS: It's planned to contribute the plug-ins (including the source code) to
> the eclipse foundation. Can you point me in the right direction for the
> required steps?
Re: Trouble with overrideLoader [message #41970 is a reply to message #41848] Mon, 25 February 2008 15:31 Go to previous messageGo to next message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------030801080508090304060203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello Brian,

thanks for your reply. I wasn't sure if the mailing list is alive so I
reposted the message here.

I've a JUnit test for the override loader problem (the source is
attached to this mail). It basically uses two different databases and
retrieves the schemas for both of them. Afterwards it refreshes one of
the databases and shows that this instance lists an additional schema
(which belongs to the other database).

To get the test running you should adjust the properties in
configuration.properties to fit your environment (location of the Derby
10.1 driver, ...). The class
org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
contains the test and should therefore run as "JUnit Plug-in Test".
Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
can have look at the setup code :).

Regarding the column loaders. I was afraid you said something like that.
Luckily I've already derived tables, views and procedures, so I can
easily add the column loaders.

Thank you,

Enrico Schenk

Software Engineer
Ingres Germany GmbH - European Technology Center

Brian Fitzpatrick wrote:
> Hi Enrico...
>
> Sorry I didn't get back to your mailing list posting earlier, but glad you
> reposted here.
>
> That's definitely an odd behavior you found with (1). I know that there has
> been some discussion of having multiple levels of override loaders with
> priorities and such to allow for a hierarchy, so that may clear up this
> issue in Ganymede.
>
> Can you provide some example code perhaps using Derby or one of the other
> profiles to reproduce this issue? I'd be happy to look at it. Obviously it
> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>
> As for (2), yeah, I wondered about that when I wrote that code in the first
> place. Because of the way those are structured, you'd have to actually
> override the routine loader or the table loader and provide your own column
> loader below them to avoid that problem. At this point I don't have a
> better solution other than implementing the whole catalog loader down the
> line.
>
> As for contributing your Ingres code, we'd love to have that in the
> Enablement project part of DTP. Please contact John Graham
> (john.graham@sybase.com) and he can help point you in the right direction.
>
> --Brian Fitzpatrick
> Sybase, Inc.
> Sr. Software Engineer
> DataTools Connectivity Lead
>
> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
> news:fpl453$t64$1@build.eclipse.org...
>> Hello,
>>
>> I am currently developing a bundle of plug-ins to provide Ingres support
>> for DTP.
>>
>> At the moment I have two questions regarding to the catalog loading.
>>
>> 1. JDBC loader
>>
>> To provide additional catalog information for DTP, I use the
>> "overrideLoader" extension point. This way I did not have to implement the
>> entire catalog structure. After all I'm a bit unsure if I use the API as
>> it is meant to be used. After testing the implementation of a table loader
>> (it just replaces the view and the table factory), I have seen an
>> unexpected result. The following steps were done in the data source
>> explorer.
>>
>> 1. Loading table A's columns
>> 2. Loading table B's columns
>> 3. Refreshing table A's columns
>>
>> To my surprise I have seen the columns of table B as columns of table A
>> (the effect occurs only when using an override loader).
>>
>> After having a closer look at the source code, I found out that
>>
>> * There is always exactly one instance of a specific override loader
>> * The loader's instance is shared between all requesting objects (e.g.
>> tables)
>> * A loader has a catalog object that depends on the requesting object
>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>> instance of Table)
>>
>> When a object uses its cached loader, the loader is sometimes initialized
>> with the wrong catalog object (due to sharing). Are the loaders meant to
>> be used in a stateless way? If so, can you provide an example?
>>
>> 2. ProcedureColumnLoader and TableColumnLoader
>>
>> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
>> uses both the EClass of Column to find possible override loaders. Because
>> of casting the result to the according loader (in JDBCProcedure and
>> JDBCTable), I get some class cast exceptions when trying to retrieve table
>> columns or procedure columns.
>>
>> Thanks in advance,
>>
>> Enrico Schenk
>>
>> Software Engineer
>> Ingres Germany GmbH - European Technology Center
>>
>> PS: It's planned to contribute the plug-ins (including the source code) to
>> the eclipse foundation. Can you point me in the right direction for the
>> required steps?
>
>


--------------030801080508090304060203
Content-Type: application/x-zip-compressed;
name="org.eclipse.datatools.connectivity.sqm.loader.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="org.eclipse.datatools.connectivity.sqm.loader.zip "

UEsDBBQAAAAIAJJFWTjVHJzSpQAAADMBAAA9AAAAb3JnLmVjbGlwc2UuZGF0 YXRvb2xzLmNv
bm5lY3Rpdml0eS5zcW0ubG9hZGVyLnRlc3QvLmNsYXNzcGF0aJ2PPQvCMBRF ZwX/Q8huqptD
axGpoEOVUmepyaONxpeYD9F/b1WKLjq4vXs5nMuL0+tJkQtYJzUmdMxGlABy LSTWCd2Wi+GE
ptNBP+aqcs5UvmlD750Avb2Ro0SRUGc5JY/ydUbfSa6xI7WtGXAljQN2EJ6p KiBv2nW2KrLd
fJ2Xs2WeFX/YjADGtQVm4RykBbFRoZbofql08Cb4zraX+ITj6PP7O1BLAwQU AAAACACSRVk4
aga4JfsAAADHAgAAOwAAAG9yZy5lY2xpcHNlLmRhdGF0b29scy5jb25uZWN0 aXZpdHkuc3Ft
LmxvYWRlci50ZXN0Ly5wcm9qZWN0vZLPTsQgEMbPmvgOm96F9eaB7SZq9qYx WX0AhLGygQFh
2ujbC9hqmmriwextvo/5+A1/xPbN2dUAMRmPm+aCrZsVoPLaYLdpHh9255fN tj07FSH6Ayi6
gaSiCZS7s3siUDpofewYKGtCAqYlSfLeJqY8Yk6YwdA7S6+OWS81REaQSPAa LDso7xwgtYJP
VXFHXKqCz9RTb6zeB1BFjfI6RyXq6vww1EFTHifmQg6yBiB+j5ATMnZ9YadR 87kh+ILyJ27Q
wG4lmud85KvjYvfqBZz8F+joTFeeedRHGLs/xQJ/b/vO4F1dLPTa9Ftg9jy4 yEx1IX79hflH
/ABQSwMECgAAAAAATntZOAAAAAAAAAAAAAAAADcAAABvcmcuZWNsaXBzZS5k YXRhdG9vbHMu
Y29ubmVjdGl2aXR5LnNxbS5sb2FkZXIudGVzdC9iaW4vUEsDBBQAAAAIAJJF WTjSW2D7PwAA
AFAA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Zy9lY2xpcHNlL2RhdGF0b29scy9jb25uZWN0aXZp dHkvc3FtL2xv
YWRlci90ZXN0L092ZXJyaWRlTG9hZGVyVGVzdC5qYXZhUEsFBgAAAAATABMA 4AkAAMsXAAAA
AA==
--------------030801080508090304060203--
Re: Trouble with overrideLoader [message #42004 is a reply to message #41970] Mon, 25 February 2008 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Thanks for the test code... Let me do some playing with this and get back to
you.
--Fitz

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fpun02$u6m$1@build.eclipse.org...
> Hello Brian,
>
> thanks for your reply. I wasn't sure if the mailing list is alive so I
> reposted the message here.
>
> I've a JUnit test for the override loader problem (the source is
> attached to this mail). It basically uses two different databases and
> retrieves the schemas for both of them. Afterwards it refreshes one of
> the databases and shows that this instance lists an additional schema
> (which belongs to the other database).
>
> To get the test running you should adjust the properties in
> configuration.properties to fit your environment (location of the Derby
> 10.1 driver, ...). The class
> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
> contains the test and should therefore run as "JUnit Plug-in Test".
> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
> can have look at the setup code :).
>
> Regarding the column loaders. I was afraid you said something like that.
> Luckily I've already derived tables, views and procedures, so I can
> easily add the column loaders.
>
> Thank you,
>
> Enrico Schenk
>
> Software Engineer
> Ingres Germany GmbH - European Technology Center
>
> Brian Fitzpatrick wrote:
>> Hi Enrico...
>>
>> Sorry I didn't get back to your mailing list posting earlier, but glad
>> you
>> reposted here.
>>
>> That's definitely an odd behavior you found with (1). I know that there
>> has
>> been some discussion of having multiple levels of override loaders with
>> priorities and such to allow for a hierarchy, so that may clear up this
>> issue in Ganymede.
>>
>> Can you provide some example code perhaps using Derby or one of the other
>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>> it
>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>
>> As for (2), yeah, I wondered about that when I wrote that code in the
>> first
>> place. Because of the way those are structured, you'd have to actually
>> override the routine loader or the table loader and provide your own
>> column
>> loader below them to avoid that problem. At this point I don't have a
>> better solution other than implementing the whole catalog loader down the
>> line.
>>
>> As for contributing your Ingres code, we'd love to have that in the
>> Enablement project part of DTP. Please contact John Graham
>> (john.graham@sybase.com) and he can help point you in the right
>> direction.
>>
>> --Brian Fitzpatrick
>> Sybase, Inc.
>> Sr. Software Engineer
>> DataTools Connectivity Lead
>>
>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>> news:fpl453$t64$1@build.eclipse.org...
>>> Hello,
>>>
>>> I am currently developing a bundle of plug-ins to provide Ingres support
>>> for DTP.
>>>
>>> At the moment I have two questions regarding to the catalog loading.
>>>
>>> 1. JDBC loader
>>>
>>> To provide additional catalog information for DTP, I use the
>>> "overrideLoader" extension point. This way I did not have to implement
>>> the
>>> entire catalog structure. After all I'm a bit unsure if I use the API as
>>> it is meant to be used. After testing the implementation of a table
>>> loader
>>> (it just replaces the view and the table factory), I have seen an
>>> unexpected result. The following steps were done in the data source
>>> explorer.
>>>
>>> 1. Loading table A's columns
>>> 2. Loading table B's columns
>>> 3. Refreshing table A's columns
>>>
>>> To my surprise I have seen the columns of table B as columns of table A
>>> (the effect occurs only when using an override loader).
>>>
>>> After having a closer look at the source code, I found out that
>>>
>>> * There is always exactly one instance of a specific override loader
>>> * The loader's instance is shared between all requesting objects (e.g.
>>> tables)
>>> * A loader has a catalog object that depends on the requesting object
>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>> instance of Table)
>>>
>>> When a object uses its cached loader, the loader is sometimes
>>> initialized
>>> with the wrong catalog object (due to sharing). Are the loaders meant to
>>> be used in a stateless way? If so, can you provide an example?
>>>
>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>
>>> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
>>> uses both the EClass of Column to find possible override loaders.
>>> Because
>>> of casting the result to the according loader (in JDBCProcedure and
>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>> table
>>> columns or procedure columns.
>>>
>>> Thanks in advance,
>>>
>>> Enrico Schenk
>>>
>>> Software Engineer
>>> Ingres Germany GmbH - European Technology Center
>>>
>>> PS: It's planned to contribute the plug-ins (including the source code)
>>> to
>>> the eclipse foundation. Can you point me in the right direction for the
>>> required steps?
>>
>>
>
>
Re: Trouble with overrideLoader [message #42035 is a reply to message #42004] Tue, 26 February 2008 21:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Hey Enrico...

Figured it out. If you create a BZ entry for me documenting the issue, I can
get a fix in probably by tomorrow morning for 1.6 M6. The issue is that you
are absolutely correct. I'm creating one and only one instance of that
override loader and then reusing it everywhere. The fix is to create a new
instance of the class each time the loader is created, and then your test
works beautifully.

So please create a new BZ entry for me in Connectivity and I'll get this
bugger fixed. Thanks for your patience!

--Fitz

"Brian Fitzpatrick" <brianf@sybase.com> wrote in message
news:fpun77$vkv$1@build.eclipse.org...
> Thanks for the test code... Let me do some playing with this and get back
> to you.
> --Fitz
>
> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
> news:fpun02$u6m$1@build.eclipse.org...
>> Hello Brian,
>>
>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>> reposted the message here.
>>
>> I've a JUnit test for the override loader problem (the source is
>> attached to this mail). It basically uses two different databases and
>> retrieves the schemas for both of them. Afterwards it refreshes one of
>> the databases and shows that this instance lists an additional schema
>> (which belongs to the other database).
>>
>> To get the test running you should adjust the properties in
>> configuration.properties to fit your environment (location of the Derby
>> 10.1 driver, ...). The class
>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>> contains the test and should therefore run as "JUnit Plug-in Test".
>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>> can have look at the setup code :).
>>
>> Regarding the column loaders. I was afraid you said something like that.
>> Luckily I've already derived tables, views and procedures, so I can
>> easily add the column loaders.
>>
>> Thank you,
>>
>> Enrico Schenk
>>
>> Software Engineer
>> Ingres Germany GmbH - European Technology Center
>>
>> Brian Fitzpatrick wrote:
>>> Hi Enrico...
>>>
>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>> you
>>> reposted here.
>>>
>>> That's definitely an odd behavior you found with (1). I know that there
>>> has
>>> been some discussion of having multiple levels of override loaders with
>>> priorities and such to allow for a hierarchy, so that may clear up this
>>> issue in Ganymede.
>>>
>>> Can you provide some example code perhaps using Derby or one of the
>>> other
>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>> it
>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>
>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>> first
>>> place. Because of the way those are structured, you'd have to actually
>>> override the routine loader or the table loader and provide your own
>>> column
>>> loader below them to avoid that problem. At this point I don't have a
>>> better solution other than implementing the whole catalog loader down
>>> the
>>> line.
>>>
>>> As for contributing your Ingres code, we'd love to have that in the
>>> Enablement project part of DTP. Please contact John Graham
>>> (john.graham@sybase.com) and he can help point you in the right
>>> direction.
>>>
>>> --Brian Fitzpatrick
>>> Sybase, Inc.
>>> Sr. Software Engineer
>>> DataTools Connectivity Lead
>>>
>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>> news:fpl453$t64$1@build.eclipse.org...
>>>> Hello,
>>>>
>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>> support
>>>> for DTP.
>>>>
>>>> At the moment I have two questions regarding to the catalog loading.
>>>>
>>>> 1. JDBC loader
>>>>
>>>> To provide additional catalog information for DTP, I use the
>>>> "overrideLoader" extension point. This way I did not have to implement
>>>> the
>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>> as
>>>> it is meant to be used. After testing the implementation of a table
>>>> loader
>>>> (it just replaces the view and the table factory), I have seen an
>>>> unexpected result. The following steps were done in the data source
>>>> explorer.
>>>>
>>>> 1. Loading table A's columns
>>>> 2. Loading table B's columns
>>>> 3. Refreshing table A's columns
>>>>
>>>> To my surprise I have seen the columns of table B as columns of table A
>>>> (the effect occurs only when using an override loader).
>>>>
>>>> After having a closer look at the source code, I found out that
>>>>
>>>> * There is always exactly one instance of a specific override loader
>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>> tables)
>>>> * A loader has a catalog object that depends on the requesting object
>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>> instance of Table)
>>>>
>>>> When a object uses its cached loader, the loader is sometimes
>>>> initialized
>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>> to
>>>> be used in a stateless way? If so, can you provide an example?
>>>>
>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>
>>>> JDBCProcedure.createParameterLoader() and
>>>> JDBCTable.createColumnLoader()
>>>> uses both the EClass of Column to find possible override loaders.
>>>> Because
>>>> of casting the result to the according loader (in JDBCProcedure and
>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>> table
>>>> columns or procedure columns.
>>>>
>>>> Thanks in advance,
>>>>
>>>> Enrico Schenk
>>>>
>>>> Software Engineer
>>>> Ingres Germany GmbH - European Technology Center
>>>>
>>>> PS: It's planned to contribute the plug-ins (including the source code)
>>>> to
>>>> the eclipse foundation. Can you point me in the right direction for the
>>>> required steps?
>>>
>>>
>>
>>
>
>
Re: Trouble with overrideLoader [message #42097 is a reply to message #42035] Tue, 26 February 2008 21:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Never mind... I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464

I'll get this checked in and it should appear in tomorrow's build.

--Fitz

"Brian Fitzpatrick" <brianf@sybase.com> wrote in message
news:fq1vdv$6ep$1@build.eclipse.org...
> Hey Enrico...
>
> Figured it out. If you create a BZ entry for me documenting the issue, I
> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
> that you are absolutely correct. I'm creating one and only one instance of
> that override loader and then reusing it everywhere. The fix is to create
> a new instance of the class each time the loader is created, and then your
> test works beautifully.
>
> So please create a new BZ entry for me in Connectivity and I'll get this
> bugger fixed. Thanks for your patience!
>
> --Fitz
>
> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
> news:fpun77$vkv$1@build.eclipse.org...
>> Thanks for the test code... Let me do some playing with this and get back
>> to you.
>> --Fitz
>>
>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>> news:fpun02$u6m$1@build.eclipse.org...
>>> Hello Brian,
>>>
>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>> reposted the message here.
>>>
>>> I've a JUnit test for the override loader problem (the source is
>>> attached to this mail). It basically uses two different databases and
>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>> the databases and shows that this instance lists an additional schema
>>> (which belongs to the other database).
>>>
>>> To get the test running you should adjust the properties in
>>> configuration.properties to fit your environment (location of the Derby
>>> 10.1 driver, ...). The class
>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>> can have look at the setup code :).
>>>
>>> Regarding the column loaders. I was afraid you said something like that.
>>> Luckily I've already derived tables, views and procedures, so I can
>>> easily add the column loaders.
>>>
>>> Thank you,
>>>
>>> Enrico Schenk
>>>
>>> Software Engineer
>>> Ingres Germany GmbH - European Technology Center
>>>
>>> Brian Fitzpatrick wrote:
>>>> Hi Enrico...
>>>>
>>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>>> you
>>>> reposted here.
>>>>
>>>> That's definitely an odd behavior you found with (1). I know that there
>>>> has
>>>> been some discussion of having multiple levels of override loaders with
>>>> priorities and such to allow for a hierarchy, so that may clear up this
>>>> issue in Ganymede.
>>>>
>>>> Can you provide some example code perhaps using Derby or one of the
>>>> other
>>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>>> it
>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>
>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>> first
>>>> place. Because of the way those are structured, you'd have to actually
>>>> override the routine loader or the table loader and provide your own
>>>> column
>>>> loader below them to avoid that problem. At this point I don't have a
>>>> better solution other than implementing the whole catalog loader down
>>>> the
>>>> line.
>>>>
>>>> As for contributing your Ingres code, we'd love to have that in the
>>>> Enablement project part of DTP. Please contact John Graham
>>>> (john.graham@sybase.com) and he can help point you in the right
>>>> direction.
>>>>
>>>> --Brian Fitzpatrick
>>>> Sybase, Inc.
>>>> Sr. Software Engineer
>>>> DataTools Connectivity Lead
>>>>
>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>> support
>>>>> for DTP.
>>>>>
>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>
>>>>> 1. JDBC loader
>>>>>
>>>>> To provide additional catalog information for DTP, I use the
>>>>> "overrideLoader" extension point. This way I did not have to implement
>>>>> the
>>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>>> as
>>>>> it is meant to be used. After testing the implementation of a table
>>>>> loader
>>>>> (it just replaces the view and the table factory), I have seen an
>>>>> unexpected result. The following steps were done in the data source
>>>>> explorer.
>>>>>
>>>>> 1. Loading table A's columns
>>>>> 2. Loading table B's columns
>>>>> 3. Refreshing table A's columns
>>>>>
>>>>> To my surprise I have seen the columns of table B as columns of table
>>>>> A
>>>>> (the effect occurs only when using an override loader).
>>>>>
>>>>> After having a closer look at the source code, I found out that
>>>>>
>>>>> * There is always exactly one instance of a specific override loader
>>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>>> tables)
>>>>> * A loader has a catalog object that depends on the requesting object
>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>> instance of Table)
>>>>>
>>>>> When a object uses its cached loader, the loader is sometimes
>>>>> initialized
>>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>>> to
>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>
>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>
>>>>> JDBCProcedure.createParameterLoader() and
>>>>> JDBCTable.createColumnLoader()
>>>>> uses both the EClass of Column to find possible override loaders.
>>>>> Because
>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>> table
>>>>> columns or procedure columns.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Enrico Schenk
>>>>>
>>>>> Software Engineer
>>>>> Ingres Germany GmbH - European Technology Center
>>>>>
>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>> code) to
>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>> the
>>>>> required steps?
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: Trouble with overrideLoader [message #42296 is a reply to message #42097] Wed, 27 February 2008 16:10 Go to previous messageGo to next message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
Thanks Brian, with the patch it works like a charm :)

Enrico

Brian Fitzpatrick wrote:
> Never mind... I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464
>
> I'll get this checked in and it should appear in tomorrow's build.
>
> --Fitz
>
> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
> news:fq1vdv$6ep$1@build.eclipse.org...
>> Hey Enrico...
>>
>> Figured it out. If you create a BZ entry for me documenting the issue, I
>> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
>> that you are absolutely correct. I'm creating one and only one instance of
>> that override loader and then reusing it everywhere. The fix is to create
>> a new instance of the class each time the loader is created, and then your
>> test works beautifully.
>>
>> So please create a new BZ entry for me in Connectivity and I'll get this
>> bugger fixed. Thanks for your patience!
>>
>> --Fitz
>>
>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>> news:fpun77$vkv$1@build.eclipse.org...
>>> Thanks for the test code... Let me do some playing with this and get back
>>> to you.
>>> --Fitz
>>>
>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>> news:fpun02$u6m$1@build.eclipse.org...
>>>> Hello Brian,
>>>>
>>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>>> reposted the message here.
>>>>
>>>> I've a JUnit test for the override loader problem (the source is
>>>> attached to this mail). It basically uses two different databases and
>>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>>> the databases and shows that this instance lists an additional schema
>>>> (which belongs to the other database).
>>>>
>>>> To get the test running you should adjust the properties in
>>>> configuration.properties to fit your environment (location of the Derby
>>>> 10.1 driver, ...). The class
>>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>>> can have look at the setup code :).
>>>>
>>>> Regarding the column loaders. I was afraid you said something like that.
>>>> Luckily I've already derived tables, views and procedures, so I can
>>>> easily add the column loaders.
>>>>
>>>> Thank you,
>>>>
>>>> Enrico Schenk
>>>>
>>>> Software Engineer
>>>> Ingres Germany GmbH - European Technology Center
>>>>
>>>> Brian Fitzpatrick wrote:
>>>>> Hi Enrico...
>>>>>
>>>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>>>> you
>>>>> reposted here.
>>>>>
>>>>> That's definitely an odd behavior you found with (1). I know that there
>>>>> has
>>>>> been some discussion of having multiple levels of override loaders with
>>>>> priorities and such to allow for a hierarchy, so that may clear up this
>>>>> issue in Ganymede.
>>>>>
>>>>> Can you provide some example code perhaps using Derby or one of the
>>>>> other
>>>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>>>> it
>>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>>
>>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>>> first
>>>>> place. Because of the way those are structured, you'd have to actually
>>>>> override the routine loader or the table loader and provide your own
>>>>> column
>>>>> loader below them to avoid that problem. At this point I don't have a
>>>>> better solution other than implementing the whole catalog loader down
>>>>> the
>>>>> line.
>>>>>
>>>>> As for contributing your Ingres code, we'd love to have that in the
>>>>> Enablement project part of DTP. Please contact John Graham
>>>>> (john.graham@sybase.com) and he can help point you in the right
>>>>> direction.
>>>>>
>>>>> --Brian Fitzpatrick
>>>>> Sybase, Inc.
>>>>> Sr. Software Engineer
>>>>> DataTools Connectivity Lead
>>>>>
>>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>>> support
>>>>>> for DTP.
>>>>>>
>>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>>
>>>>>> 1. JDBC loader
>>>>>>
>>>>>> To provide additional catalog information for DTP, I use the
>>>>>> "overrideLoader" extension point. This way I did not have to implement
>>>>>> the
>>>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>>>> as
>>>>>> it is meant to be used. After testing the implementation of a table
>>>>>> loader
>>>>>> (it just replaces the view and the table factory), I have seen an
>>>>>> unexpected result. The following steps were done in the data source
>>>>>> explorer.
>>>>>>
>>>>>> 1. Loading table A's columns
>>>>>> 2. Loading table B's columns
>>>>>> 3. Refreshing table A's columns
>>>>>>
>>>>>> To my surprise I have seen the columns of table B as columns of table
>>>>>> A
>>>>>> (the effect occurs only when using an override loader).
>>>>>>
>>>>>> After having a closer look at the source code, I found out that
>>>>>>
>>>>>> * There is always exactly one instance of a specific override loader
>>>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>>>> tables)
>>>>>> * A loader has a catalog object that depends on the requesting object
>>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>>> instance of Table)
>>>>>>
>>>>>> When a object uses its cached loader, the loader is sometimes
>>>>>> initialized
>>>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>>>> to
>>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>>
>>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>>
>>>>>> JDBCProcedure.createParameterLoader() and
>>>>>> JDBCTable.createColumnLoader()
>>>>>> uses both the EClass of Column to find possible override loaders.
>>>>>> Because
>>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>>> table
>>>>>> columns or procedure columns.
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Enrico Schenk
>>>>>>
>>>>>> Software Engineer
>>>>>> Ingres Germany GmbH - European Technology Center
>>>>>>
>>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>>> code) to
>>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>>> the
>>>>>> required steps?
>>>>>
>>>>
>>>
>>
>
>
Re: Trouble with overrideLoader [message #42321 is a reply to message #42296] Wed, 27 February 2008 20:07 Go to previous message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Great news! Glad we could help! Let us know if you need anything else.
--Fitz

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fq420r$k1i$1@build.eclipse.org...
> Thanks Brian, with the patch it works like a charm :)
>
> Enrico
>
> Brian Fitzpatrick wrote:
>> Never mind... I created
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464
>>
>> I'll get this checked in and it should appear in tomorrow's build.
>>
>> --Fitz
>>
>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>> news:fq1vdv$6ep$1@build.eclipse.org...
>>> Hey Enrico...
>>>
>>> Figured it out. If you create a BZ entry for me documenting the issue, I
>>> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
>>> that you are absolutely correct. I'm creating one and only one instance
>>> of that override loader and then reusing it everywhere. The fix is to
>>> create a new instance of the class each time the loader is created, and
>>> then your test works beautifully.
>>>
>>> So please create a new BZ entry for me in Connectivity and I'll get this
>>> bugger fixed. Thanks for your patience!
>>>
>>> --Fitz
>>>
>>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>>> news:fpun77$vkv$1@build.eclipse.org...
>>>> Thanks for the test code... Let me do some playing with this and get
>>>> back to you.
>>>> --Fitz
>>>>
>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>> news:fpun02$u6m$1@build.eclipse.org...
>>>>> Hello Brian,
>>>>>
>>>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>>>> reposted the message here.
>>>>>
>>>>> I've a JUnit test for the override loader problem (the source is
>>>>> attached to this mail). It basically uses two different databases and
>>>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>>>> the databases and shows that this instance lists an additional schema
>>>>> (which belongs to the other database).
>>>>>
>>>>> To get the test running you should adjust the properties in
>>>>> configuration.properties to fit your environment (location of the
>>>>> Derby
>>>>> 10.1 driver, ...). The class
>>>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>>>> can have look at the setup code :).
>>>>>
>>>>> Regarding the column loaders. I was afraid you said something like
>>>>> that.
>>>>> Luckily I've already derived tables, views and procedures, so I can
>>>>> easily add the column loaders.
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Enrico Schenk
>>>>>
>>>>> Software Engineer
>>>>> Ingres Germany GmbH - European Technology Center
>>>>>
>>>>> Brian Fitzpatrick wrote:
>>>>>> Hi Enrico...
>>>>>>
>>>>>> Sorry I didn't get back to your mailing list posting earlier, but
>>>>>> glad you
>>>>>> reposted here.
>>>>>>
>>>>>> That's definitely an odd behavior you found with (1). I know that
>>>>>> there has
>>>>>> been some discussion of having multiple levels of override loaders
>>>>>> with
>>>>>> priorities and such to allow for a hierarchy, so that may clear up
>>>>>> this
>>>>>> issue in Ganymede.
>>>>>>
>>>>>> Can you provide some example code perhaps using Derby or one of the
>>>>>> other
>>>>>> profiles to reproduce this issue? I'd be happy to look at it.
>>>>>> Obviously it
>>>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>>>
>>>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>>>> first
>>>>>> place. Because of the way those are structured, you'd have to
>>>>>> actually
>>>>>> override the routine loader or the table loader and provide your own
>>>>>> column
>>>>>> loader below them to avoid that problem. At this point I don't have
>>>>>> a
>>>>>> better solution other than implementing the whole catalog loader down
>>>>>> the
>>>>>> line.
>>>>>>
>>>>>> As for contributing your Ingres code, we'd love to have that in the
>>>>>> Enablement project part of DTP. Please contact John Graham
>>>>>> (john.graham@sybase.com) and he can help point you in the right
>>>>>> direction.
>>>>>>
>>>>>> --Brian Fitzpatrick
>>>>>> Sybase, Inc.
>>>>>> Sr. Software Engineer
>>>>>> DataTools Connectivity Lead
>>>>>>
>>>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>>>> support
>>>>>>> for DTP.
>>>>>>>
>>>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>>>
>>>>>>> 1. JDBC loader
>>>>>>>
>>>>>>> To provide additional catalog information for DTP, I use the
>>>>>>> "overrideLoader" extension point. This way I did not have to
>>>>>>> implement the
>>>>>>> entire catalog structure. After all I'm a bit unsure if I use the
>>>>>>> API as
>>>>>>> it is meant to be used. After testing the implementation of a table
>>>>>>> loader
>>>>>>> (it just replaces the view and the table factory), I have seen an
>>>>>>> unexpected result. The following steps were done in the data source
>>>>>>> explorer.
>>>>>>>
>>>>>>> 1. Loading table A's columns
>>>>>>> 2. Loading table B's columns
>>>>>>> 3. Refreshing table A's columns
>>>>>>>
>>>>>>> To my surprise I have seen the columns of table B as columns of
>>>>>>> table A
>>>>>>> (the effect occurs only when using an override loader).
>>>>>>>
>>>>>>> After having a closer look at the source code, I found out that
>>>>>>>
>>>>>>> * There is always exactly one instance of a specific override loader
>>>>>>> * The loader's instance is shared between all requesting objects
>>>>>>> (e.g.
>>>>>>> tables)
>>>>>>> * A loader has a catalog object that depends on the requesting
>>>>>>> object
>>>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>>>> instance of Table)
>>>>>>>
>>>>>>> When a object uses its cached loader, the loader is sometimes
>>>>>>> initialized
>>>>>>> with the wrong catalog object (due to sharing). Are the loaders
>>>>>>> meant to
>>>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>>>
>>>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>>>
>>>>>>> JDBCProcedure.createParameterLoader() and
>>>>>>> JDBCTable.createColumnLoader()
>>>>>>> uses both the EClass of Column to find possible override loaders.
>>>>>>> Because
>>>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>>>> table
>>>>>>> columns or procedure columns.
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>>
>>>>>>> Enrico Schenk
>>>>>>>
>>>>>>> Software Engineer
>>>>>>> Ingres Germany GmbH - European Technology Center
>>>>>>>
>>>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>>>> code) to
>>>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>>>> the
>>>>>>> required steps?
>>>>>>
>>>>>
>>>>
>>>
>>
Re: Trouble with overrideLoader [message #590031 is a reply to message #41809] Fri, 22 February 2008 15:36 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Hi Enrico...

Sorry I didn't get back to your mailing list posting earlier, but glad you
reposted here.

That's definitely an odd behavior you found with (1). I know that there has
been some discussion of having multiple levels of override loaders with
priorities and such to allow for a hierarchy, so that may clear up this
issue in Ganymede.

Can you provide some example code perhaps using Derby or one of the other
profiles to reproduce this issue? I'd be happy to look at it. Obviously it
warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.

As for (2), yeah, I wondered about that when I wrote that code in the first
place. Because of the way those are structured, you'd have to actually
override the routine loader or the table loader and provide your own column
loader below them to avoid that problem. At this point I don't have a
better solution other than implementing the whole catalog loader down the
line.

As for contributing your Ingres code, we'd love to have that in the
Enablement project part of DTP. Please contact John Graham
(john.graham@sybase.com) and he can help point you in the right direction.

--Brian Fitzpatrick
Sybase, Inc.
Sr. Software Engineer
DataTools Connectivity Lead

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fpl453$t64$1@build.eclipse.org...
> Hello,
>
> I am currently developing a bundle of plug-ins to provide Ingres support
> for DTP.
>
> At the moment I have two questions regarding to the catalog loading.
>
> 1. JDBC loader
>
> To provide additional catalog information for DTP, I use the
> "overrideLoader" extension point. This way I did not have to implement the
> entire catalog structure. After all I'm a bit unsure if I use the API as
> it is meant to be used. After testing the implementation of a table loader
> (it just replaces the view and the table factory), I have seen an
> unexpected result. The following steps were done in the data source
> explorer.
>
> 1. Loading table A's columns
> 2. Loading table B's columns
> 3. Refreshing table A's columns
>
> To my surprise I have seen the columns of table B as columns of table A
> (the effect occurs only when using an override loader).
>
> After having a closer look at the source code, I found out that
>
> * There is always exactly one instance of a specific override loader
> * The loader's instance is shared between all requesting objects (e.g.
> tables)
> * A loader has a catalog object that depends on the requesting object
> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
> instance of Table)
>
> When a object uses its cached loader, the loader is sometimes initialized
> with the wrong catalog object (due to sharing). Are the loaders meant to
> be used in a stateless way? If so, can you provide an example?
>
> 2. ProcedureColumnLoader and TableColumnLoader
>
> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
> uses both the EClass of Column to find possible override loaders. Because
> of casting the result to the according loader (in JDBCProcedure and
> JDBCTable), I get some class cast exceptions when trying to retrieve table
> columns or procedure columns.
>
> Thanks in advance,
>
> Enrico Schenk
>
> Software Engineer
> Ingres Germany GmbH - European Technology Center
>
> PS: It's planned to contribute the plug-ins (including the source code) to
> the eclipse foundation. Can you point me in the right direction for the
> required steps?
Re: Trouble with overrideLoader [message #590067 is a reply to message #41848] Mon, 25 February 2008 15:31 Go to previous message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------030801080508090304060203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello Brian,

thanks for your reply. I wasn't sure if the mailing list is alive so I
reposted the message here.

I've a JUnit test for the override loader problem (the source is
attached to this mail). It basically uses two different databases and
retrieves the schemas for both of them. Afterwards it refreshes one of
the databases and shows that this instance lists an additional schema
(which belongs to the other database).

To get the test running you should adjust the properties in
configuration.properties to fit your environment (location of the Derby
10.1 driver, ...). The class
org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
contains the test and should therefore run as "JUnit Plug-in Test".
Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
can have look at the setup code :).

Regarding the column loaders. I was afraid you said something like that.
Luckily I've already derived tables, views and procedures, so I can
easily add the column loaders.

Thank you,

Enrico Schenk

Software Engineer
Ingres Germany GmbH - European Technology Center

Brian Fitzpatrick wrote:
> Hi Enrico...
>
> Sorry I didn't get back to your mailing list posting earlier, but glad you
> reposted here.
>
> That's definitely an odd behavior you found with (1). I know that there has
> been some discussion of having multiple levels of override loaders with
> priorities and such to allow for a hierarchy, so that may clear up this
> issue in Ganymede.
>
> Can you provide some example code perhaps using Derby or one of the other
> profiles to reproduce this issue? I'd be happy to look at it. Obviously it
> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>
> As for (2), yeah, I wondered about that when I wrote that code in the first
> place. Because of the way those are structured, you'd have to actually
> override the routine loader or the table loader and provide your own column
> loader below them to avoid that problem. At this point I don't have a
> better solution other than implementing the whole catalog loader down the
> line.
>
> As for contributing your Ingres code, we'd love to have that in the
> Enablement project part of DTP. Please contact John Graham
> (john.graham@sybase.com) and he can help point you in the right direction.
>
> --Brian Fitzpatrick
> Sybase, Inc.
> Sr. Software Engineer
> DataTools Connectivity Lead
>
> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
> news:fpl453$t64$1@build.eclipse.org...
>> Hello,
>>
>> I am currently developing a bundle of plug-ins to provide Ingres support
>> for DTP.
>>
>> At the moment I have two questions regarding to the catalog loading.
>>
>> 1. JDBC loader
>>
>> To provide additional catalog information for DTP, I use the
>> "overrideLoader" extension point. This way I did not have to implement the
>> entire catalog structure. After all I'm a bit unsure if I use the API as
>> it is meant to be used. After testing the implementation of a table loader
>> (it just replaces the view and the table factory), I have seen an
>> unexpected result. The following steps were done in the data source
>> explorer.
>>
>> 1. Loading table A's columns
>> 2. Loading table B's columns
>> 3. Refreshing table A's columns
>>
>> To my surprise I have seen the columns of table B as columns of table A
>> (the effect occurs only when using an override loader).
>>
>> After having a closer look at the source code, I found out that
>>
>> * There is always exactly one instance of a specific override loader
>> * The loader's instance is shared between all requesting objects (e.g.
>> tables)
>> * A loader has a catalog object that depends on the requesting object
>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>> instance of Table)
>>
>> When a object uses its cached loader, the loader is sometimes initialized
>> with the wrong catalog object (due to sharing). Are the loaders meant to
>> be used in a stateless way? If so, can you provide an example?
>>
>> 2. ProcedureColumnLoader and TableColumnLoader
>>
>> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
>> uses both the EClass of Column to find possible override loaders. Because
>> of casting the result to the according loader (in JDBCProcedure and
>> JDBCTable), I get some class cast exceptions when trying to retrieve table
>> columns or procedure columns.
>>
>> Thanks in advance,
>>
>> Enrico Schenk
>>
>> Software Engineer
>> Ingres Germany GmbH - European Technology Center
>>
>> PS: It's planned to contribute the plug-ins (including the source code) to
>> the eclipse foundation. Can you point me in the right direction for the
>> required steps?
>
>


--------------030801080508090304060203
Content-Type: application/x-zip-compressed;
name="org.eclipse.datatools.connectivity.sqm.loader.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="org.eclipse.datatools.connectivity.sqm.loader.zip "

UEsDBBQAAAAIAJJFWTjVHJzSpQAAADMBAAA9AAAAb3JnLmVjbGlwc2UuZGF0 YXRvb2xzLmNv
bm5lY3Rpdml0eS5zcW0ubG9hZGVyLnRlc3QvLmNsYXNzcGF0aJ2PPQvCMBRF ZwX/Q8huqptD
axGpoEOVUmepyaONxpeYD9F/b1WKLjq4vXs5nMuL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jdGl2aXR5LnNxbS5sb2FkZXIudGVzdC9zcmMvb3JnL2VjbGlwc2Uv ZGF0YXRvb2xz
L2Nvbm5lY3Rpdml0eS9zcW0vbG9hZGVyL3Rlc3QvQ2F0YWxvZ0xvYWRlclRl c3QuamF2YVBL
AQIUCxQAAAAIABJuWTiwKxmaKAEAAGUCAAB8AAAAAAAAAAEAIAAAAN8NAABv cmcuZWNsaXBz
ZS5kYXRhdG9vbHMuY29ubmVjdGl2aXR5LnNxbS5sb2FkZXIudGVzdC9zcmMv b3JnL2VjbGlw
c2UvZGF0YXRvb2xzL2Nvbm5lY3Rpdml0eS9zcW0vbG9hZGVyL3Rlc3QvQ29u ZmlndXJhdGlv
bi5qYXZhUEsBAhQLFAAAAAgASXdZOJkoA0WPAAAAMgEAAIIAAAAAAAAAAQAg AAAAoQ8AAG9y
Zy5lY2xpcHNlLmRhdGF0b29scy5jb25uZWN0aXZpdHkuc3FtLmxvYWRlci50 ZXN0L3NyYy9v
cmcvZWNsaXBzZS9kYXRhdG9vbHMvY29ubmVjdGl2aXR5L3NxbS9sb2FkZXIv dGVzdC9jb25m
aWd1cmF0aW9uLnByb3BlcnRpZXNQSwECFAsUAAAACAAJe1k4pPFZxlwGAABh GQAAgQAAAAAA
AAABACAAAADQEAAAb3JnLmVjbGlwc2UuZGF0YXRvb2xzLmNvbm5lY3Rpdml0 eS5zcW0ubG9h
ZGVyLnRlc3Qvc3JjL29yZy9lY2xpcHNlL2RhdGF0b29scy9jb25uZWN0aXZp dHkvc3FtL2xv
YWRlci90ZXN0L092ZXJyaWRlTG9hZGVyVGVzdC5qYXZhUEsFBgAAAAATABMA 4AkAAMsXAAAA
AA==
--------------030801080508090304060203--
Re: Trouble with overrideLoader [message #590077 is a reply to message #41970] Mon, 25 February 2008 15:35 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Thanks for the test code... Let me do some playing with this and get back to
you.
--Fitz

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fpun02$u6m$1@build.eclipse.org...
> Hello Brian,
>
> thanks for your reply. I wasn't sure if the mailing list is alive so I
> reposted the message here.
>
> I've a JUnit test for the override loader problem (the source is
> attached to this mail). It basically uses two different databases and
> retrieves the schemas for both of them. Afterwards it refreshes one of
> the databases and shows that this instance lists an additional schema
> (which belongs to the other database).
>
> To get the test running you should adjust the properties in
> configuration.properties to fit your environment (location of the Derby
> 10.1 driver, ...). The class
> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
> contains the test and should therefore run as "JUnit Plug-in Test".
> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
> can have look at the setup code :).
>
> Regarding the column loaders. I was afraid you said something like that.
> Luckily I've already derived tables, views and procedures, so I can
> easily add the column loaders.
>
> Thank you,
>
> Enrico Schenk
>
> Software Engineer
> Ingres Germany GmbH - European Technology Center
>
> Brian Fitzpatrick wrote:
>> Hi Enrico...
>>
>> Sorry I didn't get back to your mailing list posting earlier, but glad
>> you
>> reposted here.
>>
>> That's definitely an odd behavior you found with (1). I know that there
>> has
>> been some discussion of having multiple levels of override loaders with
>> priorities and such to allow for a hierarchy, so that may clear up this
>> issue in Ganymede.
>>
>> Can you provide some example code perhaps using Derby or one of the other
>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>> it
>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>
>> As for (2), yeah, I wondered about that when I wrote that code in the
>> first
>> place. Because of the way those are structured, you'd have to actually
>> override the routine loader or the table loader and provide your own
>> column
>> loader below them to avoid that problem. At this point I don't have a
>> better solution other than implementing the whole catalog loader down the
>> line.
>>
>> As for contributing your Ingres code, we'd love to have that in the
>> Enablement project part of DTP. Please contact John Graham
>> (john.graham@sybase.com) and he can help point you in the right
>> direction.
>>
>> --Brian Fitzpatrick
>> Sybase, Inc.
>> Sr. Software Engineer
>> DataTools Connectivity Lead
>>
>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>> news:fpl453$t64$1@build.eclipse.org...
>>> Hello,
>>>
>>> I am currently developing a bundle of plug-ins to provide Ingres support
>>> for DTP.
>>>
>>> At the moment I have two questions regarding to the catalog loading.
>>>
>>> 1. JDBC loader
>>>
>>> To provide additional catalog information for DTP, I use the
>>> "overrideLoader" extension point. This way I did not have to implement
>>> the
>>> entire catalog structure. After all I'm a bit unsure if I use the API as
>>> it is meant to be used. After testing the implementation of a table
>>> loader
>>> (it just replaces the view and the table factory), I have seen an
>>> unexpected result. The following steps were done in the data source
>>> explorer.
>>>
>>> 1. Loading table A's columns
>>> 2. Loading table B's columns
>>> 3. Refreshing table A's columns
>>>
>>> To my surprise I have seen the columns of table B as columns of table A
>>> (the effect occurs only when using an override loader).
>>>
>>> After having a closer look at the source code, I found out that
>>>
>>> * There is always exactly one instance of a specific override loader
>>> * The loader's instance is shared between all requesting objects (e.g.
>>> tables)
>>> * A loader has a catalog object that depends on the requesting object
>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>> instance of Table)
>>>
>>> When a object uses its cached loader, the loader is sometimes
>>> initialized
>>> with the wrong catalog object (due to sharing). Are the loaders meant to
>>> be used in a stateless way? If so, can you provide an example?
>>>
>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>
>>> JDBCProcedure.createParameterLoader() and JDBCTable.createColumnLoader()
>>> uses both the EClass of Column to find possible override loaders.
>>> Because
>>> of casting the result to the according loader (in JDBCProcedure and
>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>> table
>>> columns or procedure columns.
>>>
>>> Thanks in advance,
>>>
>>> Enrico Schenk
>>>
>>> Software Engineer
>>> Ingres Germany GmbH - European Technology Center
>>>
>>> PS: It's planned to contribute the plug-ins (including the source code)
>>> to
>>> the eclipse foundation. Can you point me in the right direction for the
>>> required steps?
>>
>>
>
>
Re: Trouble with overrideLoader [message #590088 is a reply to message #42004] Tue, 26 February 2008 21:13 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Hey Enrico...

Figured it out. If you create a BZ entry for me documenting the issue, I can
get a fix in probably by tomorrow morning for 1.6 M6. The issue is that you
are absolutely correct. I'm creating one and only one instance of that
override loader and then reusing it everywhere. The fix is to create a new
instance of the class each time the loader is created, and then your test
works beautifully.

So please create a new BZ entry for me in Connectivity and I'll get this
bugger fixed. Thanks for your patience!

--Fitz

"Brian Fitzpatrick" <brianf@sybase.com> wrote in message
news:fpun77$vkv$1@build.eclipse.org...
> Thanks for the test code... Let me do some playing with this and get back
> to you.
> --Fitz
>
> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
> news:fpun02$u6m$1@build.eclipse.org...
>> Hello Brian,
>>
>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>> reposted the message here.
>>
>> I've a JUnit test for the override loader problem (the source is
>> attached to this mail). It basically uses two different databases and
>> retrieves the schemas for both of them. Afterwards it refreshes one of
>> the databases and shows that this instance lists an additional schema
>> (which belongs to the other database).
>>
>> To get the test running you should adjust the properties in
>> configuration.properties to fit your environment (location of the Derby
>> 10.1 driver, ...). The class
>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>> contains the test and should therefore run as "JUnit Plug-in Test".
>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>> can have look at the setup code :).
>>
>> Regarding the column loaders. I was afraid you said something like that.
>> Luckily I've already derived tables, views and procedures, so I can
>> easily add the column loaders.
>>
>> Thank you,
>>
>> Enrico Schenk
>>
>> Software Engineer
>> Ingres Germany GmbH - European Technology Center
>>
>> Brian Fitzpatrick wrote:
>>> Hi Enrico...
>>>
>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>> you
>>> reposted here.
>>>
>>> That's definitely an odd behavior you found with (1). I know that there
>>> has
>>> been some discussion of having multiple levels of override loaders with
>>> priorities and such to allow for a hierarchy, so that may clear up this
>>> issue in Ganymede.
>>>
>>> Can you provide some example code perhaps using Derby or one of the
>>> other
>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>> it
>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>
>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>> first
>>> place. Because of the way those are structured, you'd have to actually
>>> override the routine loader or the table loader and provide your own
>>> column
>>> loader below them to avoid that problem. At this point I don't have a
>>> better solution other than implementing the whole catalog loader down
>>> the
>>> line.
>>>
>>> As for contributing your Ingres code, we'd love to have that in the
>>> Enablement project part of DTP. Please contact John Graham
>>> (john.graham@sybase.com) and he can help point you in the right
>>> direction.
>>>
>>> --Brian Fitzpatrick
>>> Sybase, Inc.
>>> Sr. Software Engineer
>>> DataTools Connectivity Lead
>>>
>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>> news:fpl453$t64$1@build.eclipse.org...
>>>> Hello,
>>>>
>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>> support
>>>> for DTP.
>>>>
>>>> At the moment I have two questions regarding to the catalog loading.
>>>>
>>>> 1. JDBC loader
>>>>
>>>> To provide additional catalog information for DTP, I use the
>>>> "overrideLoader" extension point. This way I did not have to implement
>>>> the
>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>> as
>>>> it is meant to be used. After testing the implementation of a table
>>>> loader
>>>> (it just replaces the view and the table factory), I have seen an
>>>> unexpected result. The following steps were done in the data source
>>>> explorer.
>>>>
>>>> 1. Loading table A's columns
>>>> 2. Loading table B's columns
>>>> 3. Refreshing table A's columns
>>>>
>>>> To my surprise I have seen the columns of table B as columns of table A
>>>> (the effect occurs only when using an override loader).
>>>>
>>>> After having a closer look at the source code, I found out that
>>>>
>>>> * There is always exactly one instance of a specific override loader
>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>> tables)
>>>> * A loader has a catalog object that depends on the requesting object
>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>> instance of Table)
>>>>
>>>> When a object uses its cached loader, the loader is sometimes
>>>> initialized
>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>> to
>>>> be used in a stateless way? If so, can you provide an example?
>>>>
>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>
>>>> JDBCProcedure.createParameterLoader() and
>>>> JDBCTable.createColumnLoader()
>>>> uses both the EClass of Column to find possible override loaders.
>>>> Because
>>>> of casting the result to the according loader (in JDBCProcedure and
>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>> table
>>>> columns or procedure columns.
>>>>
>>>> Thanks in advance,
>>>>
>>>> Enrico Schenk
>>>>
>>>> Software Engineer
>>>> Ingres Germany GmbH - European Technology Center
>>>>
>>>> PS: It's planned to contribute the plug-ins (including the source code)
>>>> to
>>>> the eclipse foundation. Can you point me in the right direction for the
>>>> required steps?
>>>
>>>
>>
>>
>
>
Re: Trouble with overrideLoader [message #590112 is a reply to message #42035] Tue, 26 February 2008 21:30 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Never mind... I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464

I'll get this checked in and it should appear in tomorrow's build.

--Fitz

"Brian Fitzpatrick" <brianf@sybase.com> wrote in message
news:fq1vdv$6ep$1@build.eclipse.org...
> Hey Enrico...
>
> Figured it out. If you create a BZ entry for me documenting the issue, I
> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
> that you are absolutely correct. I'm creating one and only one instance of
> that override loader and then reusing it everywhere. The fix is to create
> a new instance of the class each time the loader is created, and then your
> test works beautifully.
>
> So please create a new BZ entry for me in Connectivity and I'll get this
> bugger fixed. Thanks for your patience!
>
> --Fitz
>
> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
> news:fpun77$vkv$1@build.eclipse.org...
>> Thanks for the test code... Let me do some playing with this and get back
>> to you.
>> --Fitz
>>
>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>> news:fpun02$u6m$1@build.eclipse.org...
>>> Hello Brian,
>>>
>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>> reposted the message here.
>>>
>>> I've a JUnit test for the override loader problem (the source is
>>> attached to this mail). It basically uses two different databases and
>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>> the databases and shows that this instance lists an additional schema
>>> (which belongs to the other database).
>>>
>>> To get the test running you should adjust the properties in
>>> configuration.properties to fit your environment (location of the Derby
>>> 10.1 driver, ...). The class
>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>> can have look at the setup code :).
>>>
>>> Regarding the column loaders. I was afraid you said something like that.
>>> Luckily I've already derived tables, views and procedures, so I can
>>> easily add the column loaders.
>>>
>>> Thank you,
>>>
>>> Enrico Schenk
>>>
>>> Software Engineer
>>> Ingres Germany GmbH - European Technology Center
>>>
>>> Brian Fitzpatrick wrote:
>>>> Hi Enrico...
>>>>
>>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>>> you
>>>> reposted here.
>>>>
>>>> That's definitely an odd behavior you found with (1). I know that there
>>>> has
>>>> been some discussion of having multiple levels of override loaders with
>>>> priorities and such to allow for a hierarchy, so that may clear up this
>>>> issue in Ganymede.
>>>>
>>>> Can you provide some example code perhaps using Derby or one of the
>>>> other
>>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>>> it
>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>
>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>> first
>>>> place. Because of the way those are structured, you'd have to actually
>>>> override the routine loader or the table loader and provide your own
>>>> column
>>>> loader below them to avoid that problem. At this point I don't have a
>>>> better solution other than implementing the whole catalog loader down
>>>> the
>>>> line.
>>>>
>>>> As for contributing your Ingres code, we'd love to have that in the
>>>> Enablement project part of DTP. Please contact John Graham
>>>> (john.graham@sybase.com) and he can help point you in the right
>>>> direction.
>>>>
>>>> --Brian Fitzpatrick
>>>> Sybase, Inc.
>>>> Sr. Software Engineer
>>>> DataTools Connectivity Lead
>>>>
>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>> support
>>>>> for DTP.
>>>>>
>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>
>>>>> 1. JDBC loader
>>>>>
>>>>> To provide additional catalog information for DTP, I use the
>>>>> "overrideLoader" extension point. This way I did not have to implement
>>>>> the
>>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>>> as
>>>>> it is meant to be used. After testing the implementation of a table
>>>>> loader
>>>>> (it just replaces the view and the table factory), I have seen an
>>>>> unexpected result. The following steps were done in the data source
>>>>> explorer.
>>>>>
>>>>> 1. Loading table A's columns
>>>>> 2. Loading table B's columns
>>>>> 3. Refreshing table A's columns
>>>>>
>>>>> To my surprise I have seen the columns of table B as columns of table
>>>>> A
>>>>> (the effect occurs only when using an override loader).
>>>>>
>>>>> After having a closer look at the source code, I found out that
>>>>>
>>>>> * There is always exactly one instance of a specific override loader
>>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>>> tables)
>>>>> * A loader has a catalog object that depends on the requesting object
>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>> instance of Table)
>>>>>
>>>>> When a object uses its cached loader, the loader is sometimes
>>>>> initialized
>>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>>> to
>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>
>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>
>>>>> JDBCProcedure.createParameterLoader() and
>>>>> JDBCTable.createColumnLoader()
>>>>> uses both the EClass of Column to find possible override loaders.
>>>>> Because
>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>> table
>>>>> columns or procedure columns.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Enrico Schenk
>>>>>
>>>>> Software Engineer
>>>>> Ingres Germany GmbH - European Technology Center
>>>>>
>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>> code) to
>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>> the
>>>>> required steps?
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: Trouble with overrideLoader [message #590190 is a reply to message #42097] Wed, 27 February 2008 16:10 Go to previous message
Enrico Schenk is currently offline Enrico SchenkFriend
Messages: 23
Registered: July 2009
Junior Member
Thanks Brian, with the patch it works like a charm :)

Enrico

Brian Fitzpatrick wrote:
> Never mind... I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464
>
> I'll get this checked in and it should appear in tomorrow's build.
>
> --Fitz
>
> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
> news:fq1vdv$6ep$1@build.eclipse.org...
>> Hey Enrico...
>>
>> Figured it out. If you create a BZ entry for me documenting the issue, I
>> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
>> that you are absolutely correct. I'm creating one and only one instance of
>> that override loader and then reusing it everywhere. The fix is to create
>> a new instance of the class each time the loader is created, and then your
>> test works beautifully.
>>
>> So please create a new BZ entry for me in Connectivity and I'll get this
>> bugger fixed. Thanks for your patience!
>>
>> --Fitz
>>
>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>> news:fpun77$vkv$1@build.eclipse.org...
>>> Thanks for the test code... Let me do some playing with this and get back
>>> to you.
>>> --Fitz
>>>
>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>> news:fpun02$u6m$1@build.eclipse.org...
>>>> Hello Brian,
>>>>
>>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>>> reposted the message here.
>>>>
>>>> I've a JUnit test for the override loader problem (the source is
>>>> attached to this mail). It basically uses two different databases and
>>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>>> the databases and shows that this instance lists an additional schema
>>>> (which belongs to the other database).
>>>>
>>>> To get the test running you should adjust the properties in
>>>> configuration.properties to fit your environment (location of the Derby
>>>> 10.1 driver, ...). The class
>>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>>> can have look at the setup code :).
>>>>
>>>> Regarding the column loaders. I was afraid you said something like that.
>>>> Luckily I've already derived tables, views and procedures, so I can
>>>> easily add the column loaders.
>>>>
>>>> Thank you,
>>>>
>>>> Enrico Schenk
>>>>
>>>> Software Engineer
>>>> Ingres Germany GmbH - European Technology Center
>>>>
>>>> Brian Fitzpatrick wrote:
>>>>> Hi Enrico...
>>>>>
>>>>> Sorry I didn't get back to your mailing list posting earlier, but glad
>>>>> you
>>>>> reposted here.
>>>>>
>>>>> That's definitely an odd behavior you found with (1). I know that there
>>>>> has
>>>>> been some discussion of having multiple levels of override loaders with
>>>>> priorities and such to allow for a hierarchy, so that may clear up this
>>>>> issue in Ganymede.
>>>>>
>>>>> Can you provide some example code perhaps using Derby or one of the
>>>>> other
>>>>> profiles to reproduce this issue? I'd be happy to look at it. Obviously
>>>>> it
>>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>>
>>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>>> first
>>>>> place. Because of the way those are structured, you'd have to actually
>>>>> override the routine loader or the table loader and provide your own
>>>>> column
>>>>> loader below them to avoid that problem. At this point I don't have a
>>>>> better solution other than implementing the whole catalog loader down
>>>>> the
>>>>> line.
>>>>>
>>>>> As for contributing your Ingres code, we'd love to have that in the
>>>>> Enablement project part of DTP. Please contact John Graham
>>>>> (john.graham@sybase.com) and he can help point you in the right
>>>>> direction.
>>>>>
>>>>> --Brian Fitzpatrick
>>>>> Sybase, Inc.
>>>>> Sr. Software Engineer
>>>>> DataTools Connectivity Lead
>>>>>
>>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>>> support
>>>>>> for DTP.
>>>>>>
>>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>>
>>>>>> 1. JDBC loader
>>>>>>
>>>>>> To provide additional catalog information for DTP, I use the
>>>>>> "overrideLoader" extension point. This way I did not have to implement
>>>>>> the
>>>>>> entire catalog structure. After all I'm a bit unsure if I use the API
>>>>>> as
>>>>>> it is meant to be used. After testing the implementation of a table
>>>>>> loader
>>>>>> (it just replaces the view and the table factory), I have seen an
>>>>>> unexpected result. The following steps were done in the data source
>>>>>> explorer.
>>>>>>
>>>>>> 1. Loading table A's columns
>>>>>> 2. Loading table B's columns
>>>>>> 3. Refreshing table A's columns
>>>>>>
>>>>>> To my surprise I have seen the columns of table B as columns of table
>>>>>> A
>>>>>> (the effect occurs only when using an override loader).
>>>>>>
>>>>>> After having a closer look at the source code, I found out that
>>>>>>
>>>>>> * There is always exactly one instance of a specific override loader
>>>>>> * The loader's instance is shared between all requesting objects (e.g.
>>>>>> tables)
>>>>>> * A loader has a catalog object that depends on the requesting object
>>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>>> instance of Table)
>>>>>>
>>>>>> When a object uses its cached loader, the loader is sometimes
>>>>>> initialized
>>>>>> with the wrong catalog object (due to sharing). Are the loaders meant
>>>>>> to
>>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>>
>>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>>
>>>>>> JDBCProcedure.createParameterLoader() and
>>>>>> JDBCTable.createColumnLoader()
>>>>>> uses both the EClass of Column to find possible override loaders.
>>>>>> Because
>>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>>> table
>>>>>> columns or procedure columns.
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Enrico Schenk
>>>>>>
>>>>>> Software Engineer
>>>>>> Ingres Germany GmbH - European Technology Center
>>>>>>
>>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>>> code) to
>>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>>> the
>>>>>> required steps?
>>>>>
>>>>
>>>
>>
>
>
Re: Trouble with overrideLoader [message #590200 is a reply to message #42296] Wed, 27 February 2008 20:07 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Great news! Glad we could help! Let us know if you need anything else.
--Fitz

"Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
news:fq420r$k1i$1@build.eclipse.org...
> Thanks Brian, with the patch it works like a charm :)
>
> Enrico
>
> Brian Fitzpatrick wrote:
>> Never mind... I created
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=220464
>>
>> I'll get this checked in and it should appear in tomorrow's build.
>>
>> --Fitz
>>
>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>> news:fq1vdv$6ep$1@build.eclipse.org...
>>> Hey Enrico...
>>>
>>> Figured it out. If you create a BZ entry for me documenting the issue, I
>>> can get a fix in probably by tomorrow morning for 1.6 M6. The issue is
>>> that you are absolutely correct. I'm creating one and only one instance
>>> of that override loader and then reusing it everywhere. The fix is to
>>> create a new instance of the class each time the loader is created, and
>>> then your test works beautifully.
>>>
>>> So please create a new BZ entry for me in Connectivity and I'll get this
>>> bugger fixed. Thanks for your patience!
>>>
>>> --Fitz
>>>
>>> "Brian Fitzpatrick" <brianf@sybase.com> wrote in message
>>> news:fpun77$vkv$1@build.eclipse.org...
>>>> Thanks for the test code... Let me do some playing with this and get
>>>> back to you.
>>>> --Fitz
>>>>
>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>> news:fpun02$u6m$1@build.eclipse.org...
>>>>> Hello Brian,
>>>>>
>>>>> thanks for your reply. I wasn't sure if the mailing list is alive so I
>>>>> reposted the message here.
>>>>>
>>>>> I've a JUnit test for the override loader problem (the source is
>>>>> attached to this mail). It basically uses two different databases and
>>>>> retrieves the schemas for both of them. Afterwards it refreshes one of
>>>>> the databases and shows that this instance lists an additional schema
>>>>> (which belongs to the other database).
>>>>>
>>>>> To get the test running you should adjust the properties in
>>>>> configuration.properties to fit your environment (location of the
>>>>> Derby
>>>>> 10.1 driver, ...). The class
>>>>> org.eclipse.datatools.connectivity.sqm.loader.test.OverrideL oaderTest
>>>>> contains the test and should therefore run as "JUnit Plug-in Test".
>>>>> Btw. I'm not sure, if I used the DTP API in a proper way, so maybe you
>>>>> can have look at the setup code :).
>>>>>
>>>>> Regarding the column loaders. I was afraid you said something like
>>>>> that.
>>>>> Luckily I've already derived tables, views and procedures, so I can
>>>>> easily add the column loaders.
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Enrico Schenk
>>>>>
>>>>> Software Engineer
>>>>> Ingres Germany GmbH - European Technology Center
>>>>>
>>>>> Brian Fitzpatrick wrote:
>>>>>> Hi Enrico...
>>>>>>
>>>>>> Sorry I didn't get back to your mailing list posting earlier, but
>>>>>> glad you
>>>>>> reposted here.
>>>>>>
>>>>>> That's definitely an odd behavior you found with (1). I know that
>>>>>> there has
>>>>>> been some discussion of having multiple levels of override loaders
>>>>>> with
>>>>>> priorities and such to allow for a hierarchy, so that may clear up
>>>>>> this
>>>>>> issue in Ganymede.
>>>>>>
>>>>>> Can you provide some example code perhaps using Derby or one of the
>>>>>> other
>>>>>> profiles to reproduce this issue? I'd be happy to look at it.
>>>>>> Obviously it
>>>>>> warrants a BZ entry targeted for the DTP 1.6 release for Ganymede.
>>>>>>
>>>>>> As for (2), yeah, I wondered about that when I wrote that code in the
>>>>>> first
>>>>>> place. Because of the way those are structured, you'd have to
>>>>>> actually
>>>>>> override the routine loader or the table loader and provide your own
>>>>>> column
>>>>>> loader below them to avoid that problem. At this point I don't have
>>>>>> a
>>>>>> better solution other than implementing the whole catalog loader down
>>>>>> the
>>>>>> line.
>>>>>>
>>>>>> As for contributing your Ingres code, we'd love to have that in the
>>>>>> Enablement project part of DTP. Please contact John Graham
>>>>>> (john.graham@sybase.com) and he can help point you in the right
>>>>>> direction.
>>>>>>
>>>>>> --Brian Fitzpatrick
>>>>>> Sybase, Inc.
>>>>>> Sr. Software Engineer
>>>>>> DataTools Connectivity Lead
>>>>>>
>>>>>> "Enrico Schenk" <enrico.schenk@ingres.com> wrote in message
>>>>>> news:fpl453$t64$1@build.eclipse.org...
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am currently developing a bundle of plug-ins to provide Ingres
>>>>>>> support
>>>>>>> for DTP.
>>>>>>>
>>>>>>> At the moment I have two questions regarding to the catalog loading.
>>>>>>>
>>>>>>> 1. JDBC loader
>>>>>>>
>>>>>>> To provide additional catalog information for DTP, I use the
>>>>>>> "overrideLoader" extension point. This way I did not have to
>>>>>>> implement the
>>>>>>> entire catalog structure. After all I'm a bit unsure if I use the
>>>>>>> API as
>>>>>>> it is meant to be used. After testing the implementation of a table
>>>>>>> loader
>>>>>>> (it just replaces the view and the table factory), I have seen an
>>>>>>> unexpected result. The following steps were done in the data source
>>>>>>> explorer.
>>>>>>>
>>>>>>> 1. Loading table A's columns
>>>>>>> 2. Loading table B's columns
>>>>>>> 3. Refreshing table A's columns
>>>>>>>
>>>>>>> To my surprise I have seen the columns of table B as columns of
>>>>>>> table A
>>>>>>> (the effect occurs only when using an override loader).
>>>>>>>
>>>>>>> After having a closer look at the source code, I found out that
>>>>>>>
>>>>>>> * There is always exactly one instance of a specific override loader
>>>>>>> * The loader's instance is shared between all requesting objects
>>>>>>> (e.g.
>>>>>>> tables)
>>>>>>> * A loader has a catalog object that depends on the requesting
>>>>>>> object
>>>>>>> (e.g. the JDBCTableColumnLoader expects the catalog object to be an
>>>>>>> instance of Table)
>>>>>>>
>>>>>>> When a object uses its cached loader, the loader is sometimes
>>>>>>> initialized
>>>>>>> with the wrong catalog object (due to sharing). Are the loaders
>>>>>>> meant to
>>>>>>> be used in a stateless way? If so, can you provide an example?
>>>>>>>
>>>>>>> 2. ProcedureColumnLoader and TableColumnLoader
>>>>>>>
>>>>>>> JDBCProcedure.createParameterLoader() and
>>>>>>> JDBCTable.createColumnLoader()
>>>>>>> uses both the EClass of Column to find possible override loaders.
>>>>>>> Because
>>>>>>> of casting the result to the according loader (in JDBCProcedure and
>>>>>>> JDBCTable), I get some class cast exceptions when trying to retrieve
>>>>>>> table
>>>>>>> columns or procedure columns.
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>>
>>>>>>> Enrico Schenk
>>>>>>>
>>>>>>> Software Engineer
>>>>>>> Ingres Germany GmbH - European Technology Center
>>>>>>>
>>>>>>> PS: It's planned to contribute the plug-ins (including the source
>>>>>>> code) to
>>>>>>> the eclipse foundation. Can you point me in the right direction for
>>>>>>> the
>>>>>>> required steps?
>>>>>>
>>>>>
>>>>
>>>
>>
Previous Topic:Installation problem pdt with eclipse 3.4.
Next Topic:"No connection" on a database that I am connected to
Goto Forum:
  


Current Time: Wed Nov 25 17:13:44 GMT 2020

Powered by FUDForum. Page generated in 0.03198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top