The Join seems to work, but a FeatureLayer based on a FeatureSource that has a 
Joined Query has no output.
 
 
                    FeatureCollection featureCollection = 
featureSource.getFeatures(query);
                    FeatureLayer layer = new FeatureLayer(featureCollection, 
styleGeometry);
 
When I do featureCollection.size() it gives me the correct size of the joined 
query.
The map with the FeatureLayer on it, displays nothing with StreamingRenderer.
 
Ron
 

________________________________
 From: Andrea Aime <[email protected]>
To: Ron Lindhoudt <[email protected]> 
Cc: Jody Garnett <[email protected]>; 
"[email protected]" 
<[email protected]> 
Sent: Friday, March 15, 2013 9:37 AM
Subject: Re: [Geotools-gt2-users] FunctionFactory threadsafe?
  

On Fri, Mar 15, 2013 at 7:54 AM, Ron Lindhoudt <[email protected]> wrote:

Will this work when may threads are calling the lookup function and use the 
same Connection in MyFunctionFactory? 

No, it won't, since a connection is something that cannot be used by different 
threads.
A slightly different approach would be to store the connection in a thread 
local, and then 
find some way to close it once you're done.

Or, you'll have to lookup the connection from the data source, and close it, 
every time.
It's not that expensive, the datasource is a connection pool no? 
The expensive part will be to have to run so many queries, one per feature

Joining does work, there are tests to prove it, have a look at JDBCJoinTest and 
its subclasses
for examples of usage. 

Cheers
Andrea


>
>Thanks.
>Ron
> 
>
> From: Jody Garnett <[email protected]>
>To: Ron Lindhoudt <[email protected]> 
>Cc: Andrea Aime <[email protected]>; 
>"[email protected]" 
><[email protected]> 
>Sent: Friday, March 15, 2013 4:39 AM
>
>Subject: Re: [Geotools-gt2-users] FunctionFactory threadsafe?
>   
>
>The FunctionFactoryFinder(s) keep the registry of FunctionFactory instances 
>thread safe (so we do not create two accidentally). Beyond that your factory 
>could be used by multiple threads. 
>
>
>The Function's returned are placed into a Filter or Expression data structure 
>which is generally immutable, allowing it to be called from multiple threads 
>efficiently.
>
>
>You have confused me a bit from switching your question from FunctionFactory 
>(single object in a register) to Function (many copies). 
>
>
>-- 
>Jody Garnett
>
>
> 
>On Friday, 15 March 2013 at 1:25 AM, Ron Lindhoudt wrote: 
>So this means that when I set a non-static private variable in a function of 
>FunctionFactory that this variable does not change during the execution of 
>this function by another call? 
>> 
>>Ron
>>
>> 
>>From: Andrea Aime <[email protected]>
>>To: Ron Lindhoudt <[email protected]> 
>>Cc: "[email protected]" 
>><[email protected]> 
>>Sent: Thursday, March 14, 2013 3:12 PM
>>Subject: Re: [Geotools-gt2-users] FunctionFactory threadsafe?
>>  
>> 
>>On Thu, Mar 14, 2013 at 3:07 PM, Ron Lindhoudt <[email protected]> wrote:
>>
>>Hey,
>>>
>>>I created a new FunctionFactory and registered this in services.
>>>I want to know if FunctionFactory is threadsafe 
>>
>>
>>It has to be thread safe, yes
>>
>>
>>Cheers
>>Andrea
>>
>>
>>-- 
>>
>>==
>>Our support, Your Success! Visit http://opensdi.geo-solutions.it/ for more 
>>information. 
>>==
>>
>>
>>Ing. Andrea Aime 
>>@geowolf
>>Technical Lead
>>
>>
>>GeoSolutions S.A.S.
>>Via Poggio alle Viti 1187
>>55054  Massarosa (LU)
>>Italy 
>>phone: +39 0584 962313 
>>fax: +39 0584 1660272 
>>mob: +39  339 8844549
>>
>>
>>http://www.geo-solutions.it/ 
>>http://twitter.com/geosolutions_it 
>>
>>
>>------------------------------------------------------- 
>>
>>  
>>------------------------------------------------------------------------------
>>Everyone hates slow websites. So do we.
>>Make your web apps faster with AppDynamics 
>>Download AppDynamics Lite for free today:
>>http://p.sf.net/sfu/appdyn_d2d_mar
>>_______________________________________________ 
>>GeoTools-GT2-Users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users   
>
> 
>
>  


-- 

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it/ for more 
information. 
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy 
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it/
http://twitter.com/geosolutions_it 

------------------------------------------------------- 
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to