Hi,

That's not possible with the current joining implementation, as it uses INNER 
JOIN between the linked tables - not possible across different databases.
It has to use the old implementation (without joining), which is painfully slow 
for large datasets.
It's probably OK for demonstration purposes where there are only a few records, 
but for production, I would recommend using joining (with one database).

Re: sorting changes, it was to cater for database views where idExpression is 
not specified and the primary keys aren't available.
If your table has primary keys, then it would sort by the primary key in 
absence of the idExpression. I also replied to your other thread regarding this.

Cheers
Rini

From: snuffy [mailto:snuff...@gmail.com]
Sent: Tuesday, 15 October 2013 12:47 PM
To: Angreani, Rini (CESRE, Kensington)
Cc: Caradoc-Davies, Ben (CESRE, Kensington); 
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] App-schema and CharacterString Type

Sounds good,

I'd almost like an 'override' parameter or similar attached to the datastore 
definition that I could then say:
<forceLinkedJNDI>true</forceLinkedJNDI>

Which when applied would use the JDBC connection of the feature requesting the 
linkage to this feature.
aka:
Person pulls in CI_Contact, therefore override the jndi connection specified by 
CI_Contact (if forceLinkJNDI = true) to be Person's JNDI information.

I'm not sure how possible that is because I have not reviewed the code in that 
respect.

PS: i noticed some sorting related changes on the git tree for app-schema 
recently, does any of those changes remove the odd requirement of needing the 
idExpression table column in the feature being linked to (because of sorting)?

On 15 October 2013 14:44, 
<rini.angre...@csiro.au<mailto:rini.angre...@csiro.au>> wrote:
Perhaps we could improve the joining setting by applying it per feature type, 
instead of per GeoServer instance.
I raised this task, but I can't commit on working on it anytime soon.
https://jira.codehaus.org/browse/GEOT-4596

-----Original Message-----
From: Caradoc-Davies, Ben (CESRE, Kensington)
Sent: Tuesday, 15 October 2013 9:47 AM
To: snuffy
Cc: 
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>;
 Angreani, Rini (CESRE, Kensington)
Subject: Re: [Geoserver-users] App-schema and CharacterString Type

Aha! Because app-schema can use separate connections for different feature 
types, it should work with chaining across different databases, but only if 
joining is turned off. It looks like you have found a use-case that does not 
automatically turn off joining; this is a bug.
You can manually turn off joining in your app-schema.properties file:
http://docs.geoserver.org/latest/en/user/data/app-schema/joining.html#conditions

Kind regards,
Ben.

On 15/10/13 07:11, snuffy wrote:
> Attached is stack trace..
>
> Appears to be having issue with sql..
>
> I think I know where the issue might be.. it is possible it is trying
> to join between two databases.
>
> (It was)
>
> I have two different databases and two different jdbc connections,
> each project uses their own.. except..
>
> An app-schema feature can only describe a single jdbc datasource, so
> even though each db has their own version of the 'ci_contact' and
> friends table, when app-schema does a query its locked into the one
> jdbc datasource.
>
> I guess if I want to implement separate db's which share another
> common featureType  from an external namespace i'll need to have
> separate geoservers or have it within a single database schema.
>
> Thanks
>
>
> On 14 October 2013 17:34, Ben Caradoc-Davies
> <ben.caradoc-dav...@csiro.au 
> <mailto:ben.caradoc-dav...@csiro.au<mailto:ben.caradoc-dav...@csiro.au>>> 
> wrote:
>
>     Do you have a full stack trace?
>
>
>     On 14/10/13 14:22, snuffy wrote:
>
>         As a minor follow up to this.
>
>         I've tried taking my 'company' schema and adding a CI_Contact entry.
>
>         I believe something is not right in my xsd/xml.
>
>         The error is listed below:
>
>         <ows:ExceptionText>
>         java.lang.RuntimeException: Error applying mapping with
>         targetAttribute
>         company:contactInfo Error applying mapping with targetAttribute
>         company:contactInfo java.io.IOException null Schema 'person'
>         does not exist.
>
>
>         Have attached zip with relevant files.
>
>
>     --
>     Ben Caradoc-Davies 
> <ben.caradoc-dav...@csiro.au<mailto:ben.caradoc-dav...@csiro.au>>
>     Software Engineer
>     CSIRO Earth Science and Resource Engineering
>     Australian Resources Research Centre
>
>

--
Ben Caradoc-Davies 
<ben.caradoc-dav...@csiro.au<mailto:ben.caradoc-dav...@csiro.au>> Software 
Engineer CSIRO Earth Science and Resource Engineering Australian Resources 
Research Centre

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to